los-cocos/cocos — pull request #215 by ccanepa (2014-06-09 03:12:27+00:00)
Title: support for Tiled Editor tmx objects

It builds over Richard PR ( #208 ) .
* refactored some symbols names, 'type' and 'object' to not shadow python builtins
```
type -> usertype
TmxObject.type -> TmxObject.usertype
object -> obj
```
* Added support for the remaining tmx objects; on the cocos side they are distinguished by TmxObject.tmxtype, a string with possible values in { 'ellipse', 'polygon', 'polyline', 'rect', 'tile' }.

* for tmxtypes 'polygon' and 'polyline' the vertices are collected in TmxObject.points, as coords relative to the bottom left corner of the AABB

* The cocos.Rect associated with the TmxObject is the object's Axis Aligned Bounding Box

The motivation to support more tmx types is
* people will try to use them, and complain if not supported
* polyline is useful to draw patrol paths
* rects or ellipses with size 0 are useful as point markers, they look different in Tiled and are good to represent waypoints, atractors for swarms, ...
* It was easy to upgrade from the 'only fat rects and tiles' code

@r1chardj0n3s If you have time to take a look I will appreciate comments; the diff for the latest individual commit is more clear about changes over your commit; the PR diff will show all changes.