Skip to content

feat(transition): add corner_reveal, a rectangular uncover anchored at a corner - #207

Merged
LeadcodeDev merged 2 commits into
mainfrom
feat/corner-reveal-transition
Aug 12, 2026
Merged

feat(transition): add corner_reveal, a rectangular uncover anchored at a corner#207
LeadcodeDev merged 2 commits into
mainfrom
feat/corner-reveal-transition

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

What

Reproducing a reference piece turned up a scene transition none of the thirteen existing types can express. Measured frame by frame, over 15 frames (0.5 s):

right top left bottom
f3 → f18 pinned 3832 pinned 0 2160 → 0 1480 → 2152

Two edges stay on the frame, two travel, and both moving edges advance at once. The incoming scene sits still behind the growing window: it is uncovered, not pushed.

wipe_* moves one full-width band along a single axis; iris is a circle; slide translates both frames together. A dissolve was the closest available approximation and it loses the gesture entirely.

API

{ "type": "corner_reveal", "duration": 0.5, "corner": "top_right",
  "easing": "ease_in_out" }

corner selects which two edges are pinned — top_right (the measured default), top_left, bottom_right, bottom_left — and is inert for every other type.

Verified against the measurement

Rendered at 1920×1080, the same law comes back:

f24  left 1512  right 1916  top 0  bottom  228
f30  left  688  right 1916  top 0  bottom  692
f36  left    0  right 1916  top 0  bottom 1076

Tests

Five, pinning the geometry rather than describing it:

  • the anchored edges never move, at any progress
  • the travelling edges open monotonically, in the direction the corner names
  • empty at 0, exactly the full frame at 1
  • each corner anchors its own pair — otherwise corner is decoration
  • out-of-range progress clamps instead of inverting the rectangle: an inverted rect clips to nothing, and the transition would silently render as a cut

cargo test --workspace green, cargo fmt --check and cargo clippy --all-targets -- -D warnings clean.

The cell alpha oscillated over 0.10..1.00, so a cell never actually went out.
A lattice whose cells only dip to a tenth still reads as a fixed field of
permanent dots, just dimmer — which is not what an animated texture is for.

0.5 + 0.5 * sin gives the full 0 → 1 → 0. The phase still comes from each
cell's own hash, or the whole field blinks in unison.

The test pins the range rather than the fact that something moves: it samples
400 instants and asserts the floor goes under 0.01 and the ceiling over 0.99.
"It animates" and "it reaches zero" are different claims.
…t a corner

Measured on a reference piece, over 15 frames (0.5 s): the right and top edges
stay pinned to the frame while the left travels 2160 -> 0 and the bottom
1480 -> 2152. Both moving edges advance at once, and the incoming scene sits
still behind the growing window — it is uncovered, not pushed.

None of the thirteen existing types expresses that. wipe_* moves a single
full-width band on one axis, iris is a circle, and slide translates both frames
together. The closest approximation, a dissolve, loses the whole gesture.

`corner` selects which two edges are pinned: top_right (the measured default),
top_left, bottom_right, bottom_left. It is inert for every other type.

Five tests pin the geometry rather than describe it: the anchored edges never
move, the travelling ones open monotonically in the direction the corner names,
the ends are empty and full, each corner anchors its own pair, and out-of-range
progress clamps instead of inverting the rectangle — an inverted rect clips to
nothing and the transition would silently look like a cut.
@LeadcodeDev LeadcodeDev added the enhancement New feature or request label Aug 12, 2026
@LeadcodeDev LeadcodeDev self-assigned this Aug 12, 2026
@LeadcodeDev
LeadcodeDev merged commit 562e5f4 into main Aug 12, 2026
3 checks passed
@LeadcodeDev
LeadcodeDev deleted the feat/corner-reveal-transition branch August 12, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant