From 2b463b624d516485fc4e9e7d7f85612b3d8133d0 Mon Sep 17 00:00:00 2001 From: susan101566 Date: Wed, 14 Aug 2024 22:03:49 +0000 Subject: [PATCH] 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) --- .rive_head | 2 +- wasm/submodules/rive-cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.rive_head b/.rive_head index 2db670ff..ac7db820 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -4fb978a9230fc006b5e575364f062907e7dd2afe +ed56d2de61afb05abd99e8bab6775b63ab89f1a3 diff --git a/wasm/submodules/rive-cpp b/wasm/submodules/rive-cpp index a7a0a016..f450f956 160000 --- a/wasm/submodules/rive-cpp +++ b/wasm/submodules/rive-cpp @@ -1 +1 @@ -Subproject commit a7a0a016a2b08a755aba67885819c0e64dda9a57 +Subproject commit f450f95611a5485741f959d816833f2ee1f76a24