VertexTangentsHelper.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Line] &rarr;
  12. <h1>[name]</h1>
  13. <div class="desc">Renders [page:ArrowHelper arrows] to visualize an object's vertex tangent vectors. Requires that tangents have been specified in a [page:BufferAttribute custom attribute] or have been computed using [page:Geometry.computeTangents computeTangents]. </div>
  14. <h2>Example</h2>
  15. <code>
  16. geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 );
  17. material = new THREE.MeshBasicMaterial( { color: 0xff0000 } );
  18. object = new THREE.Mesh( geometry, material );
  19. edges = new THREE.VertexTangentsHelper( object, 2, 0x00ff00, 1 );
  20. scene.add( object );
  21. scene.add( edges );
  22. </code>
  23. <h2>Constructor</h2>
  24. <h3>[name]( [page:Object3D object], [page:Number size], [page:Color color], [page:Number linewidth] )</h3>
  25. <div>object -- object for which to render vertex tangents
  26. size -- size (length) of the arrows
  27. color -- color of the arrows
  28. linewidth -- width of the arrow lines
  29. </div>
  30. <h2>Properties</h2>
  31. <h3>[property:Object3D object]</h3>
  32. <div>
  33. The attached object
  34. </div>
  35. <h2>Methods</h2>
  36. <h3>[method:null update]()</h3>
  37. <div>Updates the vertex tangent preview arrows based on the new position and tangents of the object.</div>
  38. <h2>Source</h2>
  39. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  40. </body>
  41. </html>