These are chat archives for pixijs/pixi.js

28th
Oct 2016
Ralph Sto. Domingo
@ralphstodomingo
Oct 28 2016 01:32
@englercj Oh! And um on what circumstances would it be useful to set that as true?
Ralph Sto. Domingo
@ralphstodomingo
Oct 28 2016 01:39
And if it's not too much to ask, is PIXI.TextureGarbageCollector something that I have to use myself or is used by PIXI internals by default?
Oh nvm, just read PIXI.GC_MODES. :D
Ralph Sto. Domingo
@ralphstodomingo
Oct 28 2016 05:25
Will caching a DisplayObject/Sprite/Container as bitmap and setting its visible property have the same optimization effect? Does anyone recommend manually traversing the root stage's children and setting each of them as not visible if they are not within the viewport as culling? Or is there a better, more efficient way for those who want to implement it?
Chad Engler
@englercj
Oct 28 2016 06:58
You should set it to true when the VAO implementation on some device is acting wonky, not all of them are implemented very well
the WebGL landscape on mobile is flaky
I would hook into updateTransform and if after the transform updates it is out of the viewport, set visible to false
Ralph Sto. Domingo
@ralphstodomingo
Oct 28 2016 07:03
As usual, thank you for that @englercj. Hm. There's this PIXI.TARGET_FPMS in the docs that's set to 0.6, is there a way to change this so that Pixi runs on 30fps?
Chad Engler
@englercj
Oct 28 2016 07:11
Thats just for the ticker class
you're the one that calls render()
call it is often as you want
unless you are using the ticker for your loop, then modify TARGET_FPMS
Ralph Sto. Domingo
@ralphstodomingo
Oct 28 2016 07:15
Hm so that's why. Would you recommend using the ticker over requestAnimationFrame or setTimeout?
Ivan Popelyshev
@ivanpopelyshev
Oct 28 2016 08:24
ticker is RAF
Ralph Sto. Domingo
@ralphstodomingo
Oct 28 2016 08:25
@ivanpopelyshev How does the TARGET_FPMS affect the ticker if it uses RAF then? "D
Oh, I've got so many questions I'm going to write the answers down for someone else who stumbles into pixi
Ivan Popelyshev
@ivanpopelyshev
Oct 28 2016 10:11
@prime-ralph it just skips frames. Btw, my game is 60FPS but updates are only 10 times per second, i just skip update if its too early
so its known technique :)