openfl / box2d

Haxe port of Box2D, a popular rigid-body 2D physics engine
Other
95 stars 28 forks source link

Pixi Port of B2HeapsDebugDraw #26

Closed bedwardly-down closed 3 years ago

bedwardly-down commented 3 years ago

There were only 3 changes that were required to get this working:

  1. Change the class name and '#if's
  2. Remove the Segment values for drawCircle / drawSolidCircle (it defaults to 8 unless you turn on Adaptive Curves and then set a full range of segments)
  3. Polygons require running closePath() after last vertex is drawn or else you get squared off edges)
jgranick commented 3 years ago

Could this be implemented in the regular B2DebugDraw using #if pixijs with the necessary changes?