Search code examples
javascriptandroidiosthree.js

How can I use ThreeJS in my Android app , or is there any library similar and powerful like three js


Actually I'm making a web site where people can customize their jewellery online, I am making this with the help of ThreeJS and I want to make an Android app too, so I must make API only APP for my website and Android App So, please tell me, how can I make API only app with ThreeJS like my website, to consume in web site and Android APP and iOS app.

Please suggest me.


Solution

  • Three.js is written in javascript so it cannot easily be integrated into a native app. Performance-wise it would probably be best to reimplement the rendering in openGL-ES (which webgl is also based on).

    If you want to stay with your three.js implementation you will only have the choice to run your code in a browser-environment (because webgl and javascript) by using a WebView that runs the javascript and webgl-code (quick googling turned up this, which looks promising: https://blog.ludei.com/webgl-ios-8-safari-webview/).

    There might even at one point turn up a proper react-native implementation of webgl or even three.js...