rive-app / rive-react

React runtime for Rive
https://rive-app.github.io/rive-react
MIT License
756 stars 26 forks source link

Accessing state machine of nested artboard #188

Open annarack opened 1 year ago

annarack commented 1 year ago

Hello! :)

Short background on what I'm working on: I have a multiscreen setup on a wall where each monitor is attached to a single computer. The idea is to have a dynamic background animation that spans over all those monitors. Since I would love to have that dynamic with different triggerable transitions I'm currently looking into rive. Fallback option will be a video solution but then I loose the dynamic interaction/transitions...

Definitely love how easy it is to create animations and build state machines with rive! Current problem tho is: I went the path of creating one big artboard that contains the different background animations for the whole wall. Also a state machine with different layers. Idea was to have an artboard for each screen that shows a specific area of the full composition, that I can export then. I used the full animation composition (scaled and moved to correct area) as a nested artboard for that. The only thing now is, that I need access to the state machine of the nested artboard. Didn't manage to do so in the app and haven't found a way programmatically yet.

Is this too much of a special case, or is that possible somehow?

zplata commented 11 months ago

Hey @annarack - there isn't a way yet to set nested state machine inputs, but it is definitely on the roadmap!

ascholz81 commented 2 months ago

Any update on this roadmap item? I have a site with nested artboards and events that I need to listen to in rive-react. I am only able to get events from the default state machine, even though I provide the Rive hook all the state machine names.

skittlesaur commented 2 days ago

Any update on this? I have exposed the input to its parent, but I can’t find a way to update this input programmatically.

CleanShot 2024-07-02 at 09 02 05@2x