Thread
M
9mo ago
RIve Low-Level API
Hello, I am a doing React + Rive project.
I have several issues to complete the project. I want to hear your detailed explanation.
Here is my questions.
1. How to get events with low level API
1 reply
9mo ago
Hi
const numEventsReported = stateMachine.reportedEventCount(); if (numEventsReported) { for (let i = 0; i < numEventsReported; i++) { const event = stateMachine.reportedEventAt(i); if (event) { // Got the event } } } stateMachine.advance(elapsedTime);
Be sure to get the events before calling advance
on the state machine