浏览代码

Merge pull request #13864 from takahirox/GLTFLoaderMinorCleanup

GLTFLoader: Minor clean up
Mr.doob 7 年之前
父节点
当前提交
1cc85a965a
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      examples/js/loaders/GLTFLoader.js

+ 2 - 1
examples/js/loaders/GLTFLoader.js

@@ -243,7 +243,7 @@ THREE.GLTFLoader = ( function () {
 	 */
 	function GLTFTextureDDSExtension() {
 
-		if (!THREE.DDSLoader) {
+		if ( ! THREE.DDSLoader ) {
 
 			throw new Error( 'THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader' );
 
@@ -1906,6 +1906,7 @@ THREE.GLTFLoader = ( function () {
 
 			if ( textureDef.name !== undefined ) texture.name = textureDef.name;
 
+			// .format of dds texture is set in DDSLoader
 			if ( ! textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ] ) {
 
 				texture.format = textureDef.format !== undefined ? WEBGL_TEXTURE_FORMATS[ textureDef.format ] : THREE.RGBAFormat;