Slow down rendering ! #3
Replies: 4 comments 2 replies
-
Each frame the event loop runs, so each time you yield Promises advance. You can check each frame if the Promise you're awaiting is done, if so you can do something with it. Look at the following example: GeneratorCanvas/examples/003-async/script.js Lines 16 to 51 in 2ec82fb |
Beta Was this translation helpful? Give feedback.
-
In the examples delay is done by using delta time and accumulating it in a variable. |
Beta Was this translation helpful? Give feedback.
-
I'm also going to delete this issue once you've read my response. I've opened the "Discussions" tab so you can move any question there. EDIT: Apparently I can move it to Discussions, so I don't have to delete it. |
Beta Was this translation helpful? Give feedback.
-
thank you for clarifications ! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using this example
DelayedGenerator just adds a sleep to a normal generator. This is how I implemented it:
My issue as you can see is that it is a AsyncGenerator and not a Generator ! Which is not accepted !
How to resolve this.
Beta Was this translation helpful? Give feedback.
All reactions