Browse Source

Fix array overflow in Raycaster.intersectObject for indexless buffergeometry
Also removes unused offsets var.

haeric 11 years ago
parent
commit
ff3269a3cd
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/core/Raycaster.js

+ 1 - 2
src/core/Raycaster.js

@@ -328,10 +328,9 @@
 
 				} else {
 
-					var offsets = geometry.offsets;
 					var positions = attributes.position.array;
 
-					for ( var i = 0, il = attributes.position.array.length; i < il; i += 3 ) {
+					for ( var i = 0, il = positions.length / 3; i < il; i += 3 ) {
 
 						a = i;
 						b = i + 1;