Class SkeletonViewer
Hierarchy
- SkeletonViewer
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Creates a new SkeletonViewer
Parameters
skeleton: Skeleton
defines the skeleton to render
mesh: Nullable<AbstractMesh>
defines the mesh attached to the skeleton
scene: Scene
defines the hosting scene
Optional autoUpdateBonesMatrices: boolean
defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)
Optional renderingGroupId: number
defines the rendering group id to use with the viewer
Optional options: Partial<ISkeletonViewerOptions>
All of the extra constructor options for the SkeletonViewer
Returns SkeletonViewer
Properties
auto Update Bones MatricesSearch playground for autoUpdateBonesMatrices
defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)
colorSearch playground for color
Gets or sets the color used to render the skeleton
meshSearch playground for mesh
defines the mesh attached to the skeleton
optionsSearch playground for options
is the options for the viewer
rendering Group IdSearch playground for renderingGroupId
defines the rendering group id to use with the viewer
skeletonSearch playground for skeleton
defines the skeleton to render
Static Readonly DISPLAY_ LINESSearch playground for DISPLAY_LINES
public Display constants BABYLON.SkeletonViewer.DISPLAY_LINES
Static Readonly DISPLAY_ SPHERESSearch playground for DISPLAY_SPHERES
public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERES
Static Readonly DISPLAY_ SPHERE_ AND_ SPURSSearch playground for DISPLAY_SPHERE_AND_SPURS
public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS
Accessors
debug Mesh
Gets the debugMesh
Returns null | AbstractMesh | LinesMesh
Sets the debugMesh
Parameters
value: null | AbstractMesh | LinesMesh
Returns void
display Mode
Gets the displayMode
Returns number
Sets the displayMode
Parameters
value: number
Returns void
is Enabled
Gets or sets a boolean indicating if the viewer is enabled
Returns boolean
Gets or sets a boolean indicating if the viewer is enabled
Parameters
value: boolean
Returns void
is Ready
Checks Ready Status.
Returns Boolean
ready
Sets Ready Status.
Parameters
value: boolean
Returns void
scene
Gets the Scene.
Returns Scene
utility Layer
Gets the utilityLayer.
Returns Nullable<UtilityLayerRenderer>
Methods
change Display ModeSearch playground for changeDisplayMode
Changes the displayMode of the skeleton viewer
Parameters
mode: number
The displayMode numerical value
Returns void
change Display OptionsSearch playground for changeDisplayOptions
Sets a display option of the skeleton viewer
Option Type Default Description midStep float 0.235 A percentage between a bone and its child that determines the widest part of a spur. Only used when displayMode
is set toDISPLAY_SPHERE_AND_SPURS
.midStepFactor float 0.15 Mid step width expressed as a factor of the length. A value of 0.5 makes the spur width half of the spur length. Only used when displayMode
is set toDISPLAY_SPHERE_AND_SPURS
.sphereBaseSize float 2 Sphere base size. Only used when displayMode
is set toDISPLAY_SPHERE_AND_SPURS
.sphereScaleUnit float 0.865 Sphere scale factor used to scale spheres in relation to the longest bone. Only used when displayMode
is set toDISPLAY_SPHERE_AND_SPURS
.spurFollowsChild boolean false Whether a spur should attach its far end to the child bone. showLocalAxes boolean false Displays local axes on all bones. localAxesSize float 0.075 Determines the length of each local axis. Parameters
option: string
String of the option name
value: number
The numerical option value
Returns void
disposeSearch playground for dispose
Release associated resources
Returns void
updateSearch playground for update
Update the viewer to sync with current skeleton state, only used to manually update.
Returns void
Static Create Bone Weight ShaderSearch playground for CreateBoneWeightShader
public static method to create a BoneWeight Shader
Parameters
options: IBoneWeightShaderOptions
The constructor options
scene: Scene
The scene that the shader is scoped to
Returns ShaderMaterial
The created ShaderMaterial
Static Create Skeleton Map ShaderSearch playground for CreateSkeletonMapShader
public static method to create a BoneWeight Shader
Parameters
options: ISkeletonMapShaderOptions
The constructor options
scene: Scene
The scene that the shader is scoped to
Returns ShaderMaterial
The created ShaderMaterial
Class used to render a debug view of a given skeleton
http://www.babylonjs-playground.com/#1BZJVJ#8