I've got a code that will run a set of 20 images, to make it look like an idle sprite is breathing when idle. This runs perfect when its only one loop.
However I can't get it to repeat that loop indefinitely.
Is there a cleaner and faster way to do what i'm doing?
Enclosing that in another for loop doesn't work. It ends in it never loading.
for(let i = 0; i < images.length; i++) {
window.setTimeout(function () { …Run Code Online (Sandbox Code Playgroud) javascript ×1