replit / kaboom

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

BUG: drawPolygon and all shape draw methods cause massive FPS drop #762

Open johnnyrainbow opened 1 year ago

johnnyrainbow commented 1 year ago

To replicate: draw a bunch of simple rectangles, or polygons to the screen within onDraw (1000 should be plenty), the FPS will tank massively. No such issue when doing this with other draw methods like drawSprite. Issue occurred in all browsers I tried it on.

Issue seems clearly to be with drawPolygon.