I built a 2D rig compiler for AI agents, and the validator's messages are the whole UI
Описание и применение
rig-c преобразует тихие ошибки парсера в явные сообщения, строго валидирует руны и предоставляет инструменты для проверки и веб‑воспроизведения, обеспечивая надёжные 2D‑риг‑ы, генерируемые ИИ.
Задача
AI agents that generate 2D character rigs receive only silent parse success feedback, allowing broken rigs to pass unnoticed.
Результат
rig-c turns silent parser failures into explicit, actionable error messages, enforces strict validation before emission, and provides tools for human review and web playback, enabling reliable AI‑generated 2D rigs.
Рабочий процесс
- 1. Use @rig-c/parts to convert a painting and its layer decomposition into rig parts, bones, meshes, and a looping idle.
- 2. Use @rig-c/pose to clean and retarget a pose sequence onto the rig, refusing sequences without a clean record.
- 3. Run rig-c to compile, validate against the spine profile, and emit the rig JSON only if all assertions pass.
- 4. Use @rig-c/review to render the built rig, inspect it in the browser, and export feedback bound to frames, bones or slots.
- 5. Optionally use @rig-c/play to play the compiled model in a web page via CSS matrix transforms or a single canvas.
Доказательства
From the project's own list of what a standard parser lets through unremarked: a 4.2-shaped constraint that simply vanishes in 4.3, a mismatched size: that collapses every UV, a four-number curve array that yields NaN, a mesh whose vertex count equals its UV count, which silently loses its bone weights.
The compiler never guesses a default from the art, never re‑measures a plate, never fills in a "reasonable" fallback.
rigc build compiles, validates, and writes to disk only if every named assertion of its profile passes: 36 under the default spine profile.
@rig-c/review puts it beside the source footage and exports feedback bound to a frame, bone or slot.
The player puts the rigid tier in the DOM: one absolutely positioned <img> per slot, a single matrix write per frame, composited by the browser.
- Дата записи: 2026-10-23T11:26:25.426Z