Replies: 3 comments 1 reply
-
@bghgary Do you have any perspective on this? |
Beta Was this translation helpful? Give feedback.
-
I can't say I've looked into this much and thus don't have a lot of insight. It would be great to have generic web worker support in Babylon Native and Babylon React Native, but we don't currently have any plans to implement. What are some scenarios where you want web workers? Is this for a specific task or are you suggesting taking advantage of multi-threading for the engine? For specific tasks, it might be enough to implement a C++ plugin to Babylon Native that will do the work asynchronously. For the engine, this is probably not likely to happen until we can do it on the Babylon.js side. |
Beta Was this translation helpful? Give feedback.
-
Polyfill for webworker seems like a possible way to introduce them. I'm sure that is possible. A possibly more difficult problem is how the engine on the Babylon.js side can be implemented using webworkers. |
Beta Was this translation helpful? Give feedback.
-
Has anyone thought of possibilities for some solution?
Within the react-native community some projects have already tried to bring things like this, creating a bridge of JavaScript code that runs in a parallel abstract thread, unfortunately many of the projects have been discontinued or not given enough attention (at least the ones I personally know). Even though Babylon Native comes to support several features such as shaders, audio, 3D models import, cross-platform rendering... the big question is about JS calls that do not block the user's application / game in time-consuming calculations that could be done in the background or similar behaviour to the WebWorkers (present on web).
Could the new Facebook's Fabric architecture / JSI help at something?
Related projects to this discussion:
See the main discussion on React Native Community: react-native-community/discussions-and-proposals#486
Beta Was this translation helpful? Give feedback.
All reactions