|
28 | 28 | <!-- dat.gui.js --> |
29 | 29 | <script src="../../libs/common/dat.gui.js"></script> |
30 | 30 |
|
31 | | -<!-- Draco decoder for KHR_draco_mesh_compression support. |
32 | | - Lite checks globalThis.DracoDecoderModule first; if present, uses it directly |
33 | | - instead of fetching from the (nonexistent) site root. The wrapper overrides |
34 | | - locateFile so the WASM is resolved from the same libs directory. --> |
35 | | -<script src="../../libs/babylonjs/9.4.1/draco_decoder.js"></script> |
36 | | -<script> |
37 | | -(function() { |
38 | | - var orig = window.DracoDecoderModule; |
39 | | - if (typeof orig !== 'function') return; |
40 | | - var base = new URL("../../libs/babylonjs/9.4.1/", document.baseURI).href; |
41 | | - window.DracoDecoderModule = function(cfg) { |
42 | | - return orig(Object.assign({}, cfg, { |
43 | | - locateFile: function(f) { return base + f; } |
44 | | - })); |
45 | | - }; |
46 | | -})(); |
47 | | -</script> |
48 | | - |
49 | | -<!-- meshopt decoder for EXT_meshopt_compression support. |
50 | | - Lite checks globalThis.MeshoptDecoder first; if present, uses it directly |
51 | | - instead of fetching from the (nonexistent) site root. The WASM is inlined |
52 | | - in this file, so no locateFile override is needed. --> |
53 | | -<script src="../../libs/babylonjs/9.4.1/meshopt_decoder.js"></script> |
| 31 | +<!-- The Draco (KHR_draco_mesh_compression) and meshopt (EXT_meshopt_compression) |
| 32 | + decoders are not loaded here: index.js points Lite at ../../libs/babylonjs/9.4.1/ |
| 33 | + via setDracoBaseUrl() / setMeshoptBaseUrl(), and Lite injects each decoder itself, |
| 34 | + lazily, only when an asset actually uses that extension. --> |
54 | 35 |
|
55 | 36 | <canvas id="renderCanvas"></canvas> |
56 | 37 | <div id="dropZone" class="drop-zone hidden"> |
|
0 commit comments