Type Alias AnimationCallback

AnimationCallback: (elapsed: ElapsedTimes) => boolean

The callback is as an argument the elapsed times:

  • The total elapsed time in milliseconds since the start
  • The elapsed time in milliseconds since the previous frame

The first time this callback is called both of these will be 0 unless seed values were provided.

The callback must return true if it wants to animate again on the next frame and false if done.

Type declaration

v1.2.0