opd Posted July 15, 2020 Share Posted July 15, 2020 Hi, I'm finishing up my first Pixi project and am thinking about performance. I'm using the PIXI.Application class which creates the canvas, renderer, ticker and then updates the canvas every frame. As I understand it, this means that the whole canvas gets redrawn every frame. Would it be a good idea to put the background image into a separate canvas below the app, so it doesn't have to be redrawn each time? Also, is it best practice to manually handle updating the canvas and to only redraw the parts that change? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 15, 2020 Share Posted July 15, 2020 For older mobiles - yes. > is it best practice to manually handle updating the canvas and to only redraw the parts that change? Only if you have many filters and you know how to use renderTexture to cache those parts. Otherwise, its very bothersome. Also, there's no guarantee that canvas contents are preserved between frames, so trying to update only certain regions will certainly fail in webgl. opd 1 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.