CLASSES
TagsA - Z

Skeleton

Description

class Skeleton

Constructor

new Skeleton(name, id, scene)

A skeleton (BABYLON.Skeleton) contains a hierarchy of bones (BABYLON.Bone). All bones can be found into the skeleton.bones array. A tutorial about Bones and Skeletons ban be found here : https://doc.babylonjs.com/How_To/how_to_use_bones_and_skeletons

Parameters

Name Type Description
name string
id string
scene Scene The scene where the skeleton is

Members

name : string

Name of the skeleton

id : string

Name of the skeleton

bones : Bone[]

Array of bones composing the skeleton

dimensionsAtRest : Vector3

needInitialSkinMatrix : boolean

Methods

getTransformMatrices(mesh) Float32Array

Parameters

Name Type Description
mesh AbstractMesh

getScene() Scene

toString(fullDetails) string

Parameters

Name Type Description
optional fullDetails boolean

getBoneIndexByName(name) number

Get bone's index searching by name

@return {number} Indice of the bone. Returns -1 if not found

Parameters

Name Type Description
name string

createAnimationRange(name, from, to) void

Parameters

Name Type Description
name string
from number
to number

deleteAnimationRange(name, deleteFrames) void

Parameters

Name Type Description
name string
optional deleteFrames boolean

getAnimationRange(name) AnimationRange

Parameters

Name Type Description
name string

getAnimationRanges() AnimationRange[]

Returns as an Array, all AnimationRanges defined on this skeleton

copyAnimationRange(source, name, rescaleAsRequired) boolean

note: This is not for a complete retargeting, only between very similar skeleton's with only possible bone length differences

Parameters

Name Type Description
source Skeleton
name string
optional rescaleAsRequired boolean

returnToRest() void

beginAnimation(name, loop, speedRatio, onAnimationEnd) Animatable

Parameters

Name Type Description
name string
optional loop boolean
optional speedRatio number

prepare() void

Prepare bones' skeleton

getAnimatables() IAnimatable[]

Get the animatables of the skeleton

clone(name, id) Skeleton

Parameters

Name Type Description
name string
id string

enableBlending(blendingSpeed) void

Parameters

Name Type Description
optional blendingSpeed number

dispose() void

serialize() any

static Parse(parsedSkeleton, scene) Skeleton

Parameters

Name Type Description
parsedSkeleton any
scene Scene The scene where the skeleton is

computeAbsoluteTransforms(forceUpdate) void

Parameters

Name Type Description
optional forceUpdate boolean

getPoseMatrix() Matrix