MorphInstance
An instance of Morph. Contains weights to assign to every MorphTarget, manages selection of active morph targets.
Summary
Properties
meshInstance | The mesh instance this morph instance controls the morphing of. |
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(index)
Gets current weight of the specified morph target.
Parameters
index | number | An index of morph target. |
Returns
numberWeight.
setWeight(index, weight)
Sets weight of the specified morph target.
Parameters
index | number | An index of morph target. |
weight | number | Weight. |
update()
Selects active morph targets and prepares morph for rendering. Called automatically by renderer.