Browse Source

make boxhelper docs clearer

jotaro-sama 6 years ago
parent
commit
fab275a059
1 changed files with 6 additions and 6 deletions
  1. 6 6
      docs/api/en/helpers/BoxHelper.html

+ 6 - 6
docs/api/en/helpers/BoxHelper.html

@@ -13,8 +13,8 @@
 		<h1>[name]</h1>
 		<h1>[name]</h1>
 
 
 		<p class="desc">
 		<p class="desc">
-			Helper object to show the world-axis-aligned bounding box around an object. 
-			It can be used in synergy with [page:Box3] items in order to easily compute world-axis-aligned bounding boxes for objects, and use them for fast collision detection. See [page:Box3.intersect].
+			Helper object to graphically show the world-axis-aligned bounding box around an object. The actual bounding box is handled with [page:Box3], this is just a visual helper for debugging.
+			It can be automatically resized with the [page:BoxHelper.update] method when the object it's created from is transformed.
 			Note that the object must have a [page:Geometry] or [page:BufferGeometry] for this to work,
 			Note that the object must have a [page:Geometry] or [page:BufferGeometry] for this to work,
 			so it won't work with [page:Sprite Sprites].
 			so it won't work with [page:Sprite Sprites].
 		</p>
 		</p>
@@ -38,15 +38,15 @@
 
 
 		// Creating the actual bounding box (on which we can test intersection with other Box3 objects)
 		// Creating the actual bounding box (on which we can test intersection with other Box3 objects)
 		var box3 = new THREE.Box3();
 		var box3 = new THREE.Box3();
-		// Shape and position the box after the helper
-		box3.setFromObject( helper );
+		// Shape and position the box after the object
+		box3.setFromObject( sphere );
 
 
 		// Let's move the sphere
 		// Let's move the sphere
 		sphereObject.position.set( 7, 7, 7 );
 		sphereObject.position.set( 7, 7, 7 );
 
 
-		// Whenever the object is moved or rotated or scaled:
+		// Whenever the object is moved or rotated or scaled, we update both the bounding box and the helper
 		helper.update(); 
 		helper.update(); 
-		box3.setFromObject( helper );
+		box3.setFromObject( sphereObject );
 		</code>
 		</code>