{"action":"closed","issue":{"url":"https://api.github.com/repos/ewoodoo/alura/issues/1","labels_url":"https://api.github.com/repos/ewoodoo/alura/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ewoodoo/alura/issues/1/comments","events_url":"https://api.github.com/repos/ewoodoo/alura/issues/1/events","html_url":"https://github.com/ewoodoo/alura/issues/1","id":61731589,"number":1,"title":"animacao_html","user":{"login":"ewoodoo","id":11482608,"avatar_url":"https://avatars.githubusercontent.com/u/11482608?v=3","gravatar_id":"","url":"https://api.github.com/users/ewoodoo","html_url":"https://github.com/ewoodoo","followers_url":"https://api.github.com/users/ewoodoo/followers","following_url":"https://api.github.com/users/ewoodoo/following{/other_user}","gists_url":"https://api.github.com/users/ewoodoo/gists{/gist_id}","starred_url":"https://api.github.com/users/ewoodoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewoodoo/subscriptions","organizations_url":"https://api.github.com/users/ewoodoo/orgs","repos_url":"https://api.github.com/users/ewoodoo/repos","events_url":"https://api.github.com/users/ewoodoo/events{/privacy}","received_events_url":"https://api.github.com/users/ewoodoo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-15T02:28:13Z","updated_at":"2015-03-15T02:28:18Z","closed_at":"2015-03-15T02:28:18Z","body":"<meta charset=\"UTF-8\">\r\n<canvas id=\"tela\" width=\"600\" height=\"400\"></canvas>\r\n\r\n<script>\r\n\r\nvar tela = document.getElementById(\"tela\");\r\nvar c = tela.getContext(\"2d\");\r\n\r\nvar circuloAzul = function(x,y,raio) {\r\n\tc.fillStyle = \"blue\";\r\n\tc.beginPath();\r\n\tc.arc(x,y,raio, 0, 2 * Math.PI);\r\n\tc.fill();\r\n}\r\nvar circuloVermelho = function(x,y,raio) {\r\n\tc.fillStyle = \"red\";\r\n\tc.beginPath();\r\n\tc.arc(x,y,raio, 0, 2 * Math.PI);\r\n\tc.fill();\r\n}\r\n\r\nvar limpaTela = function(){\r\n\tc.clearRect(0, 0, 600, 400);\r\n}\r\n\r\nvar x = 1;\r\nvar x1 = 600;\r\nvar y = 400;\r\n\r\nvar desenha = function() {\r\n\tlimpaTela();\r\n\tcirculoVermelho(x, 100, 10);\r\n\tcirculoVermelho(400, y, 10);\r\n\tcirculoAzul(x1, 200,10);\r\n\tcirculoAzul(200, x, 10);\r\n\tx = x + 1;\r\n\tx1 = x1 - 1;\r\n\ty = y - 1;\r\n}\r\n\r\nsetInterval(desenha, 30);\r\n\r\n</script>\r\n"}}