'Export New IFC File with IFC.js

I'm trying to use IFC.js to create IFC files from a web application. The documentation says the library can both read and write IFC files.

Library here: https://ifcjs.github.io/info/

I have read the documentation, searched through the source code, and can not find any clues anywhere on how to export a file with the library. Perhaps I'm just being dense and scrolled right past it.

Does anyone know how to use this library to export a file?

The context is, I have a scene in Three.js I would like to turn into an original IFC.js file. I don't require any additional information to be attached, I just need the 3D mesh data and at most materials, converted into the IFC file format.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source