Answer the question
In order to leave comments, you need to log in
How to make an object move smoothly in Canvas so that the object doesn't flicker when it moves?
Hello, I made the object move smoothly with requestAnimationFrame, the object itself flickers along the way, it is blurry, as if twitching back and forth.
Here's an example: demo
Look at the circle's frame, it's blurry as you move. Especially the top left corner and the bottom right corner.
I didn't do anything magical, just x += 8 and y +=8. Tried to use Three.js, Pixi.js there is the same story.
What I don't know yet, what's the catch? :)
Update 1: Simplified code, demo
Answer the question
In order to leave comments, you need to log in
If you reduce the speed - the effect is noticeable? There is just a suspicion of the reaction speed of the monitor.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question