2
0
Mugen87 5 жил өмнө
parent
commit
2e26575eef

+ 1 - 1
examples/js/controls/OrbitControls.js

@@ -177,7 +177,7 @@ THREE.OrbitControls = function ( object, domElement ) {
 			var min = scope.minAzimuthAngle;
 			var min = scope.minAzimuthAngle;
 			var max = scope.maxAzimuthAngle;
 			var max = scope.maxAzimuthAngle;
 
 
-			if ( isFinite ( min ) && isFinite( max ) ) {
+			if ( isFinite( min ) && isFinite( max ) ) {
 
 
 				if ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI;
 				if ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI;
 
 

+ 9 - 9
examples/js/loaders/GLTFLoader.js

@@ -581,7 +581,7 @@ THREE.GLTFLoader = ( function () {
 		var source = json.images[ extension.source ];
 		var source = json.images[ extension.source ];
 		var loader = parser.options.ktx2Loader;
 		var loader = parser.options.ktx2Loader;
 
 
-		if ( !loader ) {
+		if ( ! loader ) {
 
 
 			throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
 			throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
 
 
@@ -1525,9 +1525,9 @@ THREE.GLTFLoader = ( function () {
 		this.primitiveCache = {};
 		this.primitiveCache = {};
 
 
 		// Object3D instance caches
 		// Object3D instance caches
-		this.meshCache = {refs: {}, uses: {}};
-		this.cameraCache = {refs: {}, uses: {}};
-		this.lightCache = {refs: {}, uses: {}};
+		this.meshCache = { refs: {}, uses: {} };
+		this.cameraCache = { refs: {}, uses: {} };
+		this.lightCache = { refs: {}, uses: {} };
 
 
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// expensive work of uploading a texture to the GPU off the main thread.
 		// expensive work of uploading a texture to the GPU off the main thread.
@@ -1687,7 +1687,7 @@ THREE.GLTFLoader = ( function () {
 
 
 		}
 		}
 
 
-		cache.refs[ index ] ++ ;
+		cache.refs[ index ] ++;
 
 
 	};
 	};
 
 
@@ -1702,7 +1702,7 @@ THREE.GLTFLoader = ( function () {
 
 
 		return ref;
 		return ref;
 
 
-	}
+	};
 
 
 	GLTFParser.prototype._invokeOne = function ( func ) {
 	GLTFParser.prototype._invokeOne = function ( func ) {
 
 
@@ -2082,12 +2082,13 @@ THREE.GLTFLoader = ( function () {
 		if ( ! loader ) {
 		if ( ! loader ) {
 
 
 			loader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]
 			loader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]
-			? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader
-			: this.textureLoader;
+				? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader
+				: this.textureLoader;
 
 
 		}
 		}
 
 
 		return this.loadTextureImage( textureIndex, source, loader );
 		return this.loadTextureImage( textureIndex, source, loader );
+
 	};
 	};
 
 
 	GLTFParser.prototype.loadTextureImage = function ( textureIndex, source, loader ) {
 	GLTFParser.prototype.loadTextureImage = function ( textureIndex, source, loader ) {
@@ -2097,7 +2098,6 @@ THREE.GLTFLoader = ( function () {
 		var options = this.options;
 		var options = this.options;
 
 
 		var textureDef = json.textures[ textureIndex ];
 		var textureDef = json.textures[ textureIndex ];
-		var textureExtensions = textureDef.extensions || {};
 
 
 		var URL = self.URL || self.webkitURL;
 		var URL = self.URL || self.webkitURL;
 
 

+ 1 - 1
examples/jsm/controls/OrbitControls.js

@@ -186,7 +186,7 @@ var OrbitControls = function ( object, domElement ) {
 			var min = scope.minAzimuthAngle;
 			var min = scope.minAzimuthAngle;
 			var max = scope.maxAzimuthAngle;
 			var max = scope.maxAzimuthAngle;
 
 
-			if ( isFinite ( min ) && isFinite( max ) ) {
+			if ( isFinite( min ) && isFinite( max ) ) {
 
 
 				if ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI;
 				if ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI;
 
 

+ 9 - 9
examples/jsm/loaders/GLTFLoader.js

@@ -646,7 +646,7 @@ var GLTFLoader = ( function () {
 		var source = json.images[ extension.source ];
 		var source = json.images[ extension.source ];
 		var loader = parser.options.ktx2Loader;
 		var loader = parser.options.ktx2Loader;
 
 
-		if ( !loader ) {
+		if ( ! loader ) {
 
 
 			throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
 			throw new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );
 
 
@@ -1590,9 +1590,9 @@ var GLTFLoader = ( function () {
 		this.primitiveCache = {};
 		this.primitiveCache = {};
 
 
 		// Object3D instance caches
 		// Object3D instance caches
-		this.meshCache = {refs: {}, uses: {}};
-		this.cameraCache = {refs: {}, uses: {}};
-		this.lightCache = {refs: {}, uses: {}};
+		this.meshCache = { refs: {}, uses: {} };
+		this.cameraCache = { refs: {}, uses: {} };
+		this.lightCache = { refs: {}, uses: {} };
 
 
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the
 		// expensive work of uploading a texture to the GPU off the main thread.
 		// expensive work of uploading a texture to the GPU off the main thread.
@@ -1752,7 +1752,7 @@ var GLTFLoader = ( function () {
 
 
 		}
 		}
 
 
-		cache.refs[ index ] ++ ;
+		cache.refs[ index ] ++;
 
 
 	};
 	};
 
 
@@ -1767,7 +1767,7 @@ var GLTFLoader = ( function () {
 
 
 		return ref;
 		return ref;
 
 
-	}
+	};
 
 
 	GLTFParser.prototype._invokeOne = function ( func ) {
 	GLTFParser.prototype._invokeOne = function ( func ) {
 
 
@@ -2147,12 +2147,13 @@ var GLTFLoader = ( function () {
 		if ( ! loader ) {
 		if ( ! loader ) {
 
 
 			loader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]
 			loader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]
-			? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader
-			: this.textureLoader;
+				? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader
+				: this.textureLoader;
 
 
 		}
 		}
 
 
 		return this.loadTextureImage( textureIndex, source, loader );
 		return this.loadTextureImage( textureIndex, source, loader );
+
 	};
 	};
 
 
 	GLTFParser.prototype.loadTextureImage = function ( textureIndex, source, loader ) {
 	GLTFParser.prototype.loadTextureImage = function ( textureIndex, source, loader ) {
@@ -2162,7 +2163,6 @@ var GLTFLoader = ( function () {
 		var options = this.options;
 		var options = this.options;
 
 
 		var textureDef = json.textures[ textureIndex ];
 		var textureDef = json.textures[ textureIndex ];
-		var textureExtensions = textureDef.extensions || {};
 
 
 		var URL = self.URL || self.webkitURL;
 		var URL = self.URL || self.webkitURL;