Browse Source

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

Mr.doob 5 years ago
parent
commit
6e79573bc3
1 changed files with 1 additions and 1 deletions
  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 );
 
 }