API Reference

Class List

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)

Parameters

morphMorph

The Morph to instance.

Properties

MeshInstancemeshInstance

The mesh instance this morph instance controls the morphing of.

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(index)

Gets current weight of the specified morph target.

Parameters

indexnumber

An index of morph target.

Returns

number

Weight.

setWeight(index, weight)

Sets weight of the specified morph target.

Parameters

indexnumber

An index of morph target.

weightnumber

Weight.

update()

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