new AnimationLayer(targetName, propertyName, clip)
Parameters:
Name | Type | Description |
---|---|---|
targetName |
The name of the target object. The name must match the name of an Entity, a MorphAnimation, a MeshInstance, or a SkeletonJoinr somewhere in the hierarchy of the animation's owning Entity |
|
propertyName |
The name of the target object's animated property. Usually 'position', 'rotation', 'scale' or the name of a morph target. |
|
clip |
The clip containing the keyframes for the animation |
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
-
clone()
-
Creates a copy of this AnimationLayer object.
-
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