Skip to content

Commit

Permalink
USDZExporter: Resize textures to 1024 by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Feb 11, 2021
1 parent d5326ca commit aa5bb10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jsm/exporters/USDZExporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ async function imgToU8( image ) {
( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {

const canvas = document.createElement( 'canvas' );
canvas.width = image.width;
canvas.height = image.height;
canvas.width = Math.min( 1024, image.width );
canvas.height = Math.min( 1024, image.height );

const context = canvas.getContext( '2d' );
context.drawImage( image, 0, 0, canvas.width, canvas.height );
Expand Down

0 comments on commit aa5bb10

Please sign in to comment.