2.2 KiB
2.2 KiB
Title
Adopt row-based 7x8 sprite animation semantics with backward-compatible state aliases.
Severity
P2
Summary
Standardize sprite.png packs so each of the 7 rows maps to semantic animation groups, while
keeping runtime compatibility with existing state names (active, success, error).
Also retune 8-frame animation tempo to a slower profile for readability.
Scope
assets/sprite-packs/{default,ferris,demogorgon}/manifest.jsoncrates/sprimo-runtime-core/src/lib.rscrates/sprimo-app/src/main.rs- docs:
docs/SPRITE_PACK_SCHEMA.mddocs/TAURI_FRONTEND_DESIGN.md
Row Mapping Contract
- row 1 (
0..7):idle - row 2 (
8..15):happy,love, aliasactive - row 3 (
16..23):excited,celebrate, aliassuccess - row 4 (
24..31):sleepy,snoring - row 5 (
32..39):working - row 6 (
40..47):angry,surprised,shy, aliaserror - row 7 (
48..55):dragging
One-shot defaults:
celebrateandsuccess: one-shot- all others: loop
Implementation Notes
- Runtime state mapping updated:
Draggingnow maps to"dragging"instead of"idle"in runtime-core and Bevy frontend.
- All bundled sprite-pack manifests now expose row-based names and compatibility aliases.
- Added runtime-core unit test to confirm
SetState::Draggingselects"dragging". - Updated schema/design docs to formalize the row convention.
- Retuned bundled pack fps profile:
- loops:
1fps - one-shot
celebrateandsuccess:2fps
- Tauri renderer-level pacing adjusted:
- added global frame interval slowdown factor (
x2) in Pixi ticker to further reduce perceived speed without changing manifest schema type (fpsremains integer).
- Added persisted tauri slowdown factor control:
- config key:
frontend.tauri_animation_slowdown_factor(integer, range1..20, default3) - new tauri commands/events to read/update factor at runtime
- settings window slider added for live tuning and persistence.
Verification
Commands Run
cargo test -p sprimo-runtime-corecargo check -p sprimo-tauricargo check -p sprimo-app
Result
- Status:
Fix Implemented - Notes: packaged runtime visual verification pending.