n-ways anim-js
intro
There are two methods, even though they are not a part of the JavaScript specification, that can be used in scheduling function execution 1. One of these methods, the setInterval, is used to repeatedly execute a function at a fixed time interval, which is useful for animations, timers, or any task requiring periodic execution 2. For complex animation, where the interval parameeter is irrelevant, it is advisable to use another API requestAnimationFrame which executes game logic or animation processing before drawing the next frame on the screen 3. Another alternative for animation is using SVG, where its animations can create smooth, scalable, and lightweight visuals 4. There are various different techniques, where each has its own weakness and strenght, e.g. educational visualization or tracking-analysis requires different approach 5.
refs
Ilya Kantor, “Scheduling: setTimeout and setInterval”, The Modern JavaScript Tutorial, 25 Feb 2026, url https://javascript.info/settimeout-setinterval [20260509]. ↩︎
Muthu Krishnan, “setTimeout, setInterval and requestAnimationFrame”, Mastering Javascript, 23 Nov 2024, url https://js.muthu.co/posts/settimeout-setinterval-and-requestanimationframe/ [20260509]. ↩︎
Louis-Rémi Babé, “Animating with javascript: from setInterval to requestAnimationFrame”, Mozilla Hacks, 3 Aug 2011, url https://hacks.mozilla.org/2011/08/animating-with-javascript-from-setinterval-to-requestanimationframe/ [20260509]. ↩︎
James Pastan, “SVG animation mastery for designers”, 12 May 2025, url https://www.framer.com/blog/the-power-of-svg-animations/ [20260509]. ↩︎
GPT 5.5, “JS Animation Techniques”, ChatGPT, 9 May 2026, url https://chatgpt.com/share/69fe7bb1-8914-83ec-952c-782311b25faa [20260509]. ↩︎