瀏覽代碼

Merge pull request #20160 from Mugen87/dev44

TGALoader: Fixed flipped textures when using OffscreenCanvas.
Mr.doob 5 年之前
父節點
當前提交
8258225a06
共有 3 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      examples/js/loaders/TGALoader.js
  2. 1 1
      examples/jsm/loaders/TGALoader.js
  3. 二進制
      examples/screenshots/webgl_loader_texture_tga.jpg

+ 1 - 1
examples/js/loaders/TGALoader.js

@@ -536,7 +536,7 @@ THREE.TGALoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
 
 
 		context.putImageData( imageData, 0, 0 );
 		context.putImageData( imageData, 0, 0 );
 
 
-		return useOffscreen ? canvas.transferToImageBitmap() : canvas;
+		return canvas;
 
 
 	}
 	}
 
 

+ 1 - 1
examples/jsm/loaders/TGALoader.js

@@ -540,7 +540,7 @@ TGALoader.prototype = Object.assign( Object.create( Loader.prototype ), {
 
 
 		context.putImageData( imageData, 0, 0 );
 		context.putImageData( imageData, 0, 0 );
 
 
-		return useOffscreen ? canvas.transferToImageBitmap() : canvas;
+		return canvas;
 
 
 	}
 	}
 
 

二進制
examples/screenshots/webgl_loader_texture_tga.jpg