I developed a rudimentary 3D game using box2Dweb for physics and three.js for rendering. This is the main scroller. I would like to get it and run it on iOS. I decided to use cocoon.js to package the game, since it allows you to use WEBGL on iOS
The problem I am facing is performance. On a desktop computer, the game runs at about 50 frames per second. On the iPhone 5, it runs at 3 frames per second.
I tried to hide the game, deleted all the textures, deleted the shaders, deleted the skybox, had a lower level (only what is on the camera screen, and a little behind and in front). This gave me a 25% increase in performance. Now it works at 4FPS
I looked at the demos that come with the iOS launcher app and they all work very smoothly.
The only thing I can do to improve performance is to minimize JS, which I think will not give a big increase in performance.
I am using Accelerated Canvas / WebGL in a launch application. I also tried compiling with the canvas + option, the same problem. I am using 3D revision 67. I am using the webGL renderer in the three.js file:
this.renderer = new THREE.WebGLRenderer
Any suggestions on how to improve the performance of the three .js with cocoon.js?
source
share