Comment

Comment by Qwertie

Nice work. I'm not a JS expert but I think I saw a bug.

Inside of animate() you are calling setTimeout() to automatically call animate repeatedly but this is also calling setTimeout() every time animate runs but setTimeout() should only be run once.

You should be able to take

  setTimeout(() => {
    animate();
  }, 100);
and paste it over animate() on the last line
parent Qwertie 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton