new AnimationLayer()
Members
-
duration
-
The total duration of the layer, in milliseconds.
-
looping
-
Defines whether this layer should repeat or not.
-
time
-
The current time in milliseconds of the play head.
Methods
-
getKeyFrame()
-
Returns the key frame with the given index.
-
update(dt)
-
This needs to be called every frame.
Parameters:
Name Type Description dt
The time passed since last frame in milliseconds.
Returns:
Whether or not the playhead moved. This can be used to spare further calculations if the old state is kept.
- Type
- boolean