Hi, I'm trying to show 3D objects using Titanium (3.1.1) and three.js in a webview. I'm just trying to show a rotating cube with an image texture. As WebGL does not seem to be supported (as far as I know), I'm using the CanvasRenderer. In Android, the performance is not great, but can be enough for not complicated scenes. My problem is in iOS (6), I can not achieve acceptable results in any way. The FPS decrease heavily and textures does not match well when the object is in movement.
This is the three.js code that I'm using:
... var geometry = new THREE.CubeGeometry( 200, 200, 200 ); var texture = THREE.ImageUtils.loadTexture( 'textures/crate.gif' ); texture.anisotropy = renderer.getMaxAnisotropy(); var material = new THREE.MeshBasicMaterial( { map: texture } ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh ); ... function animate() { requestAnimationFrame( animate ); mesh.rotation.x += 0.005; mesh.rotation.y += 0.01; renderer.render( scene, camera ); } ...I've been checking the code, but I got similar results with other three.js examples. How to improve that? Do you think this is the best way to show 3D objects in Android and iOS platforms using Titanium? Any news about WebGL support?
Thanks