Skip to content

smart-unwrap 1.0.0: Smart (xatlas) UV unwrap module (37 R11) - #44

Merged
AlexZ005 merged 1 commit into
devfrom
feat/37-mesh
Oct 7, 2026
Merged

AlexZ005 merged 1 commit into
devfrom
feat/37-mesh

Conversation

@AlexZ005

@AlexZ005 AlexZ005 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Roadmap 37 R11 (release 1.28): smart-unwrap 1.0.0 is an installable module that adds Smart (xatlas) to the UV editor's Unwrap menu through api.registerUnwrapBackend. xatlas places seams, flattens the charts and packs them into one 0..1 atlas with no overlaps.

  • Build: xatlas-wasm 0.1.3.
    • The wasm is 177 kB and loads through emscripten's standard instantiateWasm hook. It ships inside the zip and is reached through api.assetUrl, so there is no CDN or network call.
    • watlas was rejected: its debug glue aborts when handed the wasm, and it resolves the wasm relative to the script's URL, which doesn't work for a module loaded from a blob URL.
    • The wasm is loaded on first use and cached; onUnload drops the cache.
  • rotateCharts is off. With it on, xatlas mirrors any chart it turns 90°, so painted text would read backwards there.
  • License caveat: xatlas-wasm declares MIT but ships no license text. The notices for xatlas, thekla_atlas and Fast-BVH are in THIRD_PARTY_LICENSES.txt, which goes into the zip.
  • Node test npm run test:smart-unwrap: 55/55. It runs on a cube, a sphere, a cylinder, a scoped half-sphere and a 12k-triangle sphere. Each check (in range, not degenerate, covers every face, no overlap, wound the right way) is also shown to fail on a deliberately broken result.
  • In-app proof: core e2e uv-smart-unwrap passes 19/0 with two peers, using the real zip (core PR 37 R11: knife polylines, live symmetry, Smart unwrap core half (1.28) core#340).
  • The README modules table and index.json have new entries.

🤖 Generated with Claude Code

…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>
Base automatically changed from dev to main October 7, 2026 08:50
@AlexZ005
AlexZ005 changed the base branch from main to dev October 7, 2026 08:50
Base automatically changed from dev to main October 7, 2026 15:41
@AlexZ005
AlexZ005 changed the base branch from main to dev October 7, 2026 15:41
@AlexZ005
AlexZ005 merged commit 91d1b89 into dev Oct 7, 2026
@AlexZ005
AlexZ005 deleted the feat/37-mesh branch October 7, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant