Skip to content

Commit

Permalink
Fix Texture.image !== null <- mrdoob#22846 (mrdoob#23436)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag authored and donmccurdy committed Mar 10, 2022
1 parent f57cf7e commit f466b6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jsm/renderers/webgpu/WebGPUTextures.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class WebGPUTextures {

} else {

if ( image !== undefined ) {
if ( image !== null ) {

// assume HTMLImageElement, HTMLCanvasElement or ImageBitmap

Expand Down Expand Up @@ -701,7 +701,7 @@ class WebGPUTextures {
height = ( image.length > 0 ) ? image[ 0 ].height : 1;
depth = 6; // one image for each side of the cube map

} else if ( image !== undefined ) {
} else if ( image !== null ) {

width = image.width;
height = image.height;
Expand Down

0 comments on commit f466b6a

Please sign in to comment.