MorphTargetChannel

MorphTargetChannel class

A MorphTargetChannel is used by MorphTargetDeformer to organize the target geometries. Some file formats like FBX support multiple channels in parallel. Weight is between 0 and 1.0, and default weight for target is 0.0;

Properties

NameDescription
DEFAULT_WEIGHTDefault weight for morph target.

Methods

constructor

NameDescription
constructor(name)Initializes a new instance of the MorphTargetChannel class.

Parameters:

NameTypeDescription
nameStringName.

Result:


constructor_overload

NameDescription
constructor_overload()Initializes a new instance of the MorphTargetChannel class.

Result:


getWeights

NameDescription
getWeights()Gets the full weight values of target geometries. The full weights.

Result:


getChannelWeight

NameDescription
getChannelWeight()Gets or sets the deformer weight of this channel. The weight is between 0.0 and 1.0

Result:


setChannelWeight

NameDescription
setChannelWeight(value)Gets or sets the deformer weight of this channel. The weight is between 0.0 and 1.0

Result:


getTargets

NameDescription
getTargets()Gets all targets associated with the channel.

Result:


getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


get

NameDescription
get(target)

Result:


set

NameDescription
set(target, value)

Result:


getWeight

NameDescription
getWeight(target)Gets the weight for the specified target, if the target is not belongs to this channel, default value 0 is returned.

Parameters:

NameTypeDescription
targeShapenull

Result: Number


setWeight

NameDescription
setWeight(target, weight)Sets the weight for the specified target, default value is 1, range should between 0~1

Parameters:

NameTypeDescription
targeShapenull
weighNumbernull

Result: Number


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

NameDescription
findProperty(propertyName)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property