{"comment":{"url":"https://api.github.com/repos/tuisialves/clock/comments/20078829","html_url":"https://github.com/tuisialves/clock/commit/d0ac6da6e4febb95445068cd45fd05779f1f39ec#commitcomment-20078829","id":20078829,"user":{"login":"tuisialves","id":22623683,"avatar_url":"https://avatars.githubusercontent.com/u/22623683?v=3","gravatar_id":"","url":"https://api.github.com/users/tuisialves","html_url":"https://github.com/tuisialves","followers_url":"https://api.github.com/users/tuisialves/followers","following_url":"https://api.github.com/users/tuisialves/following{/other_user}","gists_url":"https://api.github.com/users/tuisialves/gists{/gist_id}","starred_url":"https://api.github.com/users/tuisialves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuisialves/subscriptions","organizations_url":"https://api.github.com/users/tuisialves/orgs","repos_url":"https://api.github.com/users/tuisialves/repos","events_url":"https://api.github.com/users/tuisialves/events{/privacy}","received_events_url":"https://api.github.com/users/tuisialves/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"d0ac6da6e4febb95445068cd45fd05779f1f39ec","created_at":"2016-12-05T21:41:03Z","updated_at":"2016-12-05T21:41:03Z","body":"function setup() {\r\n  createCanvas(800,600)\r\n  angleMode(DEGREES)\r\n\r\n}\r\n\r\nfunction draw() {\r\n  background(255)\r\n  translate(width/2,height/2)\r\n\r\n  stroke (166,232,166); \r\n\tfill(255);\r\n\tellipse(0,0,450,450);\r\n\t\r\n \r\n  \r\n  \r\n  \r\n  //hours\r\n  if(hour()>12){\r\n    var hour12 = hour()-12\r\n  } else {\r\n    var hour12 = hour()\r\n  }\r\n  drawNendle(hour12,12,10,90,[\"#7ACE91\"])\r\n  \r\n  //minutes\r\n  drawNendle(minute(),60,6,150,[\"#72BA86\"])\r\n  \r\n  // seconds\r\n  drawNendle(second(),60,1,180,[\"#3EC163\"]) \r\n  \r\n  stroke (171, 255, 171);\r\n  fill(0)\r\n  ellipse(0,0,15)\r\n  \r\n  for (var r = 1; r <= 12; r++) {\r\n        push();\r\n        rotate(r * 30);\r\n        fill(171,255,171);\r\n        noStroke();\r\n        ellipse(170,100,10,10);\r\n        pop();\r\n    }\r\n  \r\n  \r\n}\r\n\r\nfunction drawNendle(needlevalue,needlerange,needleweight,needleradius,needlecol){\r\n  var angle = map(needlevalue,0,needlerange,-90,270)\r\n  stroke(needlecol)\r\n  strokeWeight(needleweight)\r\n  line(0,0,needleradius*cos(angle),needleradius*sin(angle))\r\n}"}}
{"actor":{"display_login":"tuisialves"}}