BoxHelper.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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:Line] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">Helper object to show a wireframe box (with no face diagonals) around an object</div>
  13. <h2>Example</h2>
  14. <code>var sphere = new THREE.SphereGeometry();
  15. var object = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial(0xff0000) );
  16. var box = new THREE.BoxHelper( object );
  17. scene.add( box );
  18. </code>
  19. <h2>Constructor</h2>
  20. <h3>[name]( [page:Object3D object] )</h3>
  21. <div>Creates a new wireframe box matching the size of the passed box.</div>
  22. <h2>Properties</h2>
  23. <div>(none)</div>
  24. <h2>Methods</h2>
  25. <h3>[method:null update]( [page:Object3D object] )</h3>
  26. <div>
  27. Updates the helper's geometry to match the dimensions of the [page:Geometry.boundingBox bounding box] of the passed object's geometry.
  28. <h2>Source</h2>
  29. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  30. </body>
  31. </html>