Mr.doob 7 лет назад
Родитель
Сommit
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 );