소스 검색

Ray: Set direction to 0, 0, -1 by default.

Mr.doob 5 년 전
부모
커밋
6e79573bc3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/math/Ray.js

+ 1 - 1
src/math/Ray.js

@@ -16,7 +16,7 @@ var _normal = new Vector3();
 function Ray( origin, direction ) {
 
 	this.origin = ( origin !== undefined ) ? origin : new Vector3();
-	this.direction = ( direction !== undefined ) ? direction : new Vector3();
+	this.direction = ( direction !== undefined ) ? direction : new Vector3( 0, 0, - 1 );
 
 }