-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
enableMeshoptDecoder
function for GLTFs
- Loading branch information
1 parent
8dc71f9
commit 3a9784c
Showing
3 changed files
with
33 additions
and
3 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 |
---|---|---|
|
@@ -54,10 +54,11 @@ | |
"three/addons/": "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/" | ||
} | ||
} | ||
</script> | ||
</script> | ||
|
||
<script type="module"> | ||
import { AmbientLight } from 'three'; | ||
import { MeshoptDecoder } from 'three/addons/libs/meshopt_decoder.module.js'; | ||
import { | ||
zoomToLayer, | ||
fillHTMLWithPickingInfo, | ||
|
@@ -95,9 +96,11 @@ | |
|
||
// Enable various compression support for 3D Tiles tileset: | ||
// - `KHR_draco_mesh_compression` mesh compression extension | ||
// - `KHR_texture_basisu` texture compresion extension | ||
// - `KHR_texture_basisu` texture compression extension | ||
// - `EXT_meshopt_compression` data compression extension | ||
itowns.enableDracoLoader('./libs/draco/'); | ||
itowns.enableKtx2Loader('./lib/basis/', view.renderer); | ||
itowns.enableMeshoptDecoder(MeshoptDecoder); | ||
|
||
// Add ambient light to globally illuminates all objects | ||
const light = new AmbientLight(0x404040, 40); | ||
|
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