[page:Object3D] → [page:Line] → [page:LineSegments] →

[name]

Visualizes an object's vertex tangents. Requires that tangents have been specified in a [page:BufferAttribute custom attribute] or have been calculated using [page:BufferGeometry.computeTangents computeTangents].

Code Example

const geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 ); const material = new THREE.MeshStandardMaterial(); const mesh = new THREE.Mesh( geometry, material ); const helper = new VertexTangentsHelper( mesh, 1, 0x00ffff ); scene.add( mesh ); scene.add( helper );

Examples

[example:webgl_helpers WebGL / helpers]

Constructor

[name]( [param:Object3D object], [param:Number size], [param:Hex color] )

[page:Object3D object] -- object for which to render vertex tangents.
[page:Number size] -- (optional) length of the arrows. Default is *1*.
[page:Hex color] -- (optional) hex color of the arrows. Default is *0x00ffff*.

Properties

See the base [page:LineSegments] class for common properties.

.matrixAutoUpdate : Object

See [page:Object3D.matrixAutoUpdate]. Set to `false` here as the helper is using the object's [page:Object3D.matrixWorld matrixWorld].

.object : Object3D

The object for which the vertex tangents are being visualized.

.size : Number

Length of the arrows. Default is *1*.

Methods

See the base [page:LineSegments] class for common methods.

.update () : undefined

Updates the vertex tangents preview based on the object's world transform.

.dispose () : undefined

Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.

Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/helpers/VertexTangentsHelper.js examples/jsm/helpers/VertexTangentsHelper.js]

VertexTangentsHelper VertexTangentsHelper VertexTangentsHelper VertexTangentsHelper

VertexTangentsHelper VertexTangentsHelper VertexTangentsHelper VertexTangentsHelper