浏览代码

Merge pull request #12077 from Avocher/dev

Fixed bug where ImageBitmaps did not get upscaled.
Mr.doob 7 年之前
父节点
当前提交
c67fbdcc64
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/renderers/webgl/WebGLTextures.js

+ 1 - 1
src/renderers/webgl/WebGLTextures.js

@@ -45,7 +45,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
 
 	function makePowerOfTwo( image ) {
 
-		if ( image instanceof HTMLImageElement || image instanceof HTMLCanvasElement ) {
+		if ( image instanceof HTMLImageElement || image instanceof HTMLCanvasElement || image instanceof ImageBitmap ) {
 
 			var canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
 			canvas.width = _Math.floorPowerOfTwo( image.width );