Browse Source

Update BoundingBoxHelper.html

Changed incorrect example from ArrowHelper with appropriate BoundingBoxHelper example.
Ivano Ras 11 năm trước cách đây
mục cha
commit
59c8f0f8d0
1 tập tin đã thay đổi với 8 bổ sung6 xóa
  1. 8 6
      docs/api/extras/helpers/BoundingBoxHelper.html

+ 8 - 6
docs/api/extras/helpers/BoundingBoxHelper.html

@@ -16,13 +16,15 @@
 
 		<h2>Example</h2>
 
-		<code>var dir = new THREE.Vector3( 1, 0, 0 );
-		var origin = new THREE.Vector3( 0, 0, 0 );
-		var length = 1;
-		var hex = 0xffff00;
+		<code>var hex  = 0xff0000;
 
-		var arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex );
-		scene.add( arrowHelper );
+		var sphereMaterial = new THREE.MeshLambertMaterial( {color: 0x00ff00} );
+		var sphere = new THREE.Mesh( new THREE.SphereGeometry( 30, 12, 12), sphereMaterial );
+		scene.add( sphere );
+
+		var bbox = new THREE.BoundingBoxHelper( sphere, hex );
+		bbox.update();
+		scene.add( bbox );
 		</code>