|
@@ -45,7 +45,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
function makePowerOfTwo( image ) {
|
|
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' );
|
|
var canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );
|
|
canvas.width = _Math.floorPowerOfTwo( image.width );
|
|
canvas.width = _Math.floorPowerOfTwo( image.width );
|