Repository navigation
Frame full-screen skills on their own background art - #20
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
js/render.js: each pet player records the extent of a sequence's full-screen background (cam(si)), andfit()frames it withcoverFit: 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.🤖 Generated with Claude Code