MorphTargets

1.2.0+

Wrapper around a native set of morph targets.

Usage 

1const mesh = object.getComponent('mesh');
2const mouthTarget = mesh.morphTargets.getTargetIndex('mouth');
3mesh.setMorphTargetWeight(mouthTarget, 0.5);

.count: number 

Amount of targets in this morph target set.

.getTargetIndex(name: string) ⇒ number 

Get the index for a given target name.

Throws if no target with that name exists.

ParamTypeDescription
namestringName of the target.

.getTargetName(target: number) ⇒ string 

Returns the name of a given target

ParamTypeDescription
targetnumber