Comments (8)
yeah that is part of the normal process - you need to add, either as part of the build or bundling, the wasm file.
I think this is the normal approach to take.
you can change the wasm path SetWasmPath('../../../')
from engine_web-ifc.
I am not familir with react - but I would expect you need the import at the top of the file not in the function. The error is probably to do with bundling. You need to make sure the wasm is available in a public directory or similar so it can be fetched by the javascript.
from engine_web-ifc.
Thank you for the answer!
I tried importing it in different ways, but the problem is not the import, the problem is when I try to initialize it Init()
even if I call the method SetWasmPath before, with both relative or absolute path.
😢
from engine_web-ifc.
Can you look at the developer tools in the log and see what is happening when it tries to retrieve the wasm? If you can show me I can help from there
from engine_web-ifc.
I can see this when I try to initialize ifcAPI:
error 404, not found. basically it can not find the wasm even if I put it in the public folder. (just out of curiosity I also tried to put it manually in the folder where it is looking for it, but I got the same error)
EDIT:
logs:
from engine_web-ifc.
Is the file actually there - can you access it in the browser? It is something to do with your bundling - you may need to explicit tell the bunlder to put the wasm file in there.
from engine_web-ifc.
if I type the path in the browser, the browser downloads it for me:
I will search for more info on how to bundle it.
from engine_web-ifc.
I just retried put the wasm file in the directory: .next\static\chunks\app
and now it worked, don't know why it didn't before 😵💫
for now I will keep the issue opened in case someone knows a better solution.
Thank you @beachtom for your willingness to help me!
from engine_web-ifc.
Related Issues (20)
- [Bug]: Error with geometry and miss some of them HOT 1
- Add new IFC element at specific co-ordinate in the loaded 3D view HOT 1
- [Bug]: Vite/vue3 wasm issue HOT 1
- [Bug]: error with geometry of basic model HOT 2
- [Bug]: IFC Model Alignment Issue HOT 5
- [Bug]: Model processing results in Aborted()
- [Bug]: Wrong representation of window HOT 5
- [Bug]: Unimplemented Geometry in Web-Ifc HOT 5
- [Bug]: `IfcAPI` is memory leaking
- [Bug]: Object missing in the viewer HOT 4
- [Bug]: Can't load a 10Mo ifc
- [Bug]: Unable to exit Loop and some objects are displayed incorrect HOT 1
- [Bug]: IfcBooleanResult not rendering properly (fuzzybools regression?)
- [Bug]: Example not working locally HOT 1
- [Bug]: Higher number of circle segments deforms mesh
- [Bug]: Data from flatTransformation returns shifted values since 0.0.51 HOT 3
- [Bug]: stol: out of range
- [Feat]: Web-ifc + wasm build documentation/tutorial
- [Bug]: Some objects are not parsed
- [Bug]: Attribute is derived subtype.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from engine_web-ifc.