API Reference

Class List

MorphTarget

A Morph Target (also known as Blend Shape) contains deformation data to apply to existing mesh. Multiple morph targets can be blended together on a mesh. This is useful for effects that are hard to achieve with conventional animation and skinning.

Summary

Properties

defaultWeight

The default weight of the morph target.

name

The name of the morph target.

used

A used flag.

Methods

clone

Returns an identical copy of the specified morph target.

Details

Constructor

MorphTarget(options)

Create a new MorphTarget instance.

Parameters

optionsobject

Object for passing optional arguments.

options.deltaPositionsArrayBuffer

An array of 3-dimensional vertex position offsets.

options.deltaPositionsTypenumber

A format to store position offsets inside VertexBuffer. Defaults to TYPE_FLOAT32 if not provided.

options.deltaNormalsArrayBuffer

An array of 3-dimensional vertex normal offsets.

options.deltaNormalsTypenumber

A format to store normal offsets inside VertexBuffer. Defaults to TYPE_FLOAT32 if not provided.

options.namestring

Name.

options.aabbBoundingBox

Bounding box. Will be automatically generated, if undefined.

options.defaultWeightnumber

Default blend weight to use for this morph target.

options.preserveDataboolean

When true, the morph target keeps its data passed using the options, allowing the clone operation.

Properties

numberdefaultWeight

The default weight of the morph target.

stringname

The name of the morph target.

booleanused

A used flag. A morph target can be used / owned by the Morph class only one time.

Methods

clone()

Returns an identical copy of the specified morph target. This can only be used if the morph target was created with options.preserveData set to true.

Returns

MorphTarget

A morph target instance containing the result of the cloning.