Build the Geometry
function readFile(input) {
const reader = new FileReader();
reader.onload = () => {
toggleLoader();
const ifcWorker = new Worker('worker/worker.js');
ifcWorker.onmessage = function (e) {
let structured = e.data;
structured.MainObject = mainObject;
structured = buildGeometry(structured);
scene.add(structured.MainObject);
};
ifcWorker.postMessage(reader.result);
};
reader.readAsText(input.files[0]);
}Last updated