ThreeJs Integration

Hello all.

I’ve successfully integrated ThreeJs with Ionic 2. The 3d model that I am generating looks good when I serve the application to a web page (ionic serve -lab). I’ve used both Safari and Chrome for the ionic serve command. When I try to emulate the application or deploy my application to an iOS device, the 3d scene is not generated (I have not yet tried to emulate on Android).

Does anyone have any ideas or magic dust of what I am missing. I know in the past we needed to tell the iOS web view to enable web gl. Is this still the case? What is the best way to debug this issue?


I figured out my issue. My 3d geometry is driven by an xml file that I have in my asset directory. Apparently, the path to the asset directory is different when the application is packaged for deployment on an iOS device or simulator.

Yeah when the app is deployed to the device, file paths are a bit…tricky.
Glad to hear you got it figured out.