It might be a bit late, but we have recently released the official IFC Loader for Three.js. It's relatively young and we still have work to do, but it's able to open a lot of IFC files already. Assuming you have an HTML input element in your scene:
import { IFCLoader } from "three/examples/jsm/loaders/IFCLoader";
//Sets up the IFC loading
const ifcLoader = new IFCLoader();
ifcLoader.setWasmPath("wasm/");
const input = document.getElementById("file-input");
input.addEventListener(
"change",
(changed) => {
var ifcURL = URL.createObjectURL(changed.target.files[0]);
console.log(ifcURL);
ifcLoader.load(ifcURL, (ifcModel) => scene.add(ifcModel.mesh));
},
false
);
You can visit the docs to see the full tutorial, see the official example or let us know if you have any question / feedback / want to contribute in the Discord channel.