Skip to content

Commit

Permalink
feat: add count and query APIs for events and text runs at the Artboa…
Browse files Browse the repository at this point in the history
…rd 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<rive::TextValueRun>()`/`find<rive::Event>()` 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)
  • Loading branch information
zplata committed Oct 9, 2023
1 parent 9fb1eee commit f57aac2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f95f54140657f8b8726392a3d0b4036bb4ad70fb
22077bedae4c277e5e8a81c732167ab5d559917c
2 changes: 1 addition & 1 deletion .rive_renderer
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cd2acf7763d53681991b732b7de4737cf88731d8
9104efd47835d559c1f685129e8c1224afae39f3
2 changes: 1 addition & 1 deletion submodules/rive-cpp

0 comments on commit f57aac2

Please sign in to comment.