aduros/flambe — pull request #239 by OvertureGames (2014-03-05 18:47:37+00:00)
Title: Added a 'Shape' class to the 'display' package

Added a Shape display class that is assembled by adding various primitives together and can be transformed like any Sprite object. Currently it only supports line segments (with rounded caps), but can be easily enhanced to do other shapes like rectangles and circles.

The pull request includes a new file "Shape.hx" that resides in the 'display' package, and some modifications to the three 'Graphics' renderers (canvas, webGL, stage3D). Canvas implementation was straight forward. As for the other two, I've ensured to stay consistent with the current underlying architecture of drawing with quads, and the lines/caps are essentially just a series of fancy fillRect's that share the same vertex buffer attributes and shader.

(I've closed my last pull request #235 due to the sloppy form of not using branches, this should be easier to look at and discuss if interested)