BoxHelper.html 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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">Helper object to show a wireframe box (with no face diagonals) around an object</div>
  14. <h2>Example</h2>
  15. <code>var sphere = new THREE.SphereGeometry();
  16. var object = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial(0xff0000) );
  17. var box = new THREE.BoxHelper( object );
  18. scene.add( box );
  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:0xffff00
  25. </div>
  26. <div>Creates a new wireframe box matching the size of the passed box.</div>
  27. <h2>Properties</h2>
  28. <div>(none)</div>
  29. <h2>Methods</h2>
  30. <h3>[method:null update]( [page:Object3D object] )</h3>
  31. <div>
  32. Updates the helper's geometry to match the dimensions of the [page:Geometry.boundingBox bounding box] of the passed object's geometry.
  33. <h2>Source</h2>
  34. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  35. </body>
  36. </html>