BoundingBoxHelper.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../../list.js"></script>
  6. <script src="../../../page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="../../../page.css" />
  8. </head>
  9. <body>
  10. <h1>[name]</h1>
  11. <div class="desc">A helper object to show the world-axis-aligned bounding box for an object.</div>
  12. <h2>Example</h2>
  13. <code>var dir = new THREE.Vector3( 1, 0, 0 );
  14. var origin = new THREE.Vector3( 0, 0, 0 );
  15. var length = 1;
  16. var hex = 0xffff00;
  17. var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
  18. scene.add( arrowHelper );
  19. </code>
  20. <h2>Constructor</h2>
  21. <h3>[name]([page:Object3D object], [page:Number hex])</h3>
  22. <div>
  23. object -- Object3D -- the object3D to show the world-axis-aligned boundingbox.<br />
  24. hex -- hexadecimal value to define color ex:0x888888
  25. </div>
  26. <div>
  27. This creates an line object to the boundingbox.
  28. </div>
  29. <h2>Properties</h2>
  30. <h3>.[page:Object3D object]</h3>
  31. <div>
  32. Contains the object3D to show the world-axis-aligned boundingbox.
  33. </div>
  34. <h3>.[page:Box3 box]</h3>
  35. <div>
  36. Contains the bounding box of the object.
  37. </div>
  38. <h2>Methods</h2>
  39. <h3>.update()</h3>
  40. <div>
  41. Updates the BoundingBoxHelper based on the object property.
  42. </div>
  43. <h2>Source</h2>
  44. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  45. </body>
  46. </html>