Pārlūkot izejas kodu

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

Mr.doob 5 gadi atpakaļ
vecāks
revīzija
6e79573bc3
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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 );
 
 }