Repository navigation
Conversation
…packaged wasm (37 R11)
A new installable module that registers an xatlas unwrap through
api.registerUnwrapBackend('xatlas', 'Smart (xatlas)', async run). xatlas cuts the
mesh into charts, flattens them and packs them into a single 0..1 atlas where no
charts overlap.
- The build is xatlas-wasm 0.1.3 (MIT declared, xatlas MIT). Its wasm is 177 kB with
a 6-import C API and a release glue that honours Module.instantiateWasm. watlas
1.0.1 was rejected: its 225 kB embind build ships an ASSERTIONS glue that aborts
on instantiateWasm/wasmBinary and resolves the wasm against import.meta.url.
- vendor.mjs splits the npm package's SINGLE_FILE bundle into assets/xatlas.wasm and
the glue spliced into module.js. It parses the package as text and never runs it.
- The wasm is read through api.assetUrl on the first unwrap and cached. onUnload
drops the cache, and the SDK journals the backend registration itself.
- Welding by exact position gives xatlas the mesh connectivity. Output corners are
mapped back through xref.
- rotateCharts is off because xatlas's packer rotates a chart by transposing it,
which mirrors it. With fixWinding on, every chart comes out unmirrored.
- On failure the module shows a toast and returns null, so core commits nothing.
Tests: npm run test:smart-unwrap (node, no app) covers a cube, a UV sphere, a
cylinder, a scoped half-sphere and a 12k-triangle sphere. It checks properties:
3 corners per face, every uv in [0,1], no zero-area triangle, islands that
partition the faces, no overlap between islands on a 512² raster, CCW winding and
at most 6 islands on the cube. Counterfactuals prove each check catches a broken
result. 55 pass.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
smart-unwrap 1.0.0: Smart (xatlas) UV unwrap module (37 R11)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release merge dev → main for core 1.28.0 (integrator 37-int-128): #44 smart-unwrap 1.0.0 — "Smart (xatlas)" UV unwrap backend (xatlas-wasm 0.1.3 inside the zip, MIT; THIRD_PARTY_LICENSES.txt). Node test 55/0; core e2e uv-smart-unwrap 19/0 (lane), preview-1-28 served it from int-128-modules. After merge: format-1 retag + purge (core RELEASING.md).
🤖 Generated with Claude Code