Explorar el Código

Fix in Raycaster example

Changed from incorrectly iterating over the keys to over the actual intersection points in the array.
Jesper Oskarsson hace 11 años
padre
commit
f7ed3e53fd
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      docs/api/core/Raycaster.html

+ 2 - 2
docs/api/core/Raycaster.html

@@ -36,9 +36,9 @@
 			// calculate objects intersecting the picking ray
 			var intersects = raycaster.intersectObjects( scene.children );
 
-			for ( var intersect in intersects ) {
+			for ( var i = 0; i < intersects.length; i++ ) {
 
-				intersect.object.material.color = new THREE.Color( 0xff0000 );
+				intersects[i].object.material.color = new THREE.Color( 0xff0000 );
 			
 			}
 			

粤ICP备19079148号