2
0
Эх сурвалжийг харах

MTLLoader: Fix to avoid loading bump map twice in case material contains both 'bump' and 'bump_map'.

tsone 10 жил өмнө
parent
commit
48d416cf7d

+ 2 - 0
examples/js/loaders/MTLLoader.js

@@ -345,6 +345,8 @@ THREE.MTLLoader.MaterialCreator.prototype = {
 
 					// Bump texture map
 
+					if ( params[ 'bumpMap' ] ) break; // Avoid loading twice.
+
 					params[ 'bumpMap' ] = this.loadTexture( this.baseUrl + value );
 					params[ 'bumpMap' ].wrapS = this.wrap;
 					params[ 'bumpMap' ].wrapT = this.wrap;