Capítulo 328 de 859

Chapter 328: RapierHelper

Core Idea

This class displays all Rapier Colliders in outline.

Key Concepts

  • world : RAPIER.world: The Rapier world to visualize.

Code Examples

import { RapierHelper } from 'three/addons/helpers/RapierHelper.js';
  • What it demonstrates: Typical usage of RapierHelper.

Reference Tables

Constructor

Signature
new RapierHelper( world : RAPIER.world )

Properties

PropertyDescription
.world : RAPIER.worldThe Rapier world 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()Call this in the render loop to update the outlines.

Key Takeaways

  1. RapierHelper extends: EventDispatcher → Object3D → Line → LineSegments
  2. Most relevant properties: world.
  3. Key methods: dispose, update.

Connects To