Class: MorphTarget

MorphTarget

MorphTarget defines the displacements per vertex that can be used to displace a Mesh. This can be used to animate vertices between different poses. Several MorphTargets can be used in a MorphPose or through a component such as MorphAnimation A MorphTarget describes the offsets for a whole Model, so several sets might be present (one for each Mesh).


new MorphTarget()

Author:
  • derschmale <http://www.derschmale.com>
See:

Members


hasNormals

Indicates whether or not vertex normals are provided in the morph target initialisation.

Methods


init(meshIndex, positions, normals)

Initializes the current MorphTarget object.

Parameters:
Name Type Description
meshIndex number

The meshIndex for which to assign the vertices.

positions Array

An Array of 3 floats per vertex (x, y, z), containing the displacement vectors. The size must match the vertex count of the target Mesh.

normals Array

An Array of 3 floats per vertex (x, y, z), containing the normal offset vectors. The size must match the vertex count of the target Mesh.