I built a 2D rig compiler for AI agents, and the validator's messages are the whole UI
说明与用途
rig-c 将解析器的静默错误转换为明确的错误信息,在发出之前强制执行严格验证,并提供人工审查和网页播放工具,确保 AI 生成的 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