Box2d Init - Call with await to init box2d
await box2dInit();LittleJS Box2D Physics Plugin
Box2d Init - Call with await to init box2d
await box2dInit();box2d : Box2dPluginbox2d.js:25Global Box2d Plugin object
box2dDebug : boolean default falsebox2d.js:31Enable Box2D debug drawing
b2Body : anybox2d.js:41A Box2D body; box2d.js has no types, so it is any, named for what it is
b2Fixture : anybox2d.js:45A Box2D fixture, a shape attached to a body; box2d.js has no types, so it is any, named for what it is
b2Joint : anybox2d.js:53A Box2D joint; box2d.js has no types, so it is any, named for what it is
b2JointDef : anybox2d.js:57A Box2D joint definition, what a joint is made from; box2d.js has no types, so it is any, named for what it is
b2Shape : anybox2d.js:49A Box2D shape: b2CircleShape, b2EdgeShape, b2PolygonShape or b2ChainShape; box2d.js has no types, so it is any, named for what it is
b2Vec2 : anybox2d.js:61A Box2D vector; box2d.js has no types, so it is any, named for what it is
b2World : anybox2d.js:37A Box2D world; box2d.js has no types, so it is any, named for what it is
Box2dContact : Objectbox2d.js:82Where and how hard two objects hit, given to beginContact
point Vector2|undefinedWhere they touched in world space, between the two points of a flat landing, toward the one pushed harder; undefined for a sensor
normal Vector2|undefinedThe other object's surface normal where they touched, pointing toward this object; undefined for a sensor
impulse numberAn estimate of how hard they hit: the impulse that stops them closing, from the mass and inertia of both where they touched, times 1 + restitution; mass times world units per second, 0 for a sensor
Box2dModule : anybox2d.js:33The box2d.js module, what Box2D() gives and box2d.instance holds; box2d.js has no types, so it is any, named for what it is
Box2dPreSolveContact : Objectbox2d.js:152A contact about to be solved, given to preSolve, whose changes the solver takes
point Vector2Where they touch in world space, between the points when there are two
normal Vector2The other object's surface normal where they touch, pointing toward this object
enabled booleanSet false to let them pass through each other until they stop touching, true to make them collide again
friction numberThe contact's friction, kept while they touch
restitution numberThe contact's restitution, kept while they touch
surfaceSpeed numberHow fast this object's surface moves there for this step, clockwise around it, its surfaceSpeed to start with