tawasuyu

tawasuyu/llimphi

Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.

Rust 660Markdown 302TOML 157RON 312382 Definitions

⎇ main llimphi-mesh/README.md Markdown · 25 lines · 1.0 KB History raw

chore: refresco desde el monorepo — 27 crates nuevos (anim, lottie, svg, mesh, image, layer, test, wire-view, widgets rag-sidebar/router/lazy-list/rive-button) y sync de los 95 existentes 93253cc22 · Sergio ·

1# llimphi-mesh
2
3Rendering of deformable meshes to a `vello::Scene`.
4
5The bone and skinning maths live in `llimphi_anim::skel`; this crate only
6**paints** the already-deformed mesh. It receives the mesh (`Mesh`) plus the
7deformed positions of its vertices (what `Mesh::deform` returns) and a
8model→screen `xform`, and offers the two routes the spike validated against
9vello 0.7:
10
11- `paint_solid` — fills each deformed triangle with a colour (vector mesh /
12  debug). Trivial.
13- `paint_textured` — a **textured** mesh: per triangle, it clips to the deformed
14  triangle and draws the image with the affine mapping its UVs to the deformed
15  position (piecewise-affine warp). Cost = one clip layer per triangle; careful
16  with meshes of thousands of triangles.
17- `paint_wireframe` — strokes the triangle edges (to see the deformation; ideal
18  for demos and debugging).
19
20Framing helpers: `rest_bounds` (the mesh's bbox at rest) and `fit_transform` (the
21affine fitting those bounds, centred, into a `PaintRect`).
22
23---
24
25Part of **llimphi** — see [llimphi](../README.md).

README.md

llimphi-mesh

Rendering of deformable meshes to a vello::Scene.

The bone and skinning maths live in llimphi_anim::skel; this crate only paints the already-deformed mesh. It receives the mesh (Mesh) plus the deformed positions of its vertices (what Mesh::deform returns) and a model→screen xform, and offers the two routes the spike validated against vello 0.7:

Framing helpers: rest_bounds (the mesh's bbox at rest) and fit_transform (the affine fitting those bounds, centred, into a PaintRect).


Part of llimphi — see llimphi.