As document says
// Scales ticker.deltaTime to what would be
// the equivalent of approximately 120 FPS
ticker.speed = 2;
if i set ticker.speed = .5 the whole render should play at 30fps?right?
but it does not work.
PIXI only renders when you tell it to render. If you hook it up to requestAnimationFrame, then that gets called whenever the browser can draw again; changing the shared ticker does not effect this at all.
Even if you did hook up renderer.render to a PIXI ticker, it would still call back 60 times a second. You see, the speed factor effects the deltaTime value that is passed in when a ticker updates, not how often it is called.
So, if the game was running at 60fps, then at a scale of 1, then the tick update would be called 60 times a second, each time with a deltaTime of 1. But if you set the scale to 0.5, then the tick update would be called 60 times a second, but with the deltaTime of 0.5.
@readygosports Could you provide a jsfiddle of what you mean please if the above doesn't cover your question :)
Closing as this seems answered! Cheers!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
PIXI only renders when you tell it to render. If you hook it up to requestAnimationFrame, then that gets called whenever the browser can draw again; changing the shared ticker does not effect this at all.
Even if you did hook up renderer.render to a PIXI ticker, it would still call back 60 times a second. You see, the speed factor effects the deltaTime value that is passed in when a ticker updates, not how often it is called.
So, if the game was running at 60fps, then at a scale of 1, then the tick update would be called 60 times a second, each time with a deltaTime of 1. But if you set the scale to 0.5, then the tick update would be called 60 times a second, but with the deltaTime of 0.5.
@readygosports Could you provide a jsfiddle of what you mean please if the above doesn't cover your question :)