Skip to content

Commit

Permalink
r140 (bis) (bis)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed May 10, 2022
1 parent 74232ee commit 860af3c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion editor/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// r140.1
// r140.2

const cacheName = 'threejs-editor';

Expand Down
18 changes: 16 additions & 2 deletions examples/js/exporters/GLTFExporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@

}

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

cachedCanvas = new OffscreenCanvas( 1, 1 );

Expand Down Expand Up @@ -1005,8 +1005,22 @@

} else {

let quality; // Blink's implementation of convertToBlob seems to default to a quality level of 100%
// Use the Blink default quality levels of toBlob instead so that file sizes are comparable.

if ( mimeType === 'image/jpeg' ) {

quality = 0.92;

} else if ( mimeType === 'image/webp' ) {

quality = 0.8;

}

toBlobPromise = canvas.convertToBlob( {
type: mimeType
type: mimeType,
quality: quality
} );

}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "three",
"version": "0.140.1",
"version": "0.140.2",
"description": "JavaScript 3D library",
"type": "module",
"main": "./build/three.js",
Expand Down

0 comments on commit 860af3c

Please sign in to comment.