Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Multithreading support (reality tabs) #760
Exokit's architecture has up until this point been mostly singlethreaded. This means that the render loop, and all user code animation frames ran in the same thread. This is mostly because that is how
However, this is problematic for several reasons:
Node 11+12 have full threading support, which mostly follows the WebWorker API.
This PR leverages
Though this PR does not do it yet, this opens up the path to full Service Worker and audio thread support, as well as 3D framebuffer reprojection support for applications so that we maintain frame rate even in cases where the user code cannot keep up (due to loading, being badly written, etc).
Most of the changes here are instituting the new render loop request/response, and fixing the places in the code that assumed everything was running synchronously in one thread.
Overall user code should see no change here, other than that everything becomes faster for free, especially -- but not only -- when using reality tabs in XR.
referenced this pull request
Mar 7, 2019
Tested each example as reality tab on new
Works as a reality tab:
Blank as a reality tab, no errors or hard crash:
Crashes with the following error: