-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APIs for integrating into existing event loop #336
Comments
Hi! You're right in that we're creating a simple wrapper around the If we exposed this Example of what this might look like:
|
Yes, that sounds perfect. Thank you for your response! |
poc for adding flush. I think we just need to add `flushCanvasRenderers` as `flush` (also add this for the flushSkiaRenderer) and that should address #336. obviously needs clean up, but just wanna make sure its worth sticking this in. is there a good way to get back to the "issue" request to enquire if this will sort the problem? or do we just update the api and check in? Diffs= ebff4893c poc for adding "flush" (#6237) Co-authored-by: Maxwell Talbot <talbot.maxwell@gmail.com> Co-authored-by: Zachary Plata <plata.zach@gmail.com>
Hi sorry for the delay here.. but we just introduced a similarly-named API into You can use your own rAF loop, just make sure to call |
Description
The Rive Advanced API requires that one uses rive's
requestAnimationFrame
. However, that is not practical for an HTML5 game engine:requestAnimationFrame
to rive's globally, or to always include rive in builds even when it is not in use.requestAnimationFrame
: when the window is not focused,requestAnimationFrame
does not trigger, but some games require to continuously run, so we may for example switch tosetTimeout
during that time to ensure the game logic keeps on running, and rive might break there.Proposed solution
I am assuming rive is only doing this as a hand-holding way to ensure some code is called before and after rendering. However, since that is supposed to be the "Low level" API, it is expected either way that the API might not be convenient or hand-holding but in exchange allows complete power and flexibility.
Therefore, I think it would be great to be able to do something like
rive.startFrame()
/rive.endFrame()
as an alternative (or full replacement) to rive'srequestAnimationFrame
The text was updated successfully, but these errors were encountered: