Phaser API Documentation

  Version: 
calculateDuration(target, totalFrames, duration, frameRate)

Description:

Calculates the duration, frame rate and msPerFrame values.

Parameters:

name type description
target Phaser.Animations.Animation

The target to set the values on.

totalFrames number

The total number of frames in the animation.

duration number

The duration to calculate the frame rate from.

frameRate number

The frame ate to calculate the duration from.

Since: 3.50.0