bullet-ane is a native extensionÂ for the Bullet physics simulation library. It has true native implementations built for iOS (7.0 SDK), iOS Simulator and Android. All other platforms fall back onÂ AwayPhysics, a pure-AS3 implementation of Bullet, meaning the extension will work on all platforms AIR supports. Compared with AwayPhysics, bullet-ane increases performance on mobile apps by an order of magnitude. There is a comparison video available.
The extension is currently written to work with Away3D, but certainly could be made compatible with other Stage3D-based AS3 graphics libraries.
var _view : View3D = new View3D(); this.addChild(_view); // init the physics world var _physicsWorld : DiscreteDynamicsWorld = new DiscreteDynamicsWorld(); // create ground mesh var material : ColorMaterial = new ColorMaterial(0x252525); var mesh:Mesh=new Mesh(new PlaneGeometry(50000*scale, 50000*scale),material); mesh.mouseEnabled = true; mesh.addEventListener(MouseEvent3D.MOUSE_UP, onMouseUp); _view.scene.addChild(mesh); // create ground shape and rigidbody var groundShape : StaticPlaneShape = new StaticPlaneShape(new Vector3D(0, 1, 0), 0); var groundRigidbody : RigidBody = new RigidBody(groundShape, mesh, 0); _physicsWorld.addRigidBody(groundRigidbody);