MorphTarget

Defines a target to use with MorphTargetManager

see

http://doc.babylonjs.com/how_to/how_to_use_morphtargets

Hierarchy

  • MorphTarget

Implements

Index

Constructors

constructor

  • new MorphTarget(name: string, influence?: number): MorphTarget
  • Creates a new MorphTarget

    Parameters

    • name: string

      defines the name of the target

    • Optional influence: number

      defines the influence to use

    Returns MorphTarget

Properties

animations

animations: Animation[]

Gets or sets the list of animations

hasNormals

hasNormals: boolean

Gets a boolean defining if the target contains normal data

hasPositions

hasPositions: boolean

Gets a boolean defining if the target contains position data

hasTangents

hasTangents: boolean

Gets a boolean defining if the target contains tangent data

influence

influence: number

Gets or sets the influence of this target (ie. its weight in the overall morphing)

name

name: string

defines the name of the target

onInfluenceChanged

onInfluenceChanged: Observable<boolean>

Observable raised when the influence changes

Methods

getNormals

  • Gets the normal data stored in this target

    Returns Nullable<FloatArray>

    a FloatArray containing the normal data (or null if not present)

getPositions

  • Gets the position data stored in this target

    Returns Nullable<FloatArray>

    a FloatArray containing the position data (or null if not present)

getTangents

  • Gets the tangent data stored in this target

    Returns Nullable<FloatArray>

    a FloatArray containing the tangent data (or null if not present)

serialize

  • serialize(): any
  • Serializes the current target into a Serialization object

    Returns any

    the serialized object

setNormals

  • Affects normal data to this target

    Parameters

    Returns void

setPositions

  • Affects position data to this target

    Parameters

    Returns void

setTangents

  • Affects tangent data to this target

    Parameters

    Returns void

Static FromMesh

  • Creates a MorphTarget from mesh data

    Parameters

    • mesh: AbstractMesh

      defines the source mesh

    • Optional name: string

      defines the name to use for the new target

    • Optional influence: number

      defines the influence to attach to the target

    Returns MorphTarget

    a new MorphTarget

Static Parse

  • Creates a new target from serialized data

    Parameters

    • serializationObject: any

      defines the serialized data to use

    Returns MorphTarget

    a new MorphTarget

Generated using TypeDoc