Closed aidinabedi closed 6 years ago
Hey, thanks for contributing :) Could you explain why you moved the main loop part to a separate function? Is that necessary to get it to run on WebGL at some point?
Hello @ands!
Short answer: Yes, it is necessary for WebGL-compatibility - which is exactly what I'm planning :)
Long answer: For the project to run inside a web browser - the loop-part will need to be an event callback instead of an actual loop - otherwise, it will block everything else in the browser. So to make the code support both platforms, I refactored the loop-part so it can easily be used in a normal loop (when built as standalone executable) or as a callback (when built for the browser).
Alright, thanks for the explanation :)
The purpose of the PR is to improve readability and make contributions easier down the road. Changes include: