Three.JS on React Native without Expo dependencies #1783
-
Is there any way to make Three.JS work on React Native applications today without including expo? I've been researching but every example I find is using some expo dependencies, and my app target is not built on expo. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
yes, @CodyJasonBennett is working on that currently and it works. not 100% sure about the state of it, he'll respond. |
Beta Was this translation helpful? Give feedback.
-
Yes, I have a PR for v8 here with an example/local build to play with: #1699. The API is the same as web, including events, and I have a breakdown of how that works in the comment. ATM, the only distinction from web is that We do use I do think some bare examples would be helpful to get people up and running, and also to not mislead people. Maybe we should work on that once we ship an alpha to get this into the wild. |
Beta Was this translation helpful? Give feedback.
Yes, I have a PR for v8 here with an example/local build to play with: #1699. The API is the same as web, including events, and I have a breakdown of how that works in the comment. ATM, the only distinction from web is that
render
accepts a GL context instead of a canvas.We do use
expo-gl
as the default GL implementation but it has no dependency on Expo (you can use all expo helper libs without expo-cli, etc.). The only peer dependency you'll need isreact-native
when using<Canvas />
, but you can use R3F and its hooks OOTB in any case.I do think some bare examples would be helpful to get people up and running, and also to not mislead people. Maybe we should work on that once we ship an…