Repository navigation
feat(graphics): add MeshGradient API and paint serialization - #1286
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1408fb9f72
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case let .meshGradient(data): | ||
| self = .meshGradient(.zero - data) |
There was a problem hiding this comment.
Negate mesh animation data without subtracting from empty arrays
When subtracting mesh animation data from .zero, this expression discards all vertex positions and colors instead of negating them. Both payloads use AnimatableArray, whose zero contains no elements and whose subtraction only processes the minimum operand count, so .zero - data leaves those arrays empty while negating only the background. Applying that result to a mesh then leaves its geometry and vertex colors unchanged because their setters ignore the empty payloads. Scale a copy of data by -1 instead so negation preserves and reverses every component.
Useful? React with 👍 / 👎.
🛠️ Tuist Run Report 🛠️Tests 🧪
Builds 🔨
Reported by Tuist, faster builds and reliable tests for Xcode, Gradle, Bazel, and more. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1286 +/- ##
==========================================
+ Coverage 34.45% 34.62% +0.16%
==========================================
Files 1080 1081 +1
Lines 87135 87398 +263
==========================================
+ Hits 30025 30263 +238
- Misses 57110 57135 +25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Close #1222
MeshGradientas a view and shape style with support for vertex positions, Bézier control points, and both dynamic and resolved colors.GraphicsContext.Shading.meshGradient(_:)and support animation of mesh geometry, vertex colors, and the background color.Dependency