feat(transition): add corner_reveal, a rectangular uncover anchored at a corner - #207
Merged
Conversation
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.
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
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):
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;irisis a circle;slidetranslates both frames together. Adissolvewas the closest available approximation and it loses the gesture entirely.API
{ "type": "corner_reveal", "duration": 0.5, "corner": "top_right", "easing": "ease_in_out" }cornerselects 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:
Tests
Five, pinning the geometry rather than describing it:
corneris decorationcargo test --workspacegreen,cargo fmt --checkandcargo clippy --all-targets -- -D warningsclean.