Skip to content

Instantly share code, notes, and snippets.

@caubry
Created January 19, 2014 16:10
Show Gist options
  • Save caubry/8506962 to your computer and use it in GitHub Desktop.
Save caubry/8506962 to your computer and use it in GitHub Desktop.
Vec2 = Box2D.Common.Math.b2Vec2;
BodyDef = Box2D.Dynamics.b2BodyDef;
Body = Box2D.Dynamics.b2Body;
FixtureDef = Box2D.Dynamics.b2FixtureDef;
Fixture = Box2D.Dynamics.b2Fixture;
World = Box2D.Dynamics.b2World;
MassData = Box2D.Collision.Shapes.b2MassData;
PolygonShape = Box2D.Collision.Shapes.b2PolygonShape;
CircleShape = Box2D.Collision.Shapes.b2CircleShape;
DebugDraw = Box2D.Dynamics.b2DebugDraw;
RevoluteJointDef = Box2D.Dynamics.Joints.b2RevoluteJointDef;
PhysicsEngineClass = Class.extend({
world: null,
//-----------------------------------------
create: function () {
gPhysicsEngine.world = new World(
new Vec2(0, 0),
false
);
}
});
var gPhysicsEngine = new PhysicsEngineClass();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment