Phaser API Documentation

calculateDuration(target, totalFrames, duration, frameRate)


Calculates the duration, frame rate and msPerFrame values.


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