Trigger an updated drawing manually

Trigger an updated drawing manually
0.0 0



is there a way to trigger an updated drawing manually instead of the 60FPS? What I want to achieve is, that my canvas will be redrawn when I trigger it. I don’t need an updated screen every Frame.

How could I achieve it? Is a LazyLayer a solution or are they to slow?



Yes, you may update it as your schedule.

However, you need to modify some engine codes.

Firstly, you should disable the previous main loop function in CCApplication.js, line 304, and where it is called.

Secondly, customize your schedule, and call cc.Director.getInstance().mainLoop(), it will trigger an update of Visiting and Drawing.

Enjoy it.


We’ll check this. Thank you for your help!