소스 검색

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. BIN
      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 );
 
-		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 );
 
-		return useOffscreen ? canvas.transferToImageBitmap() : canvas;
+		return canvas;
 
 	}
 

BIN
examples/screenshots/webgl_loader_texture_tga.jpg