GithubHelp home page GithubHelp logo

Comments (8)

beachtom avatar beachtom commented on June 15, 2024 1

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.

beachtom avatar beachtom commented on June 15, 2024

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.

SoftwareMechanic avatar SoftwareMechanic commented on June 15, 2024

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.

beachtom avatar beachtom commented on June 15, 2024

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.

SoftwareMechanic avatar SoftwareMechanic commented on June 15, 2024

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)

immagine

EDIT:

logs:

immagine

from engine_web-ifc.

beachtom avatar beachtom commented on June 15, 2024

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.

SoftwareMechanic avatar SoftwareMechanic commented on June 15, 2024

if I type the path in the browser, the browser downloads it for me:
immagine

I will search for more info on how to bundle it.

from engine_web-ifc.

SoftwareMechanic avatar SoftwareMechanic commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.