Commit 562e5f4
authored
feat(transition): add corner_reveal, a rectangular uncover anchored at a corner (#207)
* fix(background): make pixel_grid's twinkle reach both ends of the range
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.
* feat(transition): add corner_reveal, a rectangular uncover anchored at 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.1 parent 117d45e commit 562e5f4
4 files changed
Lines changed: 176 additions & 4 deletions
File tree
- .claude/skills/rustmotion
- crates
- rustmotion-core/src
- engine
- schema
- rustmotion/src/encode/video
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
732 | 732 | | |
733 | 733 | | |
734 | 734 | | |
735 | | - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
736 | 750 | | |
737 | 751 | | |
738 | 752 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
49 | 108 | | |
50 | 109 | | |
51 | 110 | | |
| |||
717 | 776 | | |
718 | 777 | | |
719 | 778 | | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
596 | 609 | | |
597 | 610 | | |
598 | 611 | | |
599 | 612 | | |
600 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
601 | 617 | | |
602 | 618 | | |
603 | 619 | | |
| |||
641 | 657 | | |
642 | 658 | | |
643 | 659 | | |
| 660 | + | |
644 | 661 | | |
645 | 662 | | |
646 | 663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| 168 | + | |
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| |||
294 | 299 | | |
295 | 300 | | |
296 | 301 | | |
| 302 | + | |
297 | 303 | | |
298 | 304 | | |
299 | 305 | | |
| |||
348 | 354 | | |
349 | 355 | | |
350 | 356 | | |
| 357 | + | |
351 | 358 | | |
352 | 359 | | |
353 | 360 | | |
| |||
377 | 384 | | |
378 | 385 | | |
379 | 386 | | |
| 387 | + | |
380 | 388 | | |
381 | 389 | | |
382 | 390 | | |
| |||
548 | 556 | | |
549 | 557 | | |
550 | 558 | | |
| 559 | + | |
551 | 560 | | |
552 | 561 | | |
553 | 562 | | |
| |||
676 | 685 | | |
677 | 686 | | |
678 | 687 | | |
| 688 | + | |
679 | 689 | | |
680 | 690 | | |
681 | 691 | | |
| |||
867 | 877 | | |
868 | 878 | | |
869 | 879 | | |
| 880 | + | |
870 | 881 | | |
871 | 882 | | |
872 | 883 | | |
| |||
936 | 947 | | |
937 | 948 | | |
938 | 949 | | |
| 950 | + | |
939 | 951 | | |
940 | 952 | | |
941 | 953 | | |
| |||
0 commit comments