replit / kaboom

💥 JavaScript game library
https://kaboomjs.com
MIT License
2.61k stars 226 forks source link

Add generic shape matching methods + example to test overlap tests #819

Closed mflerackers closed 5 months ago

mflerackers commented 5 months ago

Shapes now have the following methods

collides(shape: any): boolean - Test overlap with any other shape contains(point: Vec2): boolean - Test if a point is contained by the shape

slmjkdbtl commented 5 months ago

Thank you this is useful! Can you fix the diff noise in math.ts it's making it hard to view actual diff

slmjkdbtl commented 5 months ago

Thank you!