Capítulo 324 de 859

Chapter 324: GridHelper

Core Idea

The helper is an object to define grids. Grids are two-dimensional arrays of lines.

Code Examples

const size = 10;
const divisions = 10;
const gridHelper = new THREE.GridHelper( size, divisions );
scene.add( gridHelper );
  • What it demonstrates: Typical usage of GridHelper.

Reference Tables

Constructor

Signature
`new GridHelper( size : number, divisions : number, color1 : number

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.

Key Takeaways

  1. GridHelper extends: EventDispatcher → Object3D → Line → LineSegments
  2. Key methods: dispose.

Connects To

  • EventDispatcher: parent class
  • Object3D: parent class
  • Line: parent class
  • LineSegments: parent class
  • Source: src/helpers/GridHelper.js