Commit Graph
3 Commits
Author SHA1 Message Date
me0nline 78b3f949c3 fix(assets): unified padded canvas eliminates tail clipping and fixes animation scaling
Workcat's tail flick (-15% left), paw reach (+9% right), and stretch motions
extend beyond the nominal cat bounding box. Previously, frames were drawn
onto a compact 144x110 canvas without padding, causing negative offsets
(e.g. ox=-22px on tail) to truncate the tail tip and create mismatched scales.

Fixes:
- Added padding (pad_x=20%, pad_y=20%) to the render canvas so all extended
  poses (tail swings to x=16, paw strikes to x=185) fit completely without clipping.
- Unified the coordinate system: walk, tail, stretch, paw, and scruff now share
  the exact same body scale (height ~93-94px) and feet baseline (y=128).
2026-09-08 23:33:12 +02:00
me0nline 145971f6ab fix(assets): correct walk frame scaling -- remove 1.25 overcorrection and wrong GAIT_SHIFT
The walk polygon was rendered 25% too large due to an erroneous * 1.25
factor on scale_x / scale_y. On top of this, GAIT_SHIFT_X=-6.383 and
GAIT_SHIFT_Y=3.76 (internal cat.js group transforms) were incorrectly
ported as canvas offsets, pushing the polygon partially above the top
edge of the overlay window (visible clipping).

Root cause: the SVG viewBox is 0 0 150 120. Walk polygon coordinates
span 4-145 in X and 8-112 in Y -- already fitting the viewBox with no
additional scaling or translation needed.

Fix: use scale_x = (cat_width / 150) * SS and scale_y = (cat_height / 120) * SS
with zero offset. Walk frame now renders at the same visual size as paw/
scruff/tail/stretch frames (all on a cat_width x cat_height canvas).

Result: cat body is no longer clipped at the top and matches size of all
other animation states.
2026-09-08 23:20:57 +02:00
me0nline eaae0b96aa feat(assets): add asset manager for Workcat sprites, animations, and coats 2026-09-08 23:02:50 +02:00