Creates a new model and returns a modelID number (unimplemented)
Optionalsettings: Loadersettingssettings for generating data the model
model ID
Opens a model and returns a modelID number
handle retrieved by OpenModel, model must not be closed
containing IFC data (bytes)
Get the passthrough for a particular model id.
Initializes the WASM module (WebIFCWasm), required before using any other functionality.
OptionalcustomLocateFileHandler: FileHandlerFunctionAn optional locateFile function that let's you override the path from which the wasm module is loaded.
Opens a model and returns a modelID number
containing IFC data (bytes)
Optionalsettings: Loadersettingssettings for loading the model
model ID
Cooperative variant of OpenModel (conway extension; feature-detect with typeof api.OpenModelAsync === 'function'). Identical parse/extraction, but periodically yields to the event loop so browsers can repaint progress UI (settings.ON_PROGRESS) and the tab is not flagged as stalled — conway issue #301 §2. Currently cooperative for IFC input; AP214/AP203/AP242 fall back to the synchronous path.
containing IFC data (bytes)
Optionalsettings: Loadersettingssettings for loading the model
model ID
Streamed-open variant of OpenModelAsync (conway extension; feature-detect with typeof api.OpenModelStreamed === 'function'). IFC input parses through the streaming columnar indexer, so the model's record index is columnar from birth and the classic per-record object phase — the dominant JS-heap cost of parsing large models — never exists. Everything downstream is identical to OpenModelAsync: same cooperative geometry extraction, same meshes/properties surface, and SpillModelSource works afterwards as usual.
Never does worse than OpenModelAsync: non-IFC formats and any streamed-parse failure fall back to the classic path internally, so -1 here means the classic open would have failed too.
containing IFC data (bytes)
Optionalsettings: Loadersettingssettings for loading the model
model ID
Conway extension (no web-ifc equivalent): drop the model's materialised entity/descriptor caches, returning that memory to the JS heap. Entities and attributes rematerialise transparently on the next property access, so callers can invoke this between UI interactions to keep the property working set bounded to what the active UI is touching.
Conway extension: lazily iterate the express IDs of all root-derived (GlobalId-bearing) entities — products, relationships, property sets, quantities — straight from the type index. No entity descriptors are materialised and the source buffer is never touched, so this is safe and cheap even after SpillModelSource, and lets property sweeps skip the geometric-resource records that dominate large models.
Multi-mapped entities may be yielded once per mapping; callers that need distinct IDs should dedupe. Returns undefined when the model doesn't exist or its schema has no root-type notion (e.g. AP214).
The model to iterate.
Lazy express ID iterator, or undefined when unsupported.
Set conway's console-echo log threshold, web-ifc compatible surface (numeric LogLevel enum). Embedders (e.g. Share) use this to quiet a clean load's console down to warnings/errors — conway issue #301.
the web-ifc style numeric log level
Conway extension: release the model's resident source buffer and serve subsequent record reads through fixed-size windows paged in from an external byte store (which must hold exactly the model's source bytes — e.g. the original file already sitting in OPFS).
After a spill, asynchronous property APIs page ranges in on demand; SYNCHRONOUS record reads (getLine on the passthrough) require the range to be resident and throw otherwise. Call this only after load-time sweeps (geometry extraction, spatial tree, GLB property capture) are done.
The model to spill.
The external byte store holding the source bytes.
OptionalchunkBytes: numberOptional window size in bytes (default 4MiB).
OptionalmaxResidentChunks: numberOptional residency cap (default 16 windows).
True when the spill happened.
IfcAPI - Web-IFC API Shim Implementation for full read functionality