API Reference

Class List

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

morphMorph

The Morph to instance.

Properties

Morphmorph

The morph with its targets, which is being instanced.

Methods

clone()

Clones a MorphInstance. The returned clone uses the same Morph and weights are set to defaults.

Returns

MorphInstance

A clone of the specified MorphInstance.

destroy()

Frees video memory allocated by this object.

getWeight(key)

Gets current weight of the specified morph target.

Parameters

keystring, number

An identifier for the morph target. Either the weight index or the weight name.

Returns

number

Weight.

setWeight(key, weight)

Sets weight of the specified morph target.

Parameters

keystring, number

An identifier for the morph target. Either the weight index or the weight name.

weightnumber

Weight.

update()

Selects active morph targets and prepares morph for rendering. Called automatically by renderer.