Skip to content

Frame full-screen skills on their own background art - #20

Merged
erupts merged 1 commit into
mainfrom
fix/fullscreen-skill-cover
Dec 1, 2026
Merged

erupts merged 1 commit into
mainfrom
fix/fullscreen-skill-cover

Conversation

@erupts

@erupts erupts commented Dec 1, 2026

Copy link
Copy Markdown
Member

What

  • js/render.js: each pet player records the extent of a sequence's full-screen background (cam(si)), and fit() frames it with coverFit: the smallest scale that still covers the canvas, cropping only the overflowing axis and staying as close to the usual camera centre as the art allows.
  • js/battle.js: the battle camera eases onto the attacker's background while a full-screen skill plays and eases back afterwards. Damage numbers follow the camera.

Why

With the fixed camera from #18/#19, wide stages (the battle stage is about 2.55:1) still showed gaps beside the background, because background art varies in size and is roughly 1.8–2:1.

Notes

When the stage and the art differ in aspect ratio, one axis is necessarily cropped (top and bottom on wide stages, the sides on narrow ones).

Testing

  • node tools/smoke.js: all 52 checks pass.
  • Headless screenshots of four pets' full-screen skills (1400845, 1400644, 2341, 4872) in preview and battle: backgrounds cover the stage with no gaps.

🤖 Generated with Claude Code

A fixed camera left gaps beside full-screen skill backgrounds on wide stages
(the battle stage is about 2.55:1). Each player now records the extent of a
sequence's full-screen background and frames it with the smallest scale that
still covers the canvas, cropping only the overflowing axis and keeping the
view as close to the usual camera centre as the art allows.

In battle the camera eases onto the attacker's background while a full-screen
skill plays and eases back afterwards; damage numbers follow the camera.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@erupts
erupts merged commit 367e4fa into main Dec 1, 2026
2 checks passed
@erupts
erupts deleted the fix/fullscreen-skill-cover branch December 1, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant