API

Class SkeletonViewer

Class used to render a debug view of a given skeleton

Index
autoUpdateBonesMatrices: boolean = true

[true] 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> = {}

[Object] is the options for the viewer

renderingGroupId: number = 2

[2] defines the rendering group id to use with the viewer

skeleton: Skeleton

defines the skeleton to render

DISPLAY_LINES: 0

public Display constants BABYLON.SkeletonViewer.DISPLAY_LINES

DISPLAY_SPHERE_AND_SPURS: 2

public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERE_AND_SPURS

DISPLAY_SPHERES: 1

public Display constants BABYLON.SkeletonViewer.DISPLAY_SPHERES

  • 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 | boolean

      The numerical option value

    Returns void