We cannot use Three inside a Web Worker!
We simply exclude that object. Instead, we return an empty object.
function constructProject(ifcData) {
const finder = createIfcItemsFinder(ifcData);
bindAllElements(finder);
const ifcProjects = get(finder, t.IfcProject);
const elements = finder.findAllProducts(ifcProjects);
const spaces = get(finder, t.IfcSpace);
const units = get(finder, t.IfcUnitAssignment)[0];
return {
[s.ifcProject]: ifcProjects,
[s.products]: elements,
[s.spaces]: spaces,
[s.units]: units,
[s.mainObject]: {} // mainObject
};
}
Please note that this change will break the regular code.