Gerente Posted February 18, 2018 Share Posted February 18, 2018 Hello, why the shared ticker is automatically initialized when PIXI lib is included??, should not be started manually? https://jsfiddle.net/y7hu9pu5/1/ What I understand between a PIXI.App and Renderer is that the App includes the Renderer, the Ticker and the first node. So if I use PIXI.autoDetectRenderer is because I just need a renderer and there is no reason to start the ticker unless I ask for it. PIXI.ticker.shared.add(function(dt) { console.log('tick',dt) }) Thanks Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 18, 2018 Share Posted February 18, 2018 Shared ticker has "autoStart=true" so it starts just when you add the listener. https://github.com/pixijs/pixi.js/blob/dev/src/core/ticker/Ticker.js#L262 Create AnimatedSprite, play it and shared ticker will be started. I dont use shared ticker for personal projects. Quote Link to comment Share on other sites More sharing options...
Gerente Posted February 18, 2018 Author Share Posted February 18, 2018 Any reason why is "autoStart=true" by default?, it will be running in the background by default unless I stop it. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 18, 2018 Share Posted February 18, 2018 because there are no other mechanisms for AnimatedSprite. Pixi doesnt have links between AnimatedSprite and Application. I want to add Stage object that manages it but so far my PR is not investigated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.