Mr.doob преди 7 години
родител
ревизия
26b0f028fb
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      editor/js/libs/ui.three.js

+ 1 - 0
editor/js/libs/ui.three.js

@@ -79,6 +79,7 @@ UI.Texture = function ( mapping ) {
 
 						var texture = new THREE.Texture( this, mapping );
 						texture.sourceFile = file.name;
+						texture.format = file.type === 'image/jpeg' ? THREE.RGBFormat : THREE.RGBAFormat;
 						texture.needsUpdate = true;
 
 						scope.setValue( texture );