K
K
Kella2014-02-02 11:54:57
JavaScript
Kella, 2014-02-02 11:54:57

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

1 answer(s)
A
Alexander Shpak, 2014-02-03
@Kella

Yes, it's worth it. The performance difference is immediately visible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question