Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.86k stars 822 forks source link

Introducing the Star polygon #976

Closed EhsanMarufi closed 7 years ago

EhsanMarufi commented 7 years ago

Using the new Star class, you can create custom n-pointed star shapes with really optimized triangulation and hitTest() functionalities. The Starling framework is no longer imaginable without the polygonal star generation routine !! :joy: (joking)

EhsanMarufi commented 7 years ago

Oops!!! I thought the Git was supposed to compare the commits and create a new pull request for the new commits (the 4a0e9d7 and 01cf7da commits), but the previous commits are also present here!! I know, I should've created a new branch, but the label of the button was so misleading :( What am I suppose to do?!!

PrimaryFeather commented 7 years ago

Don't worry about it, Ehsan, I know it's sometimes confusing how GitHub handles these things. :wink:

In any case, in this particular situation, I'd rather have this feature as an extension, e.g. simply one class (subclassing Polygon) that can be used by importing it into one's project. I'm still not 100% sure how I'm going to move on with the vector capabilities, so I want to keep this feature set really small for now.

EhsanMarufi commented 7 years ago

it's sometimes confusing how GitHub handles these things..

I know, it happens every once in a while :blush:

I'm still not 100% sure how I'm going to move on with the vector capabilities

Hmm.. It's OK, I'm sure you're gonna find a very convenient approach to these capabilities, you will. But until then, you may utilize the optimizations applied in the code for the hit test routine of the Star. Thank you Daniel :)