Skip to content

Commit

Permalink
Update README.md (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvouilloz authored Feb 12, 2024
1 parent 484faa4 commit 5d15614
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
```

Expand Down

0 comments on commit 5d15614

Please sign in to comment.