A few JS examples I've written when I was a game dev.