Class: AnimationLayer

AnimationLayer

AnimationLayer is a wrapper for a clip and a playhead that targets a specific object and that can be used in LayeredAnimation.


new AnimationLayer()

Author:
  • derschmale <http://www.derschmale.com>

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