ifczero
v0.0.3
Published
IFC authoring, geometry and serialization library for the web, powered by IfcOpenShell.
Maintainers
Readme
ifczero
A complete IFC authoring, geometry and serialization library for the web, powered by IfcOpenShell.
Initialize
init(overrides?: ModuleInitOverrides): Promise<EmscriptenModule>Loads the full bundledifcopenshell.jsand caches the module.initParse(overrides?: ModuleInitOverrides): Promise<EmscriptenModule>Loads bundledifcparse.jsand caches the module.
Runtime helpers:
getModule(): EmscriptenModulehasModule(): booleanclearModule(): voidmoduleInstance: EmscriptenModule | null
Example using bundled full module:
import { init } from "ifczero";
await init({
locateFile: (file) => new URL(`../wasm/${file}`, import.meta.url).pathname,
});You can also import ifczero/wasm/*.js directly and use ccall/cwrap manually, but the TS APIs are the recommended layer.
Module Guides
Low-level Helpers
loadModule(createModule, overrides?): Promise<EmscriptenModule>readString(ptr): string | nullreadF64Array(ptr, count): Float64ArrayreadI32Array(ptr, count): Int32ArraywriteBytes(data): number
Raw Bindings
- Root:
parseRaw,psetqtoRaw,ifcutilRaw,geomRaw,serializersRaw - Namespaced:
parse.raw,parse.rawPsetQto,parse.rawUtil,geom.raw,serializers.raw,util.raw
These are low-level direct C ABI wrappers.
