Box3Helper.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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:Object3D] &rarr; [page:Line] &rarr; [page:LineSegments] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. Helper object to visualize a [page:Box3].
  15. </p>
  16. <h2>Code Example</h2>
  17. <code>
  18. var box = new THREE.Box3();
  19. box.setFromCenterAndSize( new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 2, 1, 3 ) );
  20. var helper = new THREE.Box3Helper( box, 0xffff00 );
  21. scene.add( helper );
  22. </code>
  23. <h2>Constructor</h2>
  24. <h3>[name]( [param:Box3 box], [param:Color color] )</h3>
  25. <p>
  26. [page:Box3 box] -- the Box3 to show.<br />
  27. [page:Color color] -- (optional) the box's color. Default is 0xffff00.<br /><br />
  28. Creates a new wireframe box that represents the passed Box3.
  29. </p>
  30. <h2>Properties</h2>
  31. <p>See the base [page:LineSegments] class for common properties.</p>
  32. <h3>[property:Box3 box]</h3>
  33. <p>The Box3 being visualized.</p>
  34. <h2>Methods</h2>
  35. <p>See the base [page:LineSegments] class for common methods.</p>
  36. <h3>[method:void updateMatrixWorld]( [param:Boolean force] )</h3>
  37. <p>
  38. This overrides the method in the base [page:Object3D] class so that it
  39. also updates the wireframe box to the extent of the [page:Box3Helper.box .box]
  40. property.
  41. </p>
  42. <h2>Source</h2>
  43. <p>
  44. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  45. </p>
  46. </body>
  47. </html>