CLASSES
TagsA - Z

Bone

Description

class Bone extends Node

Constructor

new Bone(name, skeleton, parentBone, matrix, restPose)

Parameters

Name Type Description
name string Name of the bone
skeleton Skeleton The skeleton the bone belongs to
parentBone Bone The parent bone of this bone
matrix Matrix The update matrix

Members

name : string

The bone name

children : Bone[]

Children bones array

animations : Animation[]

Animations of this bone

length : number

Methods

getParent() Bone

Get the parent bone

getLocalMatrix() Matrix

Get the local matrix

getBaseMatrix() Matrix

Get the base matrix

getRestPose() Matrix

returnToRest() void

getWorldMatrix() Matrix

Get the world matrix

getInvertedAbsoluteTransform() Matrix

Get the inverted absolute transform

getAbsoluteTransform() Matrix

updateMatrix(matrix, updateDifferenceMatrix) void

Parameters

Name Type Description
matrix Matrix The update matrix
optional updateDifferenceMatrix boolean

markAsDirty() void

copyAnimationRange(source, rangeName, frameOffset, rescaleAsRequired, skelDimensionsRatio) boolean

Parameters

Name Type Description
source Bone
rangeName string
frameOffset number
optional rescaleAsRequired boolean

translate(vec, space, mesh) void

Parameters

Name Type Description
vec Vector3
optional space Space
optional mesh AbstractMesh

setPosition(position, space, mesh) void

Parameters

Name Type Description
position Vector3
optional space Space
optional mesh AbstractMesh

setAbsolutePosition(position, mesh) void

Parameters

Name Type Description
position Vector3
optional mesh AbstractMesh

setScale(x, y, z, scaleChildren) void

Parameters

Name Type Description
x number
y number
z number

scale(x, y, z, scaleChildren) void

Parameters

Name Type Description
x number
y number
z number

setYawPitchRoll(yaw, pitch, roll, space, mesh) void

Parameters

Name Type Description
yaw number
pitch number
roll number
optional space Space

rotate(axis, amount, space, mesh) void

Parameters

Name Type Description
axis Vector3
amount number
optional space Space

setAxisAngle(axis, angle, space, mesh) void

Parameters

Name Type Description
axis Vector3
angle number
optional space Space

setRotation(rotation, space, mesh) void

Parameters

Name Type Description
rotation Vector3
optional space Space
optional mesh AbstractMesh

setRotationQuaternion(quat, space, mesh) void

Parameters

Name Type Description
quat Quaternion
optional space Space
optional mesh AbstractMesh

setRotationMatrix(rotMat, space, mesh) void

Parameters

Name Type Description
rotMat Matrix
optional space Space
optional mesh AbstractMesh

getScale() Vector3

getScaleToRef(result) void

Parameters

Name Type Description
result Vector3

getPosition(space, mesh) Vector3

Parameters

Name Type Description
optional space Space
optional mesh AbstractMesh

getPositionToRef(space, mesh, result) void

Parameters

Name Type Description
space Space
mesh AbstractMesh
result Vector3

getAbsolutePosition(mesh) Vector3

Parameters

Name Type Description
optional mesh AbstractMesh

getAbsolutePositionToRef(mesh, result) void

Parameters

Name Type Description
mesh AbstractMesh
result Vector3

computeAbsoluteTransforms() void

getDirection(localAxis, mesh) Vector3

Parameters

Name Type Description
localAxis Vector3
optional mesh AbstractMesh

getDirectionToRef(localAxis, mesh, result) void

Parameters

Name Type Description
localAxis Vector3
mesh AbstractMesh
result Vector3

getRotation(space, mesh) Vector3

Parameters

Name Type Description
optional space Space
optional mesh AbstractMesh

getRotationToRef(space, mesh, result) void

Parameters

Name Type Description
space Space
mesh AbstractMesh
result Vector3

getRotationQuaternion(space, mesh) Quaternion

Parameters

Name Type Description
optional space Space
optional mesh AbstractMesh

getRotationQuaternionToRef(space, mesh, result) void

Parameters

Name Type Description
space Space
mesh AbstractMesh
result Quaternion

getRotationMatrix(space, mesh) Matrix

Parameters

Name Type Description
space Space
mesh AbstractMesh

getRotationMatrixToRef(space, mesh, result) void

Parameters

Name Type Description
space Space
mesh AbstractMesh
result Matrix

getAbsolutePositionFromLocal(position, mesh) Vector3

Parameters

Name Type Description
position Vector3
optional mesh AbstractMesh

getAbsolutePositionFromLocalToRef(position, mesh, result) void

Parameters

Name Type Description
position Vector3
mesh AbstractMesh
result Vector3

getLocalPositionFromAbsolute(position, mesh) Vector3

Parameters

Name Type Description
position Vector3
optional mesh AbstractMesh

getLocalPositionFromAbsoluteToRef(position, mesh, result) void

Parameters

Name Type Description
position Vector3
mesh AbstractMesh
result Vector3