{"_id":"@ademattos/web-ifc","name":"@ademattos/web-ifc","dist-tags":{"latest":"0.0.75"},"versions":{"0.0.75":{"name":"@ademattos/web-ifc","version":"0.0.75","description":"ifc loading on the web","module":"./web-ifc-api.js","main":"./web-ifc-api-node.js","license":"MPL-2.0","exports":{".":{"require":"./web-ifc-api-node.js","node":"./web-ifc-api-node.js","import":"./web-ifc-api.js","browser":"./web-ifc-api.js"},"./web-ifc.wasm":"./web-ifc.wasm","./web-ifc-mt.wasm":"./web-ifc-mt.wasm","./web-ifc-node.wasm":"./web-ifc-node.wasm"},"pckg-gui":{},"scripts":{"gen-schema":"cd src/schema-generator && ts-node gen_functional_types.ts","setup-env":"emsdk_env","setup-mingw":"mingw-get instal msys-make gettext","build-release":"npm run build-wasm-release && npm run build-api && npm run build-cleanup","build-cleanup":"rimraf dist/helpers/log.ts && rimraf dist/helpers/properties.ts && rimraf dist/web-ifc-api.ts && rimraf dist/ifc-schema.ts","build-debug":"npm run build-wasm-debug && npm run build-api && npm run build-cleanup","publish-repo":"npm run set-version && cd dist && npm publish","build-publish-repo":"npm run build-release && cpy ./npmrc ./dist/  --rename=.npmrc && cp ./LICENSE.md ./dist && cd dist && npm publish","copy-to-dist":"make-dir dist && cpy \"src/cpp/build_wasm/*.js\" dist &&  cpy \"src/cpp/build_wasm/*.wasm\" dist ","copy-debug-to-dist":"make-dir dist && cpy \"src/cpp/build_wasm_debug/*.js\" dist &&  cpy \"src/cpp/build_wasm_debug/*.wasm\" dist ","build-wasm-debug":"make-dir src/cpp/build_wasm_debug && cd src/cpp/build_wasm_debug && emcmake cmake .. -DEMSCRIPTEN=true -DCMAKE_BUILD_TYPE=Debug   && emmake make && npm run copy-debug-to-dist","build-wasm-release":"make-dir src/cpp/build_wasm     && cd src/cpp/build_wasm       && emcmake cmake .. -DEMSCRIPTEN=true -DCMAKE_BUILD_TYPE=Release && emmake make && npm run copy-to-dist","build-api":"make-dir dist/helpers && npm run build-ts-api && npm run build-web-ifc-api-browser && npm run build-web-ifc-api-node && npm run build-web-ifc-api-iife &&cpy README.md dist && cpy package.json dist","build-ts-api":"make-dir dist/helpers && cpy \"src/ts/*.ts\" dist && cpy \"src/ts/helpers/*\" dist/helpers --flat && tsc  --incremental --emitDeclarationOnly && cpy dist/web-ifc-api.d.ts . --rename=web-ifc-api-node.d.ts","build-web-ifc-api-node":"make-dir dist && esbuild dist/web-ifc-api.ts --define:__WASM_PATH__=\\\"./web-ifc-node\\\" --bundle --platform=node --outfile=./dist/web-ifc-api-node.js","build-web-ifc-api-browser":"make-dir dist && esbuild dist/web-ifc-api.ts --bundle --format=esm --define:__WASM_PATH__=\\\"./web-ifc\\\" --outfile=./dist/web-ifc-api.js","build-web-ifc-api-iife":"make-dir dist && esbuild dist/web-ifc-api.ts --bundle --format=iife --define:__WASM_PATH__=\\\"./web-ifc\\\" --global-name=WebIFC --outfile=./dist/web-ifc-api-iife.js","build-viewer":"cd examples/viewer/ && make-dir dist && node makesrc.js && esbuild --bundle web-ifc-viewer.ts --outfile=./dist/web-ifc-viewer.js && rimraf ts_src.js && cpy index.html dist && cpy ../../dist/web-ifc.wasm dist/web-ifc.wasm && cpy ../../dist/web-ifc-mt.js dist/web-ifc-mt.js && cpy ../../dist/web-ifc-mt.wasm dist/web-ifc-mt.wasm && cpy ../example.ifc dist/example.ifc","dev":"npm run build-viewer && cd examples/viewer/dist && ws -p 8080 --cors.opener-policy same-origin --cors.embedder-policy require-cor","docker-build":"docker build -t web-ifc .","docker-run":"npm run docker-run-container && npm run docker-get-compiled-files ","docker-run-container":"docker run --rm -d -p 3000:5000 --name web-ifc-container web-ifc","docker-get-compiled-files":"docker cp web-ifc-container:/web-ifc-app/dist .","postversion":"node src/setversion.js","benchmark":"ts-node ./tests/benchmark/benchmark.ts","regression":"node --max-old-space-size=8192 ./tests/regression/regression.mjs","regression-update":"node --max-old-space-size=8192 ./tests/regression/regression.mjs update","test":"jest  --runInBand ","gen-docs":"typedoc --out dist/docs && cpy ./banner.png ./dist/docs","usage_example":"cd examples/usage  && ts-node index.ts"},"author":{"name":"web-ifc"},"devDependencies":{"@types/jest":"^30.0.0","@types/three":"^0.181.0","adm-zip":"^0.5.10","cpy-cli":"^5.0.0","esbuild":"^0.27.0","jest":"^30.0.3","local-web-server":"^5.2.1","make-dir-cli":"^4.0.0","monaco-editor":"^0.55.1","rimraf":"^6.0.0","three":"^0.181.0","ts-jest":"^29.3.2","ts-node":"^10.9.2","typedoc":"^0.28.3","typescript":"^5.8.3","vblob":"^1.1.0"},"browser":{"crypto":false,"path":false,"fs":false},"_id":"@ademattos/web-ifc@0.0.75","gitHead":"75966b9a0847237b96ca6179c3d5a88d9ee7c3d8","types":"./web-ifc-api-node.d.ts","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-bQXlxUmt7nvVXMB+bf956BtWVPwnGx19Qp/bRvLx4ndFrJI9bA4+fUckbVr8xQE6+xb7fcKStruKu+hz1rcQgg==","shasum":"994ba39b6d5bca1f5c5790d7e83994ce80ac13ea","tarball":"https://registry.npmjs.org/@ademattos/web-ifc/-/web-ifc-0.0.75.tgz","fileCount":15,"unpackedSize":24137868,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBSo+P3DSR9wL3gpmB/Sy1/7oxY1AVS60I1FxwXFn5FwAiAr7sa0/173LEcJE24TioXT4bKdhYjWwsCrZqc/RwHQBQ=="}]},"_npmUser":{"name":"ademattos","email":"demattosanthony@gmail.com"},"directories":{},"maintainers":[{"name":"ademattos","email":"demattosanthony@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/web-ifc_0.0.75_1768506684886_0.45364832308498726"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-15T19:51:24.783Z","0.0.75":"2026-01-15T19:51:25.165Z","modified":"2026-01-15T19:51:25.356Z"},"maintainers":[{"name":"ademattos","email":"demattosanthony@gmail.com"}],"description":"ifc loading on the web","author":{"name":"web-ifc"},"license":"MPL-2.0","readme":"<p align=\"center\">\n  <a href=\"https://thatopen.com/\">TOC</a>\n  |\n  <a href=\"https://thatopen.github.io/engine_web-ifc/docs\">web-ifc documentation</a>\n  |\n  <a href=\"https://docs.thatopen.com/intro\"> platform documentation</a>\n  |\n  <a href=\"https://thatopen.github.io/engine_web-ifc/demo\">demo</a>\n  |\n  <a href=\"https://people.thatopen.com/\">community</a>\n  |\n  <a href=\"https://www.npmjs.com/package/web-ifc\">npm package</a>\n</p>\n\n![cover](banner.png)\n\n<h1>Web IFC <img src=\"https://thatopen.github.io/engine_components/resources/favicon.ico\" width=\"32\"/></h1>\n\n[![NPM Package][npm]][npm-url]\n[![NPM Package][npm-downloads]][npm-url]\n\n**web-ifc** is a javascript library to read and write ifc files, at native speeds. **web-ifc** is part of the [That Open Company](https://thatopen.com) project, which aims to lower the threshold for developing open BIM applications.\n\n## Install\n\n`npm install web-ifc`\n\n## Quick setup\n\n```JavaScript\nconst WebIFC = require(\"web-ifc/web-ifc-api.js\");\n\n// initialize the API\nconst ifcApi = new WebIFC.IfcAPI();\n\n// initialize the library\nawait ifcApi.Init();\n\n// open a model from data\nlet modelID = ifcApi.OpenModel(/* IFC data as a string or UInt8Array */, /* optional settings object */, );\n\n// the model is now loaded! use modelID to fetch geometry or properties\n// checkout examples/usage for some details on how to read/write IFC\n\n// close the model, all memory is freed\nifcApi.CloseModel(modelID);\n\n```\n\nSee [examples](https://github.com/ThatOpen/engine_web-ifc/tree/main/examples/usage) for more details on how to use web-ifc.\n\n## Current Build\n\nThe current live build of web-ifc is available [here](https://thatopen.github.io/engine_web-ifc/build.zip). Using this allows you to test newest fixes before we make a release. If you wish to use this version then download the zip file and place the contents of the dist folder manually into your node_modules/web-ifc folder. I.e if you are using web-ifc-three then it will be node_modules/web-ifc-three/node_modules/web-ifc. Please note you must replace the javascript and the WASM.\n\n## Requirements\n\nThese are the requirements needed to build web-ifc (only for those that wish to build their own version).\n\n1. Node v16 or later\n2. NPM v7 or later\n3. EMSCRIPTEN v3.1.44 or later\n4. CMAKE v3.18 or later\n\n## Regression Testing\n\nWe have a library of test models in the tests/public folder. If you have a model you would like to contribute please open a PR.\n\nYou can run regression tests on all these models by running `npm run regression`. It will alert you if any of the sample model geometry has changed. If the change is correct you can refresh the regression tests by running `npm run regression-update`.\n\n## Building WASM module\n\n### Setting up emscripten and build system\n\nThe WASM library is built through emscripten, please see [the emscripten installation guide](https://emscripten.org/docs/getting_started/downloads.html) for information on how to set up emscripten. Afterwards `emsdk_env` needs to be in your path.\n\nTo build the WASM you also need CMAKE [see here](https://cmake.org/download/) and (on windows) MINGW [see here](https://sourceforge.net/projects/mingw/) - once installed (and in your path) run `npm run setup-mingw` to configure the environment for web-ifc.\n\n### WASM library\n\nRun `npm install` to install all dependencies.\n\nRun `npm run setup-env` whenever you open a new terminal, this will set up the required emscripten environment variables for you to compile code.\n\nRun `npm run build-release` to build a release version of the wasm binary and the accompanying web-ifc api. It will be placed in `./dist`.\n\nIf you wish to build the WASM with debugging enabled you can run `npm run build-debug`. This will enable you to inspect debugging information better when running web-ifc.\n\nRun `npm run dev` to launch a development server with a basic ifc file viewer.\n\n### Build Files\n\nThe output of the build process consts of the following files:\n\n1. web-ifc.wasm - The wasm (compiled C++) to run in the browser\n2. web-ifc-mt.wasm - The wasm (compiled C++) to run in the browser if multi-threading is supported.\n3. web-ifc-node.wasm - The wasm (compiled C++) to run in node\n4. web-ifc-api-node.js - Compiled javascript wrapper for the wasm to run in node.\n5. web-ifc-api-node.d.ts - Typescript definitions for the web-ifc api (for node)\n6. web-ifc-api.js - Compiled javascript wrapper for the wasm to run in browser.\n7. web-ifc-api.d.ts - Typescript definitions for the main web-ifc API\n8. ifc-schema.d.ts - Typescript definitions for the IFC schema\n9. helpers/properties.d.ts - Typescript definitions for the properties aspect of the web-ifc API\n10. helpers/log.d.ts - Typescript definitions for the logger aspect of the web-ifc API\n11. web-ifc-mt.worker.js - Webworker javascript to enable multi-threading in the browser.\n\n## Stand alone C++\n\nAlthough the primary focus of the library is to be used through WebAssembly in the browser/nodejs, the project can be used stand-alone as a c++ library or executable. See [here](https://github.com/ThatOpen/engine_web-ifc/blob/main/src/cpp/test/web-ifc-test.cpp) for a simple entry point to get started.\n\n[npm]: https://img.shields.io/npm/v/web-ifc\n[npm-url]: https://www.npmjs.com/package/web-ifc\n[npm-downloads]: https://img.shields.io/npm/dw/web-ifc\n","readmeFilename":"README.md","_rev":"1-bd8104a7d8bff444e6810f283d296f4a"}