rkrasky Posted January 28, 2020 Share Posted January 28, 2020 Hi all! First - thanks for the great work on PIXI. But now to my question. Is it possible to render only when there are visible changes? So not 60 times a second. I'm currently hanging on to the interaction manager and listen to almost all mouse and touch events. I also monitor DisplayObject.alpha, Sprite.tint, Sprite._onTextureUpdate, Transform.updateTransform, Transform.updateLocalTransform, Transform.onChange as well as Text.updateText and Text.text. As soon as changes are made there, I set a flag so that I can manually call the render function. Is this correct, are there easier ways? Thank you in advance! ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted January 28, 2020 Share Posted January 28, 2020 (edited) Yes, its possible. We cant make it work like that in main repo, because it requires many hacks and serious support, but in particular projects - yes. Maybe its easier to connect something like react fiber Just in case, its better to make your own App class - https://github.com/pixijs/pixi.js/wiki/v5-Custom-Application-GameLoop , render() method should contain an "if" It could be easy if every element had link to the stage, so you have to make it global or pass it down the tree somehow. Edited January 28, 2020 by ivan.popelyshev 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.