AnimationClipInstance

AnimationClipInstance

Maintains state information about an instance of a specific animation clip, such as time scaling applied, active flag, start time of the
instance, etc.

Constructor

new AnimationClipInstance(worldopt)

Parameters:
Name Type Attributes Description
world World <optional>

the sumerian world this clip belongs to

Methods

getApplyTo(channel) → {TransformData|TriggerData|Array.<number>}

Gives the corresponding data for a channel, to apply animations to

Parameters:
Name Type Description
channel AbstractAnimationChannel

setSkeleton(skeleton)

Links this AnimationClipInstance to the specified Skeleton.

This must be called when the clip instance is assigned to an animState
(i.e. linked to an layer and animation component). Failure to do so will
cause the clip not to animate the skeleton as Joint Paths will not be mapped
(or mapped incorrectly) to skeleton indices without a call to setSkeleton()

Parameters:
Name Type Description
skeleton Object

Skeleton skeleton to use for join path to index mapping.

setTimeScale(scale, globalTimeopt)

Sets the timescale of the animation, speeding it up or slowing it down

Parameters:
Name Type Attributes Default Description
scale number
globalTime number <optional>
this._world.time