Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
editor: nine-slicing core data type definitions
This PR adds the core data types to support n-slicing. There are three main types: Axis, NSlicer and NSlicerTileMode. 1. Axis: I didn't want to make this super specific, since it could be used for grids later. So rn, it just represents some position in some dimension, and can either be a value in terms of a positional unit (like 10px) or bounds percentage (like 10%). 2. NSlicer: It's as simple as a component gets, we'll just use it to be a parent of all the n-slicer Axes, and have it be a child of Image later. 3. NSlicerTileMode: The main data here is 'style'. We said to use patchX and patchY separately from patchIndex. The last one is persisted in file, while the other two are actually used at runtime. The non-json files are auto generated, with the runtime json files copy pasted from the dev/defs version. I verified that the editor still runs, and the runtime also runs without error. Next up, I'll use these definitions to change editor behavior. Documentation: https://www.notion.so/rive-app/9-Slice-Tech-Proposal-Image-only-50b25ea8e79c4efabb681110e288f064#15f3a49ce3534baeafc31c37fb30cc0b For a rough direction of how to implement nine-slicing, check out this research branch: https://github.com/rive-app/rive/compare/master...susan/nine-slice-research Diffs= ed56d2de6 editor: nine-slicing core data type definitions (#7840)
- Loading branch information