Rive events not firing when `stateMachines` param not included
I have a Rive animation that fires custom events in a Timeline that I listen to in the client side runtime to trigger some custom code. If I don't include
stateMachines
in thenew Rive()
config, the events do not fire. I'm not sure if this is a bug or not but it makes it so that even if my designer doesn't use State Machine at all, I have to pass that in. I can't reliably set a default value there because I can't guarantee the name of the default State Machine hasn't changed during design phase.I'm using
@rive-app/canvas
version 2.10.3. I'm usingrive-wasm
version 2.10.3. I'm working in Chrome.I can't really share code as its a proprietary project. However, the docs state that
stateMachines
is an optional parameter, I wouldn't expect this to be required just to use Rive events.
The events are fired via a state machine so yes, you will need to specify one in new Rive()
.