Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

  • Create a new bone

    Parameters

    • name: string

      defines the bone name

    • skeleton: Skeleton

      defines the parent skeleton

    • Optional parentBone: Nullable<Bone>

      defines the parent (can be null if the bone is the root)

    • Optional localMatrix: Nullable<Matrix>

      defines the local matrix (default: identity)

    • Optional restMatrix: Nullable<Matrix>

      defines the rest matrix (default: localMatrix)

    • Optional bindMatrix: Nullable<Matrix>

      defines the bind matrix (default: localMatrix)

    • Optional index: Nullable<number>

      defines index of the bone in the hierarchy (default: null)

    Returns Bone

Properties

animations: Animation[]

Gets the animations associated with this bone

children: Bone[]

Gets the list of child bones

id: string

Gets or sets the id of the node

inspectableCustomProperties: IInspectable[]

List of inspectable custom properties (used by the Inspector)

see

https://doc.babylonjs.com/toolsAndResources/inspector#extensibility

length: number

Gets or sets bone length

metadata: any

Gets or sets an object used to store user defined information for the node

name: string

defines the bone name

onAccessibilityTagChangedObservable: Observable<Nullable<IAccessibilityTag>>
onDisposeObservable: Observable<Node>

An event triggered when the mesh is disposed

onReady: Nullable<((node: Node) => void)>

Callback raised when the node is ready to be used

reservedDataStore: any

For internal use only. Please do not use.

state: string

Gets or sets a string used to store user defined state for the node

uniqueId: number

Gets or sets the unique id of the node

Accessors

  • Gets or sets the accessibility tag to describe the node for accessibility purpose.

    Returns Nullable<IAccessibilityTag>

  • Gets or sets the accessibility tag to describe the node for accessibility purpose.

    Parameters

    Returns void

  • get doNotSerialize(): boolean
  • set doNotSerialize(value: boolean): void
  • Gets or sets a boolean used to define if the node must be serialized

    Returns boolean

  • Gets or sets a boolean used to define if the node must be serialized

    Parameters

    • value: boolean

    Returns void

  • An event triggered when the node is cloned

    Returns Observable<Node>

  • set onDispose(callback: (() => void)): void
  • Sets a callback that will be raised when the node will be disposed

    Parameters

    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • get onEnabledStateChangedObservable(): Observable<boolean>
  • An event triggered when the enabled state of the node changes

    Returns Observable<boolean>

  • Returns Bone

  • Parameters

    Returns void

  • Gets or sets current position (in local space)

    Returns Vector3

  • Gets or sets current position (in local space)

    Parameters

    Returns void

  • Gets or sets current rotation (in local space)

    Returns Vector3

  • Gets or sets current rotation (in local space)

    Parameters

    Returns void

  • Gets or sets current rotation quaternion (in local space)

    Returns Quaternion

  • Gets or sets current rotation quaternion (in local space)

    Parameters

    Returns void

  • Gets or sets current scaling (in local space)

    Returns Vector3

  • Gets or sets current scaling (in local space)

    Parameters

    Returns void

  • get worldMatrixFromCache(): Matrix
  • Returns directly the latest state of the mesh World matrix. A Matrix is returned.

    Returns Matrix

Methods

  • beginAnimation(name: string, loop?: boolean, speedRatio?: number, onAnimationEnd?: (() => void)): Nullable<Animatable>
  • Will start the animation sequence

    Parameters

    • name: string

      defines the range frames for animation sequence

    • Optional loop: boolean

      defines if the animation should loop (false by default)

    • Optional speedRatio: number

      defines the speed factor in which to run the animation (1 by default)

    • Optional onAnimationEnd: (() => void)

      defines a function to be executed when the animation ended (undefined by default)

        • (): void
        • Returns void

    Returns Nullable<Animatable>

    the object created for this animation. If range does not exist, it will return null

  • Clone the current node

    Parameters

    • name: string

      Name of the new clone

    • newParent: Nullable<Node>

      New parent for the clone

    • Optional doNotCloneChildren: boolean

      Do not clone children hierarchy

    Returns Nullable<Node>

    the new transform node

  • computeAbsoluteMatrices(): void
  • Compute the absolute matrices of this bone and its children

    Returns void

  • computeAbsoluteTransforms(): void
  • Compute the absolute matrices of this bone and its children

    deprecated

    Please use computeAbsoluteMatrices instead

    Returns void

  • computeWorldMatrix(_force?: boolean): Matrix
  • Computes the world matrix of the node

    Parameters

    • Optional _force: boolean

      defines if the cache version should be invalidated forcing the world matrix to be created from scratch

    Returns Matrix

    the world matrix

  • copyAnimationRange(source: Bone, rangeName: string, frameOffset: number, rescaleAsRequired: boolean, skelDimensionsRatio: Nullable<Vector3>): boolean
  • Copy an animation range from another bone

    Parameters

    • source: Bone

      defines the source bone

    • rangeName: string

      defines the range name to copy

    • frameOffset: number

      defines the frame offset

    • rescaleAsRequired: boolean

      defines if rescaling must be applied if required

    • skelDimensionsRatio: Nullable<Vector3>

      defines the scaling ratio

    Returns boolean

    true if operation was successful

  • createAnimationRange(name: string, from: number, to: number): void
  • Creates an animation range for this node

    Parameters

    • name: string

      defines the name of the range

    • from: number

      defines the starting key

    • to: number

      defines the end key

    Returns void

  • deleteAnimationRange(name: string, deleteFrames?: boolean): void
  • Delete a specific animation range

    Parameters

    • name: string

      defines the name of the range to delete

    • Optional deleteFrames: boolean

      defines if animation frames from the range must be deleted as well

    Returns void

  • dispose(doNotRecurse?: boolean, disposeMaterialAndTextures?: boolean): void
  • Releases resources associated with this node.

    Parameters

    • Optional doNotRecurse: boolean

      Set to true to not recurse into each children (recurse into each children by default)

    • Optional disposeMaterialAndTextures: boolean

      Set to true to also dispose referenced materials and textures (false by default)

    Returns void

  • getAbsoluteInverseBindMatrix(): Matrix
  • Gets the inverse of the bind matrix, in world space (relative to the skeleton root)

    Returns Matrix

    the inverse bind matrix, in world space

  • Gets the bone matrix, in world space (relative to the skeleton root)

    Returns Matrix

    the bone matrix, in world space

  • Get the absolute position of the bone (world space)

    Parameters

    • Optional tNode: Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns Vector3

    The absolute position of the bone

  • Get the world position of a point that is in the local space of the bone

    Parameters

    • position: Vector3

      The local position

    • Optional tNode: Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns Vector3

    The world position

  • Get the world position of a point that is in the local space of the bone and copy it to the result param

    Parameters

    • position: Vector3

      The local position

    • tNode: undefined | Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    • result: Vector3

      The vector3 that the world position should be copied to

    Returns void

  • Copy the absolute position of the bone (world space) to the result param

    Parameters

    • tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    • result: Vector3

      The vector3 to copy the absolute position to

    Returns void

  • getAbsoluteTransform(): Matrix
  • Gets the bone matrix, in world space (relative to the skeleton root)

    deprecated

    Please use getAbsoluteMatrix instead

    Returns Matrix

    the bone matrix, in world space

  • Get an animation by name

    Parameters

    • name: string

      defines the name of the animation to look for

    Returns Nullable<Animation>

    null if not found else the requested animation

  • Get an animation range by name

    Parameters

    • name: string

      defines the name of the animation range to look for

    Returns Nullable<AnimationRange>

    null if not found else the requested animation range

  • Gets the bind matrix.

    deprecated

    Please use getBindMatrix instead

    Returns Matrix

    the bind matrix

  • Gets the bind matrix

    Returns Matrix

    the bind matrix

  • Gets the bind matrix

    deprecated

    Please use getBindMatrix instead

    Returns Matrix

    the bind matrix

  • getChildMeshes<T>(directDescendantsOnly?: boolean, predicate?: ((node: Node) => node is T)): T[]
  • getChildMeshes(directDescendantsOnly?: boolean, predicate?: ((node: Node) => boolean)): AbstractMesh[]
  • Get all child-meshes of this node

    Type Parameters

    Parameters

    • Optional directDescendantsOnly: boolean

      defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)

    • Optional predicate: ((node: Node) => node is T)

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • (node: Node): node is T
        • Parameters

          Returns node is T

    Returns T[]

    an array of AbstractMesh

  • Get all child-meshes of this node

    Parameters

    • Optional directDescendantsOnly: boolean

      defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered (Default: false)

    • Optional predicate: ((node: Node) => boolean)

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • (node: Node): boolean
        • Parameters

          Returns boolean

    Returns AbstractMesh[]

    an array of AbstractMesh

  • getChildren(): Bone[]
  • Returns an array containing the children of the bone

    Returns Bone[]

    an array containing the children of the bone (can be empty if the bone has no children)

  • getClassName(): string
  • Gets the current object class name.

    Returns string

    the class name

  • getDescendants<T>(directDescendantsOnly?: boolean, predicate?: ((node: Node) => node is T)): T[]
  • getDescendants(directDescendantsOnly?: boolean, predicate?: ((node: Node) => boolean)): Node[]
  • Will return all nodes that have this node as ascendant

    Type Parameters

    Parameters

    • Optional directDescendantsOnly: boolean

      defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered

    • Optional predicate: ((node: Node) => node is T)

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • (node: Node): node is T
        • Parameters

          Returns node is T

    Returns T[]

    all children nodes of all types

  • Will return all nodes that have this node as ascendant

    Parameters

    • Optional directDescendantsOnly: boolean

      defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered

    • Optional predicate: ((node: Node) => boolean)

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • (node: Node): boolean
        • Parameters

          Returns boolean

    Returns Node[]

    all children nodes of all types

  • Get the world direction from an axis that is in the local space of the bone

    Parameters

    • localAxis: Vector3

      The local direction that is used to compute the world direction

    • Optional tNode: Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns Vector3

    The world direction

  • Copy the world direction to a vector3 from an axis that is in the local space of the bone

    Parameters

    • localAxis: Vector3

      The local direction that is used to compute the world direction

    • tNode: undefined | Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    • result: Vector3

      The vector3 that the world direction will be copied to

    Returns void

  • Gets the engine of the node

    Returns Engine

    a Engine

  • Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)

    Returns Matrix

  • Return the minimum and maximum world vectors of the entire hierarchy under current node

    Parameters

    • Optional includeDescendants: boolean

      Include bounding info from descendants as well (true by default)

    • Optional predicate: Nullable<((abstractMesh: AbstractMesh) => boolean)>

      defines a callback function that can be customize to filter what meshes should be included in the list used to compute the bounding vectors

    Returns { max: Vector3; min: Vector3 }

    the new bounding vectors

  • getIndex(): number
  • Gets the node index in matrix array generated for rendering

    Returns number

    the node index

  • getInvertedAbsoluteTransform(): Matrix
  • Gets the inverse of the bind matrix, in world space (relative to the skeleton root)

    deprecated

    Please use getAbsoluteInverseBindMatrix instead

    Returns Matrix

    the inverse bind matrix, in world space

  • Gets the local matrix

    Returns Matrix

    the local matrix

  • Get the local position of a point that is in world space

    Parameters

    • position: Vector3

      The world position

    • Optional tNode: Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns Vector3

    The local position

  • Get the local position of a point that is in world space and copy it to the result param

    Parameters

    • position: Vector3

      The world position

    • tNode: undefined | Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    • result: Vector3

      The vector3 that the local position should be copied to

    Returns void

  • Gets parent bone

    Returns Nullable<Bone>

    a bone or null if the bone is the root of the bone hierarchy

  • Get the position of the bone in local or world space

    Parameters

    • Optional space: Space

      The space that the returned position is in

    • Optional tNode: Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns Vector3

    The position of the bone

  • Copy the position of the bone to a vector3 in local or world space

    Parameters

    • space: undefined | Space

      The space that the returned position is in

    • tNode: Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    • result: Vector3

      The vector3 to copy the position to

    Returns void

  • Gets the rest matrix

    Returns Matrix

    the rest matrix

  • Gets the rest matrix

    deprecated

    Please use getRestMatrix instead

    Returns Matrix

    the rest matrix

  • Get the euler rotation of the bone in local or world space

    Parameters

    • Optional space: Space

      The space that the rotation should be in

    • Optional tNode: Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns Vector3

    The euler rotation

  • Get the rotation matrix of the bone in local or world space

    Parameters

    • space: undefined | Space

      The space that the rotation should be in

    • tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns Matrix

    The rotation matrix

  • Copy the rotation matrix of the bone to a matrix. The rotation can be in either local or world space

    Parameters

    • space: undefined | Space

      The space that the rotation should be in

    • tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    • result: Matrix

      The quaternion that the rotation should be copied to

    Returns void

  • Get the quaternion rotation of the bone in either local or world space

    Parameters

    • Optional space: Space

      The space that the rotation should be in

    • Optional tNode: Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns Quaternion

    The quaternion rotation

  • Copy the quaternion rotation of the bone to a quaternion. The rotation can be in either local or world space

    Parameters

    • space: undefined | Space

      The space that the rotation should be in

    • tNode: undefined | Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    • result: Quaternion

      The quaternion that the rotation should be copied to

    Returns void

  • Copy the euler rotation of the bone to a vector3. The rotation can be in either local or world space

    Parameters

    • space: undefined | Space

      The space that the rotation should be in

    • tNode: undefined | Nullable<TransformNode>

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    • result: Vector3

      The vector3 that the rotation should be copied to

    Returns void

  • Gets the current scaling in local space

    Returns Vector3

    the current scaling vector

  • getScaleToRef(result: Vector3): void
  • Gets the current scaling in local space and stores it in a target vector

    Parameters

    • result: Vector3

      defines the target vector

    Returns void

  • Gets the scene of the node

    Returns Scene

    a scene

  • Gets the parent skeleton

    Returns Skeleton

    a skeleton

  • Gets the node used to drive the bone's transformation

    Returns Nullable<TransformNode>

    a transform node or null

  • Gets the matrix used to store the final world transformation of the bone (ie. the matrix sent to shaders)

    deprecated

    Please use getFinalMatrix instead

    Returns Matrix

  • isDescendantOf(ancestor: Node): boolean
  • Is this node a descendant of the given node? The function will iterate up the hierarchy until the ancestor was found or no more parents defined

    Parameters

    • ancestor: Node

      defines the parent node to inspect

    Returns boolean

    a boolean indicating if this node is a descendant of the given node

  • isDisposed(): boolean
  • Gets a boolean indicating if the node has been disposed

    Returns boolean

    true if the node was disposed

  • isEnabled(checkAncestors?: boolean): boolean
  • Is this node enabled? If the node has a parent, all ancestors will be checked and false will be returned if any are false (not enabled), otherwise will return true

    Parameters

    • Optional checkAncestors: boolean

      indicates if this method should check the ancestors. The default is to check the ancestors. If set to false, the method will return the value of this node without checking ancestors

    Returns boolean

    whether this node (and its parent) is enabled

  • isReady(_completeCheck?: boolean): boolean
  • Is this node ready to be used/rendered

    Parameters

    • Optional _completeCheck: boolean

      defines if a complete check (including materials and lights) has to be done (false by default)

    Returns boolean

    true if the node is ready

  • Links with the given transform node. The local matrix of this bone is overwritten by the transform of the node every frame.

    Parameters

    Returns void

  • Flag the bone as dirty (Forcing it to update everything)

    Returns Bone

    this bone

  • returnToRest(): void
  • Sets the local matrix to the rest matrix

    Returns void

  • Add a rotation to the bone on an axis in local or world space

    Parameters

    • axis: Vector3

      The axis to rotate the bone on

    • amount: number

      The amount to rotate the bone

    • Optional space: Space

      The space that the axis is in

    • Optional tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns void

  • scale(x: number, y: number, z: number, scaleChildren?: boolean): void
  • Scale the bone on the x, y and z axes (in local space)

    Parameters

    • x: number

      The amount to scale the bone on the x axis

    • y: number

      The amount to scale the bone on the y axis

    • z: number

      The amount to scale the bone on the z axis

    • Optional scaleChildren: boolean

      sets this to true if children of the bone should be scaled as well (false by default)

    Returns void

  • serializeAnimationRanges(): any
  • Serialize animation ranges into a JSON compatible object

    Returns any

    serialization object

  • Set the absolute position of the bone (world space)

    Parameters

    • position: Vector3

      The position to set the bone

    • Optional tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns void

  • Set the rotation of the bone to a particular axis angle in local or world space

    Parameters

    • axis: Vector3

      The axis to rotate the bone on

    • angle: number

      The angle that the bone should be rotated to

    • Optional space: Space

      The space that the axis is in

    • Optional tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns void

  • setBindMatrix(matrix: Matrix): void
  • Sets the bind matrix This will trigger a recomputation of the absolute bind and absolute inverse bind matrices for this bone and its children Note that the local matrix will also be set with the matrix passed in parameter!

    Parameters

    • matrix: Matrix

      the local-space bind matrix to set for this bone

    Returns void

  • setBindPose(matrix: Matrix): void
  • Sets the bind matrix

    deprecated

    Please use setBindMatrix instead

    Parameters

    • matrix: Matrix

      the local-space bind to set for this bone

    Returns void

  • setCurrentPoseAsRest(): void
  • Set the current local matrix as the restMatrix for this bone.

    Returns void

  • setEnabled(value: boolean): void
  • Set the enabled state of this node

    Parameters

    • value: boolean

      defines the new enabled state

    Returns void

  • setParent(parent: Nullable<Bone>, updateAbsoluteBindMatrices?: boolean): void
  • Sets the parent bone

    Parameters

    • parent: Nullable<Bone>

      defines the parent (can be null if the bone is the root)

    • Optional updateAbsoluteBindMatrices: boolean

      defines if the absolute bind and absolute inverse bind matrices must be updated

    Returns void

  • Set the position of the bone in local or world space

    Parameters

    • position: Vector3

      The position to set the bone

    • Optional space: Space

      The space that the position is in (default: Space.LOCAL)

    • Optional tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns void

  • setRestMatrix(matrix: Matrix): void
  • Sets the rest matrix

    Parameters

    • matrix: Matrix

      the local-space rest matrix to set for this bone

    Returns void

  • setRestPose(matrix: Matrix): void
  • Sets the rest matrix

    deprecated

    Please use setRestMatrix instead

    Parameters

    • matrix: Matrix

      the local-space rest to set for this bone

    Returns void

  • Set the euler rotation of the bone in local or world space

    Parameters

    • rotation: Vector3

      The euler rotation that the bone should be set to

    • Optional space: Space

      The space that the rotation is in

    • Optional tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns void

  • Set the rotation matrix of the bone in local or world space

    Parameters

    • rotMat: Matrix

      The rotation matrix that the bone should be set to

    • Optional space: Space

      The space that the rotation is in

    • Optional tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns void

  • Set the quaternion rotation of the bone in local or world space

    Parameters

    • quat: Quaternion

      The quaternion rotation that the bone should be set to

    • Optional space: Space

      The space that the rotation is in

    • Optional tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns void

  • Set the bone scaling in local space

    Parameters

    • scale: Vector3

      defines the scaling vector

    Returns void

  • setYawPitchRoll(yaw: number, pitch: number, roll: number, space?: Space, tNode?: TransformNode): void
  • Set the yaw, pitch, and roll of the bone in local or world space

    Parameters

    • yaw: number

      The rotation of the bone on the y axis

    • pitch: number

      The rotation of the bone on the x axis

    • roll: number

      The rotation of the bone on the z axis

    • Optional space: Space

      The space that the axes of rotation are in

    • Optional tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns void

  • Translate the bone in local or world space

    Parameters

    • vec: Vector3

      The amount to translate the bone

    • Optional space: Space

      The space that the translation is in (default: Space.LOCAL)

    • Optional tNode: TransformNode

      A TransformNode whose world matrix is to be applied to the calculated absolute matrix. In most cases, you'll want to pass the mesh associated with the skeleton from which this bone comes. Used only when space=Space.WORLD

    Returns void

  • updateMatrix(bindMatrix: Matrix, updateAbsoluteBindMatrices?: boolean, updateLocalMatrix?: boolean): void
  • Update the bind (and optionally the local) matrix

    Parameters

    • bindMatrix: Matrix

      defines the new matrix to set to the bind/local matrix, in local space

    • Optional updateAbsoluteBindMatrices: boolean

      defines if the absolute bind and absolute inverse bind matrices must be recomputed (default: true)

    • Optional updateLocalMatrix: boolean

      defines if the local matrix should also be updated with the matrix passed in parameter (default: true)

    Returns void

  • Add a new node constructor

    Parameters

    • type: string

      defines the type name of the node to construct

    • constructorFunc: NodeConstructor

      defines the constructor function

    Returns void

  • Construct(type: string, name: string, scene: Scene, options?: any): Nullable<(() => Node)>
  • Returns a node constructor based on type name

    Parameters

    • type: string

      defines the type name

    • name: string

      defines the new node name

    • scene: Scene

      defines the hosting scene

    • Optional options: any

      defines optional options to transmit to constructors

    Returns Nullable<(() => Node)>

    the new constructor or null

  • ParseAnimationRanges(node: Node, parsedNode: any, _scene: Scene): void
  • Parse animation range data from a serialization object and store them into a given node

    Parameters

    • node: Node

      defines where to store the animation ranges

    • parsedNode: any

      defines the serialization object to read data from

    • _scene: Scene

      defines the hosting scene

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Property
  • Method
  • Static method

Settings

Theme