-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Draco PNTS proposal alternative (#329)
* support draco * update readme * fix lint * clearer name * Consolidate draco changes to PNTSLoader * Update dts * Fixes * Final fixes? --------- Co-authored-by: George Madges <[email protected]>
- Loading branch information
Showing
4 changed files
with
127 additions
and
37 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 |
---|---|---|
|
@@ -154,6 +154,21 @@ const tilesRenderer = new TilesRenderer( './path/to/tileset.json' ); | |
tilesRenderer.manager.addHandler( /\.gltf$/, loader ); | ||
``` | ||
|
||
Adding support for DRACO decompression within the PNTS files. | ||
|
||
```js | ||
|
||
// 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 dracoLoader = new DRACOLoader(); | ||
dracoLoader.setDecoderPath( 'https://unpkg.com/[email protected]/examples/js/libs/draco/gltf/' ); | ||
|
||
|
||
const tilesRenderer = new TilesRenderer( './path/to/tileset.json' ); | ||
tilesRenderer.manager.addHandler( /\.drc$/, loader ); | ||
``` | ||
|
||
|
||
## Loading from Cesium Ion | ||
|
||
Loading from Cesium Ion requires some extra fetching of the ion url endpoint, as well as a temporary bearer access token. A full example is found in the ionExample.js file in the examples folder. | ||
|
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
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
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