These are chat archives for pixijs/pixi.js

22nd
Dec 2015
Bar Ziony
@bartzy
Dec 22 2015 19:32
Hey
Does Pixi (with a WebGL renderer) still renders the object tree 60 times a second , even if there are no changes to it ?
i.e. I added some sprites, started a ticker and added a callback with ticker.add that executes renderer.render(rootLayer)
I think it keeps rendering even though nothing changes. Why is that and how can I avoid it?
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2015 19:34
old-gen 2d-engines have "dirtyRect" optimization while pixi doesnt
because primary target of pixi is webgl, and there's no point in that optimization
there are some optimizations in case of 10k-100k objects - use PIXI.ParticleContainer and it wont call updateTransform()
but you have to re-draw all the scene graph every frame anyway
Chad Engler
@englercj
Dec 22 2015 21:07
Pixi renders when you call .render() It is up to the application to decide how often and when that is
If you want to avoid it, only call .render() when you want to render.
The "60 fps" comes from your app, not PIXI
Bar Ziony
@bartzy
Dec 22 2015 23:01
@ivanpopelyshev Why there's no point in dirty rect optimizations in WebGL?
@englercj Got it. Is there a point in doing this, if I mostly don't need to render at all times? I only need to render initially, then at user interactions