Class Skeleton
Hierarchy
- Skeleton
Implements
Index
Constructors
Properties
Accessors
Methods
- begin
Animation - clone
- compute
Absolute Transforms - copy
Animation Range - create
Animation Range - delete
Animation Range - dispose
- enable
Blending - get
Animatables - get
Animation Range - get
Animation Ranges - get
Bone Index ByName - get
Children - get
Class Name - get
Pose Matrix - get
Scene - get
Transform Matrices - get
Transform Matrix Texture - prepare
- return
ToRest - serialize
- set
Current Pose AsRest - sort
Bones - to
String - Make
Animation Additive - Parse
Constructors
constructor
Properties
animationsSearch playground for animations
Gets the list of animations attached to this skeleton
bonesSearch playground for bones
Defines the list of child bones
dimensions AtRestSearch playground for dimensionsAtRest
Defines an estimate of the dimension of the skeleton at rest
do Not SerializeSearch playground for doNotSerialize
Specifies if the skeleton should be serialized
idSearch playground for id
defines the skeleton Id
inspectable Custom PropertiesSearch playground for inspectableCustomProperties
List of inspectable custom properties (used by the Inspector)
nameSearch playground for name
defines the skeleton name
need Initial Skin MatrixSearch playground for needInitialSkinMatrix
Defines a boolean indicating if the root matrix is provided by meshes or by the current skeleton (this is the default value)
on Before Compute ObservableSearch playground for onBeforeComputeObservable
An observable triggered before computing the skeleton's matrices
override MeshSearch playground for overrideMesh
Defines a mesh that override the matrix used to get the world matrix (null by default).
Accessors
animation Properties Override
-
Gets or sets the animation properties override
Returns Nullable<AnimationPropertiesOverride>
-
Gets or sets the animation properties override
Parameters
-
value: Nullable<AnimationPropertiesOverride>
Returns any
-
is Using Texture For Matrices
-
Gets a boolean indicating that the skeleton effectively stores matrices into a texture
Returns boolean
unique Id
-
Gets the unique ID of this skeleton
Returns number
use Texture ToStore Bone Matrices
-
Gets or sets a boolean indicating that bone matrices should be stored as a texture instead of using shader uniforms (default is true). Please note that this option is not available if the hardware does not support it
Returns boolean
-
Gets or sets a boolean indicating that bone matrices should be stored as a texture instead of using shader uniforms (default is true). Please note that this option is not available if the hardware does not support it
Parameters
-
value: boolean
Returns any
-
Methods
begin AnimationSearch playground for beginAnimation
-
Begin a specific animation range
Parameters
-
name: string
defines the name of the range to start
-
Optional loop: boolean
defines if looping must be turned on (false by default)
-
Optional speedRatio: number
defines the speed ratio to apply (1 by default)
-
Optional onAnimationEnd: () => void
defines a callback which will be called when animation will end
-
-
Returns void
-
-
Returns Nullable<Animatable>
a new animatable
-
cloneSearch playground for clone
-
Clone the current skeleton
Parameters
-
name: string
defines the name of the new skeleton
-
Optional id: string
defines the id of the new skeleton
Returns Skeleton
the new skeleton
-
compute Absolute TransformsSearch playground for computeAbsoluteTransforms
-
Compute all node absolute transforms
Parameters
-
Optional forceUpdate: boolean
defines if computation must be done even if cache is up to date
Returns void
-
copy Animation RangeSearch playground for copyAnimationRange
-
Copy animation range from a source skeleton. This is not for a complete retargeting, only between very similar skeleton's with only possible bone length differences
Parameters
-
source: Skeleton
defines the source skeleton
-
name: string
defines the name of the range to copy
-
Optional rescaleAsRequired: boolean
defines if rescaling must be applied if required
Returns boolean
true if operation was successful
-
create Animation RangeSearch playground for createAnimationRange
-
Creater a new animation range
Parameters
-
name: string
defines the name of the range
-
from: number
defines the start key
-
to: number
defines the end key
Returns void
-
delete Animation RangeSearch playground for deleteAnimationRange
-
Delete a specific animation range
Parameters
-
name: string
defines the name of the range
-
Optional deleteFrames: boolean
defines if frames must be removed as well
Returns void
-
disposeSearch playground for dispose
-
Releases all resources associated with the current skeleton
Returns void
enable BlendingSearch playground for enableBlending
-
Enable animation blending for this skeleton
Parameters
-
Optional blendingSpeed: number
defines the blending speed to apply
Returns void
-
get AnimatablesSearch playground for getAnimatables
-
Gets the list of animatables currently running for this skeleton
Returns IAnimatable[]
an array of animatables
get Animation RangeSearch playground for getAnimationRange
-
Gets a specific animation range
Parameters
-
name: string
defines the name of the range to look for
Returns Nullable<AnimationRange>
the requested animation range or null if not found
-
get Animation RangesSearch playground for getAnimationRanges
-
Gets the list of all animation ranges defined on this skeleton
Returns Nullable<AnimationRange>[]
an array
get Bone Index ByNameSearch playground for getBoneIndexByName
-
Get bone's index searching by name
Parameters
-
name: string
defines bone's name to search for
Returns number
the indice of the bone. Returns -1 if not found
-
get ChildrenSearch playground for getChildren
-
Returns an array containing the root bones
Returns Array<Bone>
an array containing the root bones
get Class NameSearch playground for getClassName
-
Gets the current object class name.
Returns string
the class name
get Pose MatrixSearch playground for getPoseMatrix
get SceneSearch playground for getScene
-
Gets the current hosting scene
Returns Scene
a scene object
get Transform MatricesSearch playground for getTransformMatrices
-
Gets the list of transform matrices to send to shaders (one matrix per bone)
Parameters
-
mesh: AbstractMesh
defines the mesh to use to get the root matrix (if needInitialSkinMatrix === true)
Returns Float32Array
a Float32Array containing matrices data
-
get Transform Matrix TextureSearch playground for getTransformMatrixTexture
-
Gets the list of transform matrices to send to shaders inside a texture (one matrix per bone)
Parameters
-
mesh: AbstractMesh
defines the mesh to use to get the root matrix (if needInitialSkinMatrix === true)
Returns Nullable<RawTexture>
a raw texture containing the data
-
prepareSearch playground for prepare
-
Build all resources required to render a skeleton
Returns void
return ToRestSearch playground for returnToRest
-
Forces the skeleton to go to rest pose
Returns void
serializeSearch playground for serialize
-
Serialize the skeleton in a JSON object
Returns any
a JSON object
set Current Pose AsRestSearch playground for setCurrentPoseAsRest
-
Set the current local matrix as the restPose for all bones in the skeleton.
Returns void
sort BonesSearch playground for sortBones
-
Sorts bones per internal index
Returns void
to StringSearch playground for toString
-
Gets a string representing the current skeleton data
Parameters
-
Optional fullDetails: boolean
defines a boolean indicating if we want a verbose version
Returns string
a string representing the current skeleton data
-
Static Make Animation AdditiveSearch playground for MakeAnimationAdditive
-
Convert the keyframes for a range of animation on a skeleton to be relative to a given reference frame.
Parameters
-
skeleton: Skeleton
defines the Skeleton containing the animation range to convert
-
referenceFrame: number | undefined
defines the frame that keyframes in the range will be relative to
-
range: string
defines the name of the AnimationRange belonging to the Skeleton to convert
Returns Nullable<Skeleton>
the original skeleton
-
Class used to handle skinning animations
https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons