3 ms·
The stutter is very jarring, you really should use requestAnimationFrame instead of setTimeout. And maybe also put the container height into a variable when th
by PavlovsCat 11y ago
The stutter is very jarring, you really should use requestAnimationFrame instead of setTimeout.
And maybe also put the container height into a variable when the window gets resized, instead of grabbing it from the DOM all the time (not sure if that will make a meaningful difference, but I'd try it).
- stevethyc 11y agoI'll look into requestAnimationFrame. I will a/b test the window size var, but I suspect it won't make a difference. But I'll try it.
- deleted 11y ago[deleted]
- stevethyc 11y agoOk, switched to requestAnimationFrame. Removed the param on the variable system cycle clock speed--not necessary. The right way is to just use requestAnimationFrame.