Explorar o código

GLTFLoader: Use extensionName for extensions[] access consistently

This is a minor cleanup - two of 5 extensions spelled out the extension
name twice, one as a case label and once as an array index.
Arseny Kapoulkine %!s(int64=5) %!d(string=hai) anos
pai
achega
a189cc221c
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      examples/js/loaders/GLTFLoader.js

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

@@ -181,11 +181,11 @@ THREE.GLTFLoader = ( function () {
 							break;
 
 						case EXTENSIONS.MSFT_TEXTURE_DDS:
-							extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ] = new GLTFTextureDDSExtension( this.ddsLoader );
+							extensions[ extensionName ] = new GLTFTextureDDSExtension( this.ddsLoader );
 							break;
 
 						case EXTENSIONS.KHR_TEXTURE_TRANSFORM:
-							extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] = new GLTFTextureTransformExtension();
+							extensions[ extensionName ] = new GLTFTextureTransformExtension();
 							break;
 
 						default: