Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SkeletonViewer

Class used to render a debug view of a given skeleton

see

http://www.babylonjs-playground.com/#1BZJVJ#8

Hierarchy

  • SkeletonViewer

Index

Constructors

constructor

  • Creates a new SkeletonViewer

    Parameters

    • skeleton: Skeleton

      defines the skeleton to render

    • mesh: 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

autoUpdateBonesMatricesSearch playground for autoUpdateBonesMatrices

autoUpdateBonesMatrices: boolean

defines a boolean indicating if bones matrices must be forced to update before rendering (true by default)

colorSearch playground for color

color: Color3

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

options: Partial<ISkeletonViewerOptions>

is the options for the viewer

renderingGroupIdSearch playground for renderingGroupId

renderingGroupId: number

defines the rendering group id to use with the viewer

skeletonSearch playground for skeleton

skeleton: Skeleton

defines the skeleton to render

Static Readonly DISPLAY_LINESSearch playground for DISPLAY_LINES

DISPLAY_LINES: 0 = 0

public Display constants BABYLON.SkeletonViewer.DISPLAY_LINES

Static Readonly DISPLAY_SPHERESSearch playground for DISPLAY_SPHERES

DISPLAY_SPHERES: 1 = 1

public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERES

Static Readonly DISPLAY_SPHERE_AND_SPURSSearch playground for DISPLAY_SPHERE_AND_SPURS

DISPLAY_SPHERE_AND_SPURS: 2 = 2

public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS

Accessors

debugMesh

displayMode

  • get displayMode(): number
  • set displayMode(value: number): any
  • Gets the displayMode

    Returns number

  • Sets the displayMode

    Parameters

    • value: number

    Returns any

isEnabled

  • get isEnabled(): boolean
  • set isEnabled(value: boolean): any
  • 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 any

isReady

  • get isReady(): Boolean
  • Checks Ready Status.

    Returns Boolean

ready

  • set ready(value: boolean): any
  • Sets Ready Status.

    Parameters

    • value: boolean

    Returns any

scene

  • Gets the Scene.

    Returns Scene

utilityLayer

Methods

changeDisplayModeSearch playground for changeDisplayMode

  • changeDisplayMode(mode: number): void
  • Changes the displayMode of the skeleton viewer

    Parameters

    • mode: number

      The displayMode numerical value

    Returns void

changeDisplayOptionsSearch playground for changeDisplayOptions

  • changeDisplayOptions(option: string, value: number): void
  • Sets a display option of the skeleton viewer

    OptionTypeDefaultDescription
    midStepfloat0.235A percentage between a bone and its child that determines the widest part of a spur. Only used when displayMode is set to DISPLAY_SPHERE_AND_SPURS.
    midStepFactorfloat0.15Mid 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 to DISPLAY_SPHERE_AND_SPURS.
    sphereBaseSizefloat2Sphere base size. Only used when displayMode is set to DISPLAY_SPHERE_AND_SPURS.
    sphereScaleUnitfloat0.865Sphere scale factor used to scale spheres in relation to the longest bone. Only used when displayMode is set to DISPLAY_SPHERE_AND_SPURS.
    spurFollowsChildbooleanfalseWhether a spur should attach its far end to the child bone.
    showLocalAxesbooleanfalseDisplays local axes on all bones.
    localAxesSizefloat0.075Determines 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

  • dispose(): void
  • Release associated resources

    Returns void

updateSearch playground for update

  • update(): void
  • Update the viewer to sync with current skeleton state, only used to manually update.

    Returns void

Static CreateBoneWeightShaderSearch playground for CreateBoneWeightShader

Static CreateSkeletonMapShaderSearch playground for CreateSkeletonMapShader

  • public static method to create a BoneWeight Shader

    Parameters

    Returns ShaderMaterial

    The created ShaderMaterial

Legend

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