Releases: SunboX/occt-import-js
Releases · SunboX/occt-import-js
Release list
@sunbox/occt-import-js 0.0.28
@sunbox/occt-import-js 0.0.28
This release makes the packaged OCCT runtime directly usable by browser workers and improves STEP, IGES, and BREP import throughput.
Changes
- Release WASM is compiled with
-O3instead of size-first-Oz. On the repository STEP benchmark, median import time fell from 1674 ms in 0.0.25 to 975 ms in 0.0.28, a 41.7% improvement. dist/occt-import-js-worker.jsnow loads the generated ESM module correctly, caches the module, WASM bytes, and OCCT instance, preserves cache-busting query parameters, and retries resources after initialization errors.- The worker accepts
{ format, buffer, params }and posts the native import result. Consumers can transfer the input buffer without an additional copy. - The distribution now marks its generated JavaScript as ESM, so the package entrypoint can be imported directly from Node.js. CommonJS
require()consumers must move toimport. - Unix and Windows release builds now generate the same worker and ESM package metadata.
- The shipped Node.js and browser examples now execute the ESM entrypoint and provide WASM bytes explicitly where Node.js requires them.
Compatibility
The generated runtime is ESM. Browser consumers should use a module import or the packaged worker; classic-script globals and importScripts are no longer part of the supported contract.
occt-import-js 0.0.27
Release 0.0.27 publishes the accumulated package, example, build, and CI updates since the last GitHub release.
Highlights
- Adds browser-focused STEP viewer examples, including ESP12 and FT601Q viewers with reusable static server helpers.
- Ships ES module/WebAssembly package support and typed-array memory handling improvements for browser consumers.
- Updates package metadata for the @SunboX scope and routes publishing to GitHub Packages.
- Adds automated release workflows for rebuilding dist output, publishing the GitHub package, and uploading dist, native, and header assets.
- Hardens Windows and macOS native build CI with Ninja response files, Winsock linkage, NOMINMAX, constrained Windows parallelism, and current runner images.
- Excludes the full OCCT submodule from npm package contents while retaining the packaged runtime, examples, tests, headers, and build scripts.
- Adds repository agent instructions and bumps package metadata to 0.0.27.
Release process
- Fetched origin and upstream, fast-forwarded local main to origin/main, and found no real local or remote branches remaining unmerged into main.
- Public npm did not contain @sunbox/occt-import-js@0.0.27; GitHub Packages metadata requires authenticated package access.
- Target commit: 99b71a7.
- Tag: 0.0.27.
Validation
- npm test: 43 passing.
- No check:format script is defined in package.json.
- npm publish --dry-run --cache /private/tmp/sunbox-occt-import-js-npm-cache: succeeded for @sunbox/occt-import-js@0.0.27, 138 files, 5.4 MB package size, 17.3 MB unpacked size.
- npm view @sunbox/occt-import-js@0.0.27 version: npmjs reported no matching version before release.
occt-import-js 0.0.26
Changes
- Add FT601Q STEP viewer example and bundled FT601Q model.
- Share the example static server between ESP12 and FT601Q viewers.
- Bump @sunbox/occt-import-js package version to 0.0.26.
Release workflows will build and attach dist/native artifacts and publish the package to GitHub Packages.
occt-import-js 0.0.25
Highlights
- Adds faster binary import by copying input bytes through a typed-array memory view instead of per-element embind conversion.
- Emits typed geometry arrays for imported meshes:
Float32Arrayfor positions and normals, andUint32Arrayfor indices. - Adds mesh metadata (
vertex_count,triangle_count, andbounds) so consumers can avoid recalculating common statistics in JavaScript. - Adds compact BREP face color runs through
brep_face_runs, plusbrep_face_countandcolored_brep_face_countmetadata. - Adds an
includeBrepFacesimport option. Set it tofalseto skip full per-face export while retaining compact face-run data. - Improves XCAF/STEP face color handling by collecting presentation style settings, including surface, material, and curve colors.
ESP_12 Viewer
- Updates the ESP_12 example viewer to consume the module build directly.
- Uses compact face runs and shared materials for colored face rendering.
- Disables edge rendering by default and switches to on-demand rendering to reduce work after model load.
- Uses importer-provided bounds and count metadata to avoid expensive scene traversal and statistics recalculation.
- Keeps the local example server covered with tests for the viewer route, wasm MIME type, bundled STEP model, and optimized rendering setup.
Release And Packaging
- Bumps the package version to
0.0.25. - Removes generated
dist/files from git tracking and ignoresdist/in the repository. - Adds
.npmignoreso npm packages still include rebuiltdist/files even though the repository ignores them. - Adds
npm run rebuild:distplus cross-platform wrapper scripts for rebuilding distribution files. - Adds a GitHub Actions workflow to rebuild and upload
distartifacts frommain. - Updates the tag-triggered npm publish workflow to check out submodules, install with
npm ci, rebuilddist, and publish the rebuilt package.
Tests
- Adds coverage for typed geometry arrays, mesh bounds/count metadata, compact BREP face runs, optional full BREP face export, ESP_12 face presentation colors, viewer optimizations, and the dist rebuild wrapper.
- Verified locally with:
npm run rebuild:dist(31 passing tests plus rebuilt distribution)npm run test:esp12-server(5 passing tests)npm pack --dry-run --json(confirmed JS, wasm, worker, and license files are included in the0.0.25package)