Not much to explain really, its just an array of stars with random size, color and direction
and a game loop that updates their position. Most of the work went into finding the right
balance of ‘random’ when allocating stars. If you git clone the source you can play around
with the Stars.Defaults.layers distribution:

These <canvas> experiments are getting solid 60fps in modern browsers, but that’s to be expected because
of their simplicity. Its a little worrying that the draw() method is 7 or 8ms which is halfway towards
that magic 16ms limit (1000⁄60). I’m sure there is room for performance improvements in the way the
canvas rendering is being done, so that’s something I’ll have to look closer at.

Another thing to look closer at is that even double buffered with solid 60fps there can be the occasional
stuttering frame. I believe this is the javascript garbage collector kicking in, which we don’t have much
control over, but presumably I could refactor my code to avoid allocating as many objects? Another thing
to dig deeper into.