Browse Source

Update src/core/Raycaster.js

small improvement in speed.
gero3 12 years ago
parent
commit
f081645783
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/Raycaster.js

+ 1 - 1
src/core/Raycaster.js

@@ -10,7 +10,7 @@
 		this.ray = new THREE.Ray( origin, direction );
 		this.ray = new THREE.Ray( origin, direction );
 
 
 		// normalized ray.direction required for accurate distance calculations
 		// normalized ray.direction required for accurate distance calculations
-		if( this.ray.direction.length() > 0 ) {
+		if( this.ray.direction.lengthSq() > 0 ) {
 
 
 			this.ray.direction.normalize();
 			this.ray.direction.normalize();