{"action":"created","issue":{"url":"https://api.github.com/repos/processing/p5.js/issues/1442","repository_url":"https://api.github.com/repos/processing/p5.js","labels_url":"https://api.github.com/repos/processing/p5.js/issues/1442/labels{/name}","comments_url":"https://api.github.com/repos/processing/p5.js/issues/1442/comments","events_url":"https://api.github.com/repos/processing/p5.js/issues/1442/events","html_url":"https://github.com/processing/p5.js/pull/1442","id":157452527,"number":1442,"title":"Improve example for p5.prototype.focused","user":{"login":"chiunhau","id":6561433,"avatar_url":"https://avatars.githubusercontent.com/u/6561433?v=3","gravatar_id":"","url":"https://api.github.com/users/chiunhau","html_url":"https://github.com/chiunhau","followers_url":"https://api.github.com/users/chiunhau/followers","following_url":"https://api.github.com/users/chiunhau/following{/other_user}","gists_url":"https://api.github.com/users/chiunhau/gists{/gist_id}","starred_url":"https://api.github.com/users/chiunhau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiunhau/subscriptions","organizations_url":"https://api.github.com/users/chiunhau/orgs","repos_url":"https://api.github.com/users/chiunhau/repos","events_url":"https://api.github.com/users/chiunhau/events{/privacy}","received_events_url":"https://api.github.com/users/chiunhau/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-30T08:08:08Z","updated_at":"2016-05-30T14:48:24Z","closed_at":"2016-05-30T14:48:16Z","pull_request":{"url":"https://api.github.com/repos/processing/p5.js/pulls/1442","html_url":"https://github.com/processing/p5.js/pull/1442","diff_url":"https://github.com/processing/p5.js/pull/1442.diff","patch_url":"https://github.com/processing/p5.js/pull/1442.patch"},"body":"The original example isn't wrong but a little bit confusing:\r\nWhen we switch to other window, `focused` turns false and a red cross shows which overlaps the circle. But then if switch back, `focused` turns true again right. However, the red cross is still here, the only difference is, the green circle is now on top of red cross.\r\n\r\nI think it's hard to notice the difference between two state for people, I just thought it's a bug when I first play with this example. So I try to improve it to be more logical and visual appealing.\r\n![slice1](https://cloud.githubusercontent.com/assets/6561433/15643527/7965c4dc-2680-11e6-88d8-a071faabb0c8.png)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/processing/p5.js/issues/comments/222507908","html_url":"https://github.com/processing/p5.js/pull/1442#issuecomment-222507908","issue_url":"https://api.github.com/repos/processing/p5.js/issues/1442","id":222507908,"user":{"login":"lmccart","id":191056,"avatar_url":"https://avatars.githubusercontent.com/u/191056?v=3","gravatar_id":"","url":"https://api.github.com/users/lmccart","html_url":"https://github.com/lmccart","followers_url":"https://api.github.com/users/lmccart/followers","following_url":"https://api.github.com/users/lmccart/following{/other_user}","gists_url":"https://api.github.com/users/lmccart/gists{/gist_id}","starred_url":"https://api.github.com/users/lmccart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmccart/subscriptions","organizations_url":"https://api.github.com/users/lmccart/orgs","repos_url":"https://api.github.com/users/lmccart/repos","events_url":"https://api.github.com/users/lmccart/events{/privacy}","received_events_url":"https://api.github.com/users/lmccart/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T14:48:24Z","updated_at":"2016-05-30T14:48:24Z","body":"looks great, this is more clear, thanks!"}}
{"actor":{"display_login":"lmccart"}}