-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,13 +150,14 @@ Adding support for DRACO decompression within the GLTF files that are transporte | |
|
||
// Note the DRACO compression files need to be supplied via an explicit source. | ||
// We use unpkg here but in practice should be provided by the application. | ||
const tilesRenderer = new TilesRenderer( './path/to/tileset.json' ); | ||
|
||
const dracoLoader = new DRACOLoader(); | ||
dracoLoader.setDecoderPath( 'https://unpkg.com/[email protected]/examples/js/libs/draco/gltf/' ); | ||
|
||
const loader = new GLTFLoader( tiles.manager ); | ||
const loader = new GLTFLoader( tilesRenderer.manager ); | ||
loader.setDRACOLoader( dracoLoader ); | ||
|
||
const tilesRenderer = new TilesRenderer( './path/to/tileset.json' ); | ||
tilesRenderer.manager.addHandler( /\.gltf$/, loader ); | ||
``` | ||
|
||
|