BoxHelper.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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] )</h3>
  22. <div>Creates a new wireframe box matching the size of the passed box.</div>
  23. <h2>Properties</h2>
  24. <div>(none)</div>
  25. <h2>Methods</h2>
  26. <h3>[method:null update]( [page:Object3D object] )</h3>
  27. <div>
  28. Updates the helper's geometry to match the dimensions of the [page:Geometry.boundingBox bounding box] of the passed object's geometry.
  29. <h2>Source</h2>
  30. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  31. </body>
  32. </html>