فهرست منبع

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 );
 
 }