Capítulo 330 de 859

Chapter 330: SkeletonHelper

Core Idea

A helper object to assist with visualizing a Skeleton.

Key Concepts

  • bones : Array.<Bone>: The list of bones that the helper visualizes.
  • isSkeletonHelper : boolean (readonly): This flag can be used for type testing.
  • root : Object3D: The object being visualized.

Code Examples

const helper = new THREE.SkeletonHelper( skinnedMesh );
scene.add( helper );
  • What it demonstrates: Typical usage of SkeletonHelper.

Reference Tables

Constructor

Signature
new SkeletonHelper( object : Object3D )

Properties

PropertyDescription
.bones : Array.<Bone>The list of bones that the helper visualizes.
.isSkeletonHelper : boolean (readonly)This flag can be used for type testing.
.root : Object3DThe object being visualized.

Methods

MethodDescription
.dispose()Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
.setColors( color1 : Color, color2 : Color ) : SkeletonHelperDefines the colors of the helper.

Key Takeaways

  1. SkeletonHelper extends: EventDispatcher → Object3D → Line → LineSegments
  2. Most relevant properties: bones, isSkeletonHelper, root.
  3. Key methods: dispose, setColors.

Connects To