javascript - Using canvas to change pictures causes flickering problem.
阿神2017-06-07 09:24:50
0
2
1042
When I use canvas to make a small game, there are pictures that need to be switched, and flickering occurs, but it doesn’t always happen, sometimes and sometimes not. What’s going on?
It should be a picture loading problem. Just make sure it is loaded before drawing. It can be solved by using sprite, but making sprite is too troublesome
It should be a picture loading problem. Just make sure it is loaded before drawing. It can be solved by using sprite, but making sprite is too troublesome
Solved: Make the picture into a sprite image. Just change the shearing coordinates when switching