S
S
Sergey Suntsev2016-09-28 07:32:11
JavaScript
Sergey Suntsev, 2016-09-28 07:32:11

How to remove vibration during JavaScript animation?

There is such an endless, recursive animation, where the initially prescribed elements move, and then the elements begin to be generated and also move, the problem is how to remove the vibration effect, which appears most strongly on the newly generated elements.
codepen.io/Greyewi/pen/ORgWOE

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Aksentiev, 2016-09-28
@Sanasol

everything is going smoothly enough.
Maybe fps sags for you?
Delete elements after working out so as not to keep in memory.
Put some FPS counter, I don't know if there are such counters for normal html pages.

V
Vitaly Stolyarov, 2016-09-28
@Ni55aN

1. Not setTimeout, but requestAnimationFrame
2. Delta time

M
Max Pushkarev, 2016-09-28
@maximpushkarev75

I think it's more correct to do animation not on setTimeout, but on requestAnimationFrame

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question