a simple particle simulator in javascript