2d-inc / Flare-Flutter

Load and get full control of your Rive files in a Flutter project using this library.
https://rive.app/
MIT License
2.55k stars 469 forks source link

trigger event mechanism problem? #234

Open ggslayer opened 4 years ago

ggslayer commented 4 years ago

I see the example code and the flutter sdk code about the trigger event, But i don't understand the componts/fromtime/totime parameter means, Is there any detailed description about the event's usage?

umberto-sonnino commented 4 years ago

The idea for ActorAnimation.triggerEvents(components, fromTime, toTime, triggerEvents) is to have the animation give you back a list of all triggered events in a time window that goes from fromTime to toTime. All triggered events will be added to triggerEvents.

More specifically you'd want to call that function once per frame, where