Capítulo 325 de 859

Chapter 325: OctreeHelper

Core Idea

A helper for visualizing an Octree.

Key Concepts

  • color : number | Color | string: The helper's color.
  • octree : Octree: The octree to visualize.

Code Examples

const helper = new OctreeHelper( octree );
scene.add( helper );
  • What it demonstrates: Typical usage of OctreeHelper.

Reference Tables

Constructor

Signature
`new OctreeHelper( octree : Octree, color : number

Properties

PropertyDescription
`.color : numberColor
.octree : OctreeThe octree to visualize.

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.
.update()Updates the helper. This method must be called whenever the Octree's structure is changed.

Key Takeaways

  1. OctreeHelper extends: EventDispatcher → Object3D → Line → LineSegments
  2. Most relevant properties: color, octree.
  3. Key methods: dispose, update.

Connects To