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 abernier committed Sep 16, 2022
1 parent b755acd commit b84ea8f
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 b84ea8f

Please sign in to comment.