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

[name]

Renders arrows to visualize an object's vertex tangent vectors. Requires that tangents have been specified in a [page:BufferAttribute custom attribute] or have been calculated using [page:BufferGeometryUtils.computeTangents computeTangents].

This helper supports [page:BufferGeometry] only.

Example

[example:webgl_helpers WebGL / helpers]

var geometry = new THREE.BoxBufferGeometry( 10, 10, 10, 2, 2, 2 ); var material = new THREE.MeshNormalMaterial(); var box = new THREE.Mesh( geometry, material ); var helper = new THREE.VertexTangentsHelper( box, 1, 0x00ffff, 1 ); scene.add( box ); scene.add( helper );

Constructor

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

[page:Object3D object] -- object for which to render vertex tangents.
[page:Number size] -- (optional) length of the arrows. Default is *1*.
[page:Hex color] -- hex color of the arrows. Default is 0x00ffff.
[page:Number linewidth] -- (optional) width of the arrow lines. Default is *1*. (Setting lineWidth is currently not supported.)

Properties

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

[property:object matrixAutoUpdate]

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

[property:Object3D object]

The object for which the vertex tangents are being visualized.

[property:Number size]

Length of the arrows. Default is *1*.

Methods

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

[method:null update]()

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

Source

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