소스 검색

Update src/core/Raycaster.js

small improvement in speed.
gero3 12 년 전
부모
커밋
f081645783
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/core/Raycaster.js

+ 1 - 1
src/core/Raycaster.js

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