Fork of port (from Flash to js) of Box2D Physics Engine for Javascript. Port was created by Ando Yasushi (sorry if i'm wrong) and located at http://box2d-js.sourceforge.net/index.html where was some more information. Original lib written by Erin Catto and others.
I found some features of this port is inconvenient and try to correct it.
- Add builder for concatenate files of lib in one because them total count is 64.
Now you add lib just place script tag with
box2d.min.js
fromsrc/origin
dir if you want original version or fromsrc/fork
if you want new version. - Removed prototype lib dependency. No more any dependencies.
- Add
DebugDraw
method of b2World class. This method call every frame for draw shapes and joints on canvas element. For install it setSetDebugDraw
where pass 2d-context, width and height of canvas-2d. - Add
QueryPoint
method of b2World class for hit test point over shape. There is no in original port. - Fix debug draw pulley joint.
- Add
Initialize
meth inb2RevoluteJointDef
,b2PrismaticJointDef
,b2PulleyJointDef
,b2DistanceJointDef
. - Add documentation.
- Add examples from flash port.
On Russian: http://pixxxxxel.blogspot.ru/2014/08/box2djs.html