Answer the question
In order to leave comments, you need to log in
Are objects being drawn on the canvas out of scope?
We make a 2D js toy using PixiJS. The architecture is based on MVC and every time any model object changes, the view is notified and tries to redraw the object, even if it is not in the scope.
Dk here, is it critical to call the view to the canvas, even for those objects that are not included in the scope, given that there can be quite a lot of such objects? Is it worth checking if the object is within the scope?
Sincerely, Albert.
Answer the question
In order to leave comments, you need to log in
Yes, it's worth it. The performance difference is immediately visible.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question