These are chat archives for pixijs/pixi.js

Jul 2017
Mick Dekkers
Jul 19 2017 12:48
Hi all, my Pixi app is running pretty slow (~15-30 fps) and when I look at the chrome profiler I can see that my update function is getting called by multiple times before most renders (the one below Ticker._tick):
Am I misusing the ticker somehow?
My update function prepares the various sprites on the screen for a render (updates their position, handles interaction, etc.), so it should only be called once per animation frame; anything more is just a waste of CPU
Mick Dekkers
Jul 19 2017 12:55
This is my update function (truncated):
app.ticker.add(deltaTime => {
  particles.forEach(particle => particle.update(deltaTime))
Dave Moore
Jul 19 2017 18:09
Isn't that creating a new anonymous function every tick?
(just took a quick glance, might be wrong, but it's why i always stick to simple for loops in games)
Jul 19 2017 18:39