Skip to content

Commit

Permalink
Update draco decoder to 1.5.7 (#5523)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin authored May 28, 2024
1 parent 03f04e9 commit 4ecbc51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions docs/components/gltf-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ You'll also need to load a decoder library by configuring scene properties as ex

## Scene properties

[draco-decoders]: https://github.com/mrdoob/three.js/tree/master/examples/js/libs/draco/gltf
[draco-decoders]: https://github.com/mrdoob/three.js/tree/master/examples/jsm/libs/draco/gltf
[meshopt-decoder]: https://github.com/zeux/meshoptimizer/tree/master/js

When using glTF models compressed with Draco, KTX2 or Meshopt, you must configure the path to the necessary decoders:
Expand All @@ -144,7 +144,7 @@ When using glTF models compressed with Draco, KTX2 or Meshopt, you must configur

| Property | Description | Default Value |
|------------------|--------------------------------------|----|
| dracoDecoderPath | Path to the Draco decoder libraries. | 'https://www.gstatic.com/draco/versioned/decoders/1.5.6/' |
| dracoDecoderPath | Path to the Draco decoder libraries. | 'https://www.gstatic.com/draco/versioned/decoders/1.5.7/' |
| basisTranscoderPath | Path to the basis/KTX2 transcoder libraries. | '' |
| meshoptDecoderPath | Path to the Meshopt decoder. | '' |

Expand All @@ -155,9 +155,10 @@ When using glTF models compressed with Draco, KTX2 or Meshopt, you must configur
* `draco_wasm_wrapper.js` — JavaScript wrapper for the WASM decoder.

These files are available from the three.js repository, under
[examples/js/libs/draco/gltf][draco-decoders]. The `gltf-model` component will
automatically choose whether to use a WASM or JavaScript decoder, so both should
be included.
[examples/jsm/libs/draco/gltf][draco-decoders], but a more recent version may
exist in the [draco repository](https://github.com/google/draco/releases).
The `gltf-model` component will automatically choose whether to use a WASM or JavaScript
decoder, so both should be included.

`basisTranscoderPath` path must be a folder containing two files:

Expand Down
2 changes: 1 addition & 1 deletion src/systems/gltf-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function fetchScript (src) {
*/
module.exports.System = registerSystem('gltf-model', {
schema: {
dracoDecoderPath: {default: 'https://www.gstatic.com/draco/versioned/decoders/1.5.6/'},
dracoDecoderPath: {default: 'https://www.gstatic.com/draco/versioned/decoders/1.5.7/'},
basisTranscoderPath: {default: ''},
meshoptDecoderPath: {default: ''}
},
Expand Down

0 comments on commit 4ecbc51

Please sign in to comment.