Capítulo 333 de 859

Chapter 333: VertexTangentsHelper

Core Idea

Visualizes an object's vertex tangents.

Requires that tangents have been specified in the geometry as a buffer attribute or have been calculated using BufferGeometry#computeTangents.

Key Concepts

  • matrixAutoUpdate : boolean: Overwritten and set to false since the object's world transformation is encoded in the helper's geometry data.
  • object : Object3D: The object for which to visualize vertex tangents.
  • size : number: The helper's size.

Code Examples

const helper = new VertexTangentsHelper( mesh, 1, 0xff0000 );
scene.add( helper );
  • What it demonstrates: Typical usage of VertexTangentsHelper.

Reference Tables

Constructor

Signature
`new VertexTangentsHelper( object : Object3D, size : number, color : number

Properties

PropertyDescription
.matrixAutoUpdate : booleanOverwritten and set to false since the object's world transformation is encoded in the helper's geometry data.
.object : Object3DThe object for which to visualize vertex tangents.
.size : numberThe helper's size.

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 vertex normals preview based on the object's world transform.

Key Takeaways

  1. VertexTangentsHelper extends: EventDispatcher → Object3D → Line → LineSegments
  2. Most relevant properties: matrixAutoUpdate, object, size.
  3. Key methods: dispose, update.

Connects To