MorphInstance
An instance of Morph. Contains weights to assign to every MorphTarget, manages selection of active morph targets.
Summary
Properties
morph | The morph with its targets, which is being instanced. |
Methods
clone | Clones a MorphInstance. |
destroy | Frees video memory allocated by this object. |
getWeight | Gets current weight of the specified morph target. |
setWeight | Sets weight of the specified morph target. |
update | Selects active morph targets and prepares morph for rendering. |
Details
Constructor
MorphInstance(morph)
Create a new MorphInstance instance.
Parameters
morph | Morph | The Morph to instance. |
Properties
Methods
clone()
Clones a MorphInstance. The returned clone uses the same Morph and weights are set to defaults.
Returns
MorphInstanceA clone of the specified MorphInstance.
destroy()
Frees video memory allocated by this object.
getWeight(key)
Gets current weight of the specified morph target.
Parameters
key | string, number | An identifier for the morph target. Either the weight index or the weight name. |
Returns
numberWeight.
setWeight(key, weight)
Sets weight of the specified morph target.
Parameters
key | string, number | An identifier for the morph target. Either the weight index or the weight name. |
weight | number | Weight. |
update()
Selects active morph targets and prepares morph for rendering. Called automatically by renderer.