Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to render a debug view of a given skeleton

see

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

Hierarchy

  • SkeletonViewer

Index

Constructors

  • 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

autoUpdateBonesMatrices: boolean

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

color: Color3

Gets or sets the color used to render the skeleton

defines the mesh attached to the skeleton

options: Partial<ISkeletonViewerOptions>

is the options for the viewer

renderingGroupId: number

defines the rendering group id to use with the viewer

skeleton: Skeleton

defines the skeleton to render

DISPLAY_LINES: 0 = 0

public Display constants BABYLON.SkeletonViewer.DISPLAY_LINES

DISPLAY_SPHERES: 1 = 1

public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERES

DISPLAY_SPHERE_AND_SPURS: 2 = 2

public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS

Accessors

  • Gets the debugMesh

    Returns null | AbstractMesh | LinesMesh

  • Sets the debugMesh

    Parameters

    Returns void

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

    Returns number

  • Sets the displayMode

    Parameters

    • value: number

    Returns void

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

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

    Returns Boolean

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

    Parameters

    • value: boolean

    Returns void

  • Gets the Scene.

    Returns Scene

Methods

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

    Parameters

    • mode: number

      The displayMode numerical value

    Returns void

  • 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

  • dispose(): void
  • Release associated resources

    Returns void

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

    Returns void

  • public static method to create a BoneWeight Shader

    Parameters

    Returns ShaderMaterial

    The created ShaderMaterial

Legend

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

Settings

Theme