Jelajahi Sumber

Updated ui.three.js

Mr.doob 7 tahun lalu
induk
melakukan
26b0f028fb
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  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 );