Skip to content

Commit

Permalink
GLTFExporter: Fixed buildMetalRoughTexture. (mrdoob#24197)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob authored and snagy committed Sep 21, 2022
1 parent 6a9e246 commit 3ba07b4
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions examples/jsm/exporters/GLTFExporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,27 +343,15 @@ function getPaddedArrayBuffer( arrayBuffer, paddingByte = 0 ) {

}

let cachedCanvas = null;

function getCanvas() {

if ( cachedCanvas ) {

return cachedCanvas;

}

if ( typeof document === 'undefined' && typeof OffscreenCanvas !== 'undefined' ) {

cachedCanvas = new OffscreenCanvas( 1, 1 );

} else {

cachedCanvas = document.createElement( 'canvas' );
return new OffscreenCanvas( 1, 1 );

}

return cachedCanvas;
return document.createElement( 'canvas' );

}

Expand Down

0 comments on commit 3ba07b4

Please sign in to comment.