ThatOpen / web-ifc-three

The official IFC Loader for Three.js.
https://ifcjs.github.io/info/
MIT License
506 stars 132 forks source link

web assembly instantiate Issue with threejs demo #146

Open Cuiyansong opened 1 year ago

Cuiyansong commented 1 year ago

Hi I get an issue after loaded xxx.wasm file, i just try to use the demo in my application(in react/iframe environment, it is not iframe container issue), if anyone know what cause the issue and how to fix it?

I used the UMD style instead of ESM building. I Install three@135 and web-ifc-three@121 in my project for rollup package bundle.

Threejs IFC demo: https://threejs.org/examples/?q=ifc#webgl_loader_ifc

Errors: wasm-error

Cuiyansong commented 1 year ago

After change xxxx.wasm file path to my local env instead of remote http value, the previous error is gone. But still have some other issue, maybe it is my mac m1 issue only, any ideas?

image

Cuiyansong commented 1 year ago

Finally, I disable render it in IFrame, it indeed showing up, 🥂

So, it is the main issue only is loading the web-ifc.wasm from my local path instead of path https://threejs.org/examples/jsm/loaders/ifc/web-ifc.wasm

Just log the issue, please feel free to close it, thanks.

DoisKoh commented 1 year ago

I have the same error but I'm not using iframes. I'm using vite.