simulate motion with svg and js