A gravity simulator in almost pure js