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
Box2dContact : Objectbox2d.js:50Where 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
Box2dPreSolveContact : Objectbox2d.js:120A 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