|
@@ -8,39 +8,52 @@
|
|
|
<link type="text/css" rel="stylesheet" href="page.css" />
|
|
|
</head>
|
|
|
<body>
|
|
|
- [page:Line] →
|
|
|
+ [page:LineSegments] →
|
|
|
|
|
|
<h1>[name]</h1>
|
|
|
|
|
|
- <div class="desc">Helper object to show a wireframe box (with no face diagonals) around an object</div>
|
|
|
+ <div class="desc">Helper object to show a bounding box around an object.</div>
|
|
|
|
|
|
|
|
|
<h2>Example</h2>
|
|
|
|
|
|
- <code>var sphere = new THREE.SphereGeometry();
|
|
|
+ <div>[example:webgl_helpers WebGL / helpers]</div>
|
|
|
+ <div>[example:webgl_loader_nrrd WebGL / loader / nrrd]</div>
|
|
|
+ <div>[example:webgl_buffergeometry_drawcalls advanced / buffergeometry / drawcalls]</div>
|
|
|
+
|
|
|
+
|
|
|
+ <code>
|
|
|
+ var sphere = new THREE.SphereGeometry();
|
|
|
var object = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( 0xff0000 ) );
|
|
|
- var box = new THREE.BoxHelper( object );
|
|
|
+ var box = new THREE.BoxHelper( object, 0xffff00 );
|
|
|
scene.add( box );
|
|
|
</code>
|
|
|
|
|
|
|
|
|
<h2>Constructor</h2>
|
|
|
|
|
|
+
|
|
|
<h3>[name]( [page:Object3D object], [page:Color color] )</h3>
|
|
|
<div>
|
|
|
- object -- Object3D -- the object3D to show the world-axis-aligned boundingbox.<br />
|
|
|
- color -- The color of the helper. This can be a [page:Color], a hexadecimal value and an CSS-Color name. Default is 0xffff00
|
|
|
+ [page:Object3D object] -- the object3D to show the world-axis-aligned boundingbox.<br />
|
|
|
+ [page:Color color] -- hexadecimal value that defines the box's color. Default is 0xffff00.<br /><br />
|
|
|
+
|
|
|
+ Creates a new wireframe box that bounds the passed object. Internally this uses [page:Box3.setFromObject]
|
|
|
+ to calculate the dimensions. Note that this includes any children.
|
|
|
</div>
|
|
|
- <div>Creates a new wireframe box matching the size of the passed box.</div>
|
|
|
|
|
|
<h2>Properties</h2>
|
|
|
+ <div>See the base [page:LineSegments] class for common properties.</div>
|
|
|
|
|
|
- <div>(none)</div>
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
+ <div>See the base [page:LineSegments] class for common methods.</div>
|
|
|
|
|
|
<h3>[method:null update]( [page:Object3D object] )</h3>
|
|
|
- <div>Updates the helper's geometry to match the dimensions of the [page:Geometry.boundingBox bounding box] of the passed object's geometry.</div>
|
|
|
+ <div>
|
|
|
+ Updates the helper's geometry to match the dimensions of the
|
|
|
+ of the passed object, including any children. See [page:Box3.setFromObject].
|
|
|
+ </div>
|
|
|
|
|
|
<h2>Source</h2>
|
|
|
|