model/gltf: mesh.extras.targetNames from and to glTF mesh extras; ops/MeshOps.merge: targets = true concatenates morph targets by name

This commit is contained in:
4DBug committed 2026-11-02 21:53:22 -06:00
1 parent 835ddde65b
commit 4231149f3e
6 files changed
+148 -2

No files matched your search

+1 -1
View File
@@ -246,7 +246,7 @@ Every function accepts any accessor type and writes `f32` attributes and `u32` i
| Function | Does |
|---|---|
| `merge(scene, opts?)` | bakes every primitive (node transforms applied) into one triangle primitive; `byMaterial = true` returns one per material. Lines and points are skipped; skins / morphs stay in rest pose |
| `merge(scene, opts?)` | bakes every primitive (node transforms applied) into one triangle primitive; `byMaterial = true` returns one per material. Lines and points are skipped; skins / morphs stay in rest pose; `targets = true` keeps the morph targets, merged by name (`mesh.extras.targetNames`, else by index) and zero where a primitive lacks one, named in the result's `extras.targetNames` with default weights in `extras.weights` |
| `bounds(primitive \| scene)` | `min { x, y, z }, max { x, y, z }` (a scene: world space) |
| `transform(prim, matrix)` | in place: positions, normals, tangents (and morph deltas); a mirroring matrix flips the winding |
| `triangulate(prim, opts?)` | a new triangle primitive from strips, fans and polygons (`method = "earclip"` default, or `"fan"`) |