Skip to content

Commit

Permalink
editor and runtime: allow vertices in a vector nslicer to be out of b…
Browse files Browse the repository at this point in the history
…ounds

Followup on #8459, where I returned a vertex untransformed if it's out of bounds of a vector n-slicer. I realized that instead of not transforming, they should be still be transformed, just not scaled. This PR translates the value by offset, and updates both the editor and the runtime. I also added a golden test for vector n-slicing.

All of these clipping changes was to support this leaf animating. Note that a vertex temporarily goes out of bounds:
![vec_oob](https://github.com/user-attachments/assets/5d3eaacf-4711-48cb-8318-a30b152a1864)

About the golden test:
![image](https://github.com/user-attachments/assets/c4dad5b7-4b4f-4de7-9150-156c2fac828c)

Top to bottom,
1. base case, the two 100x100 rectangles should be spaced out
2. same as 1, except the right rectangle should have a radial gradient with a yellow 'halo' in the center
3. the two shapes should look like complete stars. Before this PR btw, the stars would either be cut off or one of the vertices would 'fold back':
![image](https://github.com/user-attachments/assets/305936e8-80bf-4d13-9fe8-43b7d35fbf9f)

4. the 'dog' should be facing right, and the tail should have 4 dashes on it. The dog is actually 'flipped' with a negative width. It also contains a group of vectors. So this test case is making sure that a recursive structure works, as well as negative width.

Diffs=
33dc66a73e editor and runtime: allow vertices in a vector nslicer to be out of bounds (#8495)
  • Loading branch information
susan101566 committed Nov 6, 2024
1 parent 4fc1131 commit 9138225
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cba259e6cd572dfefb5ba930bbe4c7c40ccd6dde
33dc66a73e9632c4fe3161c8dd6a82acd0b82e1f

0 comments on commit 9138225

Please sign in to comment.