Quantcast
Channel: Pixi.js Latest Topics
Viewing all articles
Browse latest Browse all 3978

Low fps with 2-3k static circles

$
0
0

Strange thing i discovered. My game draw a lot of circles, i draw them once, they don't move. With ~1k visible circles fps is perfect but once more circles appears on screen fps starts to decrease.

how i do it for each circle:

this.circle = new PIXI.Graphics();
var lw = this.size * 0.03;
let clr  = this.color.replace('#','0x')
this.circle.beginFill(clr);
this.circle.drawCircle(0, 0, this.size - lw * 0.5 + 5);
this.circle.endFill();

in this bunny benchmark i can spawn 60k bunnies without lag (and they with texture!), on my project i draw simple circle without nothing. what is wrong? i tried cacheAsBitmap but it causes fps lag while circle start to draw. and quality of circle decreased this way..

here is screenshot of my circles http://joxi.ru/MAj7eDLHj1ExQr


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>