Skip to content

Commit 5632fdc

Browse files
committed
Fix wasm path
1 parent 450519b commit 5632fdc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/plugins/cesium/ngv-cesium-factories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ export async function initCesiumWidget(
356356
url: ifcUrl,
357357
webIfcSettings: {
358358
wasm: {
359-
path: onGithubIO ? '/ngv' : '/',
359+
path: onGithubIO ? '/ngv/' : '/',
360360
absolute: true,
361361
},
362362
},

src/plugins/cesium/ngv-plugin-cesium-upload.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,18 @@ export class NgvPluginCesiumUpload extends LitElement {
5555
let blob = new Blob([arrayBuffer]);
5656
url = URL.createObjectURL(blob);
5757
if (isIfc) {
58+
// #FIXME: find a better solution
59+
// also, this should be made common with ngv-cesium-factories
60+
const onGithubIO = document.location
61+
.toString()
62+
.startsWith('https://geoblocks.github.io/ngv/');
5863
const {ifcToGLTF} = await import('@geoblocks/ifc-gltf');
5964
try {
6065
const {glb} = await ifcToGLTF({
6166
url: url,
6267
webIfcSettings: {
6368
wasm: {
64-
path: '/',
69+
path: onGithubIO ? '/ngv/' : '/',
6570
absolute: true,
6671
},
6772
},

0 commit comments

Comments
 (0)