HTML5 ping-pong demo using canvas