Class: MorphPose

MorphPose

MorphPose defines a certain configuration for blending several morph targets. While this can be used to directly assign to a ModelInstance, it's usually controlled through a component such as {@MorphAnimation}. Other components could use several MorphPose objects in keyframes and tween between them over a timeline.


new MorphPose()

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

Members


numMorphTargets

The amount of morph targets used in this pose.

Methods


addMorphTarget(morphTarget)

Adds a MorphTarget object to the pose.

Parameters:
Name Type Description
morphTarget MorphTarget

getMorphTarget(index)

Gets the morph target as sorted by weight in update()

Parameters:
Name Type Description
index number

The index of the MorphTarget

Returns:
Type
MorphTarget

getWeight(name)

Gets the weight of a morph target with the given name.

Parameters:
Name Type Description
name string

The name of the morph target.

Returns:
Type
number

setWeight(name, value)

Sets the weight of a morph target with the given name.

Parameters:
Name Type Description
name string

The name of the morph target.

value number

The new weight.


update()

Updates the morph pose given the current weights. Usually called by a wrapping component. If no component is used, update needs to be called manually.