Box3Helper.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Object3D] &rarr; [page:Line] &rarr; [page:LineSegments] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">Helper object to visualize a [page:Box3].</p>
  13. <h2>Code Example</h2>
  14. <code>
  15. const box = new THREE.Box3();
  16. box.setFromCenterAndSize( new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 2, 1, 3 ) );
  17. const helper = new THREE.Box3Helper( box, 0xffff00 );
  18. scene.add( helper );
  19. </code>
  20. <h2>Constructor</h2>
  21. <h3>[name]( [param:Box3 box], [param:Color color] )</h3>
  22. <p>
  23. [page:Box3 box] -- the Box3 to show.<br />
  24. [page:Color color] -- (optional) the box's color. Default is 0xffff00.<br /><br />
  25. Creates a new wireframe box that represents the passed Box3.
  26. </p>
  27. <h2>Properties</h2>
  28. <p>See the base [page:LineSegments] class for common properties.</p>
  29. <h3>[property:Box3 box]</h3>
  30. <p>The Box3 being visualized.</p>
  31. <h2>Methods</h2>
  32. <p>See the base [page:LineSegments] class for common methods.</p>
  33. <h3>[method:undefined updateMatrixWorld]( [param:Boolean force] )</h3>
  34. <p>
  35. This overrides the method in the base [page:Object3D] class so that it
  36. also updates the wireframe box to the extent of the [page:Box3Helper.box .box] property.
  37. </p>
  38. <h3>[method:undefined dispose]()</h3>
  39. <p>
  40. Frees the GPU-related resources allocated by this instance. Call this
  41. method whenever this instance is no longer used in your app.
  42. </p>
  43. <h2>Source</h2>
  44. <p>
  45. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  46. </p>
  47. </body>
  48. </html>