Drawing a square, animated tunnel in JS