如何在React Native(没有WebView)中运行three.js?

Pew*_*osh 10 three.js reactjs react-native

我正在寻找将React Native与three.js集成的解决方案.据我所知,three.js在DOM中运行.有没有办法在没有渲染到DOM的情况下使用three.js?我使用three.js渲染3D对象.可以查看https://github.com/tweedegolf/minecraft-character-configurator的示例,并需要解决方案来移植到React Native.谢谢 :)

Uly*_*ahi 1

您可以查看 Expo 的 GLView 组件,以及 expo-3,它们的 Three.js 集成。目前有很多问题,但你可能会得到结果。