Experimenting with JavaScript Canvas. This could be reimplemented using Classes.
Movements look wiggly because calculations use floating point but result have to be rounded to integers for the Canvas coordinate system.