R
R
Ruslan Yanberdin2017-03-25 22:58:17
JavaScript
Ruslan Yanberdin, 2017-03-25 22:58:17

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

2 answer(s)
G
GavriKos, 2017-03-25
@Duke565

If you reduce the speed - the effect is noticeable? There is just a suspicion of the reaction speed of the monitor.

T
themedev, 2017-04-09
@thematdev

The question is not described where the tags are. Where is the code. Asla la vista!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question