Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attach pointer to worklet runtime in main runtime (software-mansion#2253
) ## Description We want to add support for expo-gl in worklets, ## Changes - Added pointer to the worklet js runtime as a field in the main js runtime. We need that pointer to inject gl renderer object from expo-gl-cpp - Added typed array constructors to globals list in plugin.js, It allows creating typed arrays on worklet thread when using hermes, but it still does not work with JSC. WebGL standard requires typed arrays for a lot of stuff, so we can't just change it to regular arrays even if performance would be good enough. ## Test code and steps to reproduce I prepared 2 examples here wkozyra95@b3618a8 - one that just renders gl in a loop - one that draws based on the input from gesture handler I tested this example yarn linking modified `expo-gl-cpp`, so it does not work in the form with latest version of that package. ## Checklist - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Added TS types tests - [ ] Added unit / integration tests - [ ] Updated documentation - [ ] Ensured that CI passes
- Loading branch information