BoxHelper.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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:Color color] )</h3>
  22. <div>
  23. object -- Object3D -- the object3D to show the world-axis-aligned boundingbox.<br />
  24. color -- The color of the helper. This can be a [page:Color], a hexadecimal value and an CSS-Color name. Default is 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>Updates the helper's geometry to match the dimensions of the [page:Geometry.boundingBox bounding box] of the passed object's geometry.</div>
  32. <h2>Source</h2>
  33. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  34. </body>
  35. </html>