Closed armanbilge closed 5 months ago
Thanks @armanbilge, that is what we talked about.
I'm thinking about this in terms of https://github.com/PurpleKingdomGames/tyrian/issues/201 and wondering if this is the right strategy though. I'll try and mull it over on an up-coming dog walk or something. :smile:
@armanbilge, as it stands this PR doesn't quite work (the page never re-renders), but if you remove resetModelUpdateCount
i.e. lines 41 and 90, then it appears to work perfectly.
Quite. :confused: emoji is my general feeling in that bit of code. Which is odd because it's barely 60 lines of not terribly complicated looking code. :smile:
I'm in the middle of something at the moment, but I think when I get the chance, I'd like to see if there's some way to reformulate it that makes it easier to follow.
Closing as this issue has been resolved by another PR.
Previously, the render loop was running on every animation frame in the browser. Now, then render loop waits until there has been at least one update to the model before re-starting the render cycle.