Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: add support for gradients in vector n-slicer
This PR can be reviewed commit-by-commit. It mirrors the changes in the editor in https://github.com/rive-app/rive/pull/8413 Demo:  Note that the gradient moves with the node. Some highlights: 1. I've introduced a nslicer dirt that's used to represent axes changing (instead of re-using dirt.path). 2. `updateMapWorldPoint` is a lambda function that caches what can be reused between consecutive vertex deforming calls e.g. on the same path, the NSlicer's axes stops don't change, so we don't need to calculate the inverse transform of the NSlicer when deforming every vertex. 3. There's a Deformer class that's the base of the point deformer and the render path deformer. The difference here is that in C++ I had to introduce an asComponent function to make it easy for a deformer to be cast between a RenderPathDeformer and a PointDeformer. I need to do this because the deformer on the shape has to be the same as the deformer on the gradient, so I need to cast the shape deformer to a render path deformer. Diffs= 91d092f4fc runtime: add support for gradients in vector n-slicer (#8447)
- Loading branch information