From f57aac22800d121c33ab2d6fb317f03872649aaa Mon Sep 17 00:00:00 2001 From: zplata Date: Mon, 9 Oct 2023 23:17:41 +0000 Subject: [PATCH] feat: add count and query APIs for events and text runs at the Artboard level, and expose in WASM Will add some tests, but want to get validation before I go much further that this is the approach we want to take to expose Events and Text Runs for a given artboard at the `rive::Artboard` level, similar to the APIs for getting the linear animation/state machine from an `Artboard`. Adding to `ArtboardImporter` seemed most appropriate but not sure there's any caveats or better ways to plumb through adding the events/runs. Maybe @luigi-rosso @philter ? Decided on exposing `textValueRunCount()`/`textValueRunAt()` and `eventCount()`/`eventAt()` APIs on the Artboard at the cpp level to follow existing patterns. This should make it simple for other runtimes to adopt too. Another alternative is just doing an empty `find()`/`find()` call at each runtime level which looks like it returns a list of all the objects. TODO: - [x] Add tests - [x] Check WASM size before/after new bindings Diffs= 22077beda feat: add count and query APIs for events and text runs at the Artboard level, and expose in WASM (#6043) --- .rive_head | 2 +- .rive_renderer | 2 +- submodules/rive-cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.rive_head b/.rive_head index aec9b2c2..8da8b8d6 100644 --- a/.rive_head +++ b/.rive_head @@ -1 +1 @@ -f95f54140657f8b8726392a3d0b4036bb4ad70fb +22077bedae4c277e5e8a81c732167ab5d559917c diff --git a/.rive_renderer b/.rive_renderer index d414cf20..ff5c666d 100644 --- a/.rive_renderer +++ b/.rive_renderer @@ -1 +1 @@ -cd2acf7763d53681991b732b7de4737cf88731d8 +9104efd47835d559c1f685129e8c1224afae39f3 diff --git a/submodules/rive-cpp b/submodules/rive-cpp index c21247a0..74ea24f7 160000 --- a/submodules/rive-cpp +++ b/submodules/rive-cpp @@ -1 +1 @@ -Subproject commit c21247a0ebba7c59be69e938964ecdf75f10917c +Subproject commit 74ea24f7dcfe4a3b5dbb624e7e926c147668f3da