Browse Source

Updated modules.

Mr.doob 5 năm trước cách đây
mục cha
commit
8205a2a075

+ 3 - 1
examples/jsm/interactive/SelectionBox.js

@@ -59,6 +59,8 @@ var SelectionBox = ( function () {
 		startPoint = startPoint || this.startPoint;
 		startPoint = startPoint || this.startPoint;
 		endPoint = endPoint || this.endPoint;
 		endPoint = endPoint || this.endPoint;
 
 
+		// Avoid invalid frustum
+
 		if ( startPoint.x === endPoint.x ) {
 		if ( startPoint.x === endPoint.x ) {
 
 
 			endPoint.x += Number.EPSILON;
 			endPoint.x += Number.EPSILON;
@@ -82,7 +84,7 @@ var SelectionBox = ( function () {
 			endPoint.x = Math.max( startPoint.x, endPoint.x );
 			endPoint.x = Math.max( startPoint.x, endPoint.x );
 			endPoint.y = Math.min( startPoint.y, endPoint.y );
 			endPoint.y = Math.min( startPoint.y, endPoint.y );
 
 
-			vecNear.copy( this.camera.getWorldPosition() );
+			vecNear.setFromMatrixPosition( this.camera.matrixWorld );
 			vecTopLeft.copy( tmpPoint );
 			vecTopLeft.copy( tmpPoint );
 			vecTopRight.set( endPoint.x, tmpPoint.y, 0 );
 			vecTopRight.set( endPoint.x, tmpPoint.y, 0 );
 			vecDownRight.copy( endPoint );
 			vecDownRight.copy( endPoint );

+ 1 - 0
examples/jsm/loaders/GLTFLoader.js

@@ -78,6 +78,7 @@ var GLTFLoader = ( function () {
 
 
 		this.dracoLoader = null;
 		this.dracoLoader = null;
 		this.ddsLoader = null;
 		this.ddsLoader = null;
+
 	}
 	}
 
 
 	GLTFLoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 	GLTFLoader.prototype = Object.assign( Object.create( Loader.prototype ), {

+ 1 - 1
examples/jsm/shaders/GodRaysShader.js

@@ -162,7 +162,7 @@ var GodRaysGenerateShader = {
 
 
 		// Unrolling loop manually makes it work in ANGLE
 		// Unrolling loop manually makes it work in ANGLE
 
 
-		"	float f = min( 1.0, max( vSunPositionScreenSpace.z / 1000.0, 0.0 ) );", // used to fade outgodrays
+		"	float f = min( 1.0, max( vSunPositionScreenSpace.z / 1000.0, 0.0 ) );", // used to fade out godrays
 
 
 		"	if ( 0.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;",
 		"	if ( 0.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;",
 		"	uv += stepv;",
 		"	uv += stepv;",