BoundingBoxHelper.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. [page:Mesh] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">A helper object to show the world-axis-aligned bounding box for an object.</div>
  13. <h2>Example</h2>
  14. <code>var dir = new THREE.Vector3( 1, 0, 0 );
  15. var origin = new THREE.Vector3( 0, 0, 0 );
  16. var length = 1;
  17. var hex = 0xffff00;
  18. var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
  19. scene.add( arrowHelper );
  20. </code>
  21. <h2>Constructor</h2>
  22. <h3>[name]([page:Object3D object], [page:Number hex])</h3>
  23. <div>
  24. object -- Object3D -- the object3D to show the world-axis-aligned boundingbox.<br />
  25. hex -- hexadecimal value to define color ex:0x888888
  26. </div>
  27. <div>
  28. This creates an line object to the boundingbox.
  29. </div>
  30. <h2>Properties</h2>
  31. <h3>.[page:Object3D object]</h3>
  32. <div>
  33. Contains the object3D to show the world-axis-aligned boundingbox.
  34. </div>
  35. <h3>.[page:Box3 box]</h3>
  36. <div>
  37. Contains the bounding box of the object.
  38. </div>
  39. <h2>Methods</h2>
  40. <h3>.update()</h3>
  41. <div>
  42. Updates the BoundingBoxHelper based on the object property.
  43. </div>
  44. <h2>Source</h2>
  45. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  46. </body>
  47. </html>