ThatOpen / web-ifc-three

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

IfcManager uses local IFCWorker.js #152

Open ThomasvanHoutum opened 1 year ago

ThomasvanHoutum commented 1 year ago

I am using the IFCjs with vue example project. In the IfcManager.js function "setupIfcLoader" a path to a local IFCWorker is used:

async setupIfcLoader() {
        let self = this;
        await self.ifcLoader.ifcManager.useWebWorkers(true, '../IFCjs/IFCWorker.js')
        await self.ifcLoader.ifcManager.applyWebIfcConfig({
            COORDINATE_TO_ORIGIN: true,
            USE_FAST_BOOLS: false
        });
        self.setupThreeMeshBVH();
    }

Can that path be changed to the IFCWorker that is in the node module, so the local file can be removed from the project directory?

fedelaport commented 1 year ago

That's loaded on runtime. It has to be an accesible URL. The browser will request the file.