Browse Source

Updated ui.three.js

Mr.doob 7 years ago
parent
commit
26b0f028fb
1 changed files with 1 additions and 0 deletions
  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 );