Animation
Wrapper around a native animation.
- Animation
- .constructor(host, index) ⇒ Animation
- .duration
- .trackCount
- .retarget(newTargets) ⇒ Animation
- .toString() ⇒ string
.constructor(host: Prefab | WonderlandEngine, index: number) ⇒ Animation
Param | Type | Description |
---|---|---|
host | Prefab | WonderlandEngine | |
index | number | Index in the manager |
.duration: number
Duration of this animation.
.trackCount: number
Number of tracks in this animation.
.retarget(newTargets: Skin | Object3D[]) ⇒ Animation
Clone this animation retargeted to a new set of objects.
The clone shares most of the data with the original and is therefore light-weight.
Experimental: This API might change in upcoming versions.
If retargeting to Skin, the join names will be used to determine a mapping from the previous skin to the new skin. The source skin will be retrieved from the first track in the animation that targets a joint.
Returns: The retargeted clone of this animation.
Param | Type | Description |
---|---|---|
newTargets | Skin | Object3D[] | New targets per track. Expected to have trackCount elements or to be a Skin. |