Animation

Wrapper around a native animation.

.constructor(host: Prefab | WonderlandEngine, index: number) ⇒ Animation 

ParamTypeDescription
hostPrefab | WonderlandEngine
indexnumberIndex 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.

ParamTypeDescription
newTargetsSkin | Object3D[]New targets per track. Expected to have trackCount elements or to be a Skin.

.toString() ⇒ string