Phaser API Documentation

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

Description:

Calculates the duration, frame rate and msPerFrame values.

Parameters:

name type arguments description
target Phaser.Animations.Animation

The target to set the values on.

totalFrames number

The total number of frames in the animation.

duration number <optional>

The duration to calculate the frame rate from. Pass null if you wish to set the frameRate instead.

frameRate number <optional>

The frame rate to calculate the duration from.

Since: 3.50.0