GitHub PullRequestReviewCommentEvent at 2014-11-25 20:14:38
Repository: player
Actor: mcm69
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Animatron/player/pulls/comments/20891380","id":20891380,"diff_hunk":"@@ -44,93 +53,108 @@ Controls.prototype.update = function(parent) {\n         this.id = cvs.id;\n         this.canvas = cvs;\n         this.ctx = engine.getContext(cvs, '2d');\n-        this.subscribeEvents(cvs, parent);\n+        this.subscribeEvents(cvs);\n         this.changeTheme(Controls.THEME);\n+        this.setupRenderLoop();\n     } else {\n         engine.updateOverlay(parent, cvs);\n     }\n     this.handleAreaChange();\n     if (this.info) this.info.update(parent);\n     BACK_GRAD = null; // invalidate back gradient\n-}\n-Controls.prototype.subscribeEvents = function(canvas, parent) {","path":"src/anm/ui/controls.js","position":60,"original_position":60,"commit_id":"c994dbd95c779700db89dc4e886df3cfbfecd471","original_commit_id":"c994dbd95c779700db89dc4e886df3cfbfecd471","user":{"login":"mcm69","id":2463254,"avatar_url":"https://avatars.githubusercontent.com/u/2463254?v=3","gravatar_id":"","url":"https://api.github.com/users/mcm69","html_url":"https://github.com/mcm69","followers_url":"https://api.github.com/users/mcm69/followers","following_url":"https://api.github.com/users/mcm69/following{/other_user}","gists_url":"https://api.github.com/users/mcm69/gists{/gist_id}","starred_url":"https://api.github.com/users/mcm69/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcm69/subscriptions","organizations_url":"https://api.github.com/users/mcm69/orgs","repos_url":"https://api.github.com/users/mcm69/repos","events_url":"https://api.github.com/users/mcm69/events{/privacy}","received_events_url":"https://api.github.com/users/mcm69/received_events","type":"User","site_admin":false},"body":"this became unneeded as the controls' canvas isn't _really_ hidden now - it's empty but can still accept events when inactive","created_at":"2014-11-25T20:14:38Z","updated_at":"2014-11-25T20:14:38Z","html_url":"https://github.com/Animatron/player/pull/241#discussion_r20891380","pull_request_url":"https://api.github.com/repos/Animatron/player/pulls/241","_links":{"self":{"href":"https://api.github.com/repos/Animatron/player/pulls/comments/20891380"},"html":{"href":"https://github.com/Animatron/player/pull/241#discussion_r20891380"},"pull_request":{"href":"https://api.github.com/repos/Animatron/player/pulls/241"}}},"pull_request":{"url":"https://api.github.com/repos/Animatron/player/pulls/241","id":25036718,"html_url":"https://github.com/Animatron/player/pull/241","diff_url":"https://github.com/Animatron/player/pull/241.diff","patch_url":"https://github.com/Animatron/player/pull/241.patch","issue_url":"https://api.github.com/repos/Animatron/player/issues/241","number":241,"state":"open","locked":false,"title":"rewrite controls using one render loop","user":{"login":"mcm69","id":2463254,"avatar_url":"https://avatars.githubusercontent.com/u/2463254?v=3","gravatar_id":"","url":"https://api.github.com/users/mcm69","html_url":"https://github.com/mcm69","followers_url":"https://api.github.com/users/mcm69/followers","following_url":"https://api.github.com/users/mcm69/following{/other_user}","gists_url":"https://api.github.com/users/mcm69/gists{/gist_id}","starred_url":"https://api.github.com/users/mcm69/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcm69/subscriptions","organizations_url":"https://api.github.com/users/mcm69/orgs","repos_url":"https://api.github.com/users/mcm69/repos","events_url":"https://api.github.com/users/mcm69/events{/privacy}","received_events_url":"https://api.github.com/users/mcm69/received_events","type":"User","site_admin":false},"body":"The underlying logic in controls is now changed. \r\n\r\nRather than relying on timeouts and forced renderings, the controls now have their own render loop. Of course, this does not mean the play button will get redrawn 60 times per second - the controls' canvas is touched only when the controls' _state_ is changed (e.g. when the player state changed, or if the mouse moved across the play progress).\r\n\r\nAs the controls rely now on player's `S_CHANGE_STATE` event, all the `.render()` and `.forceNextRedraw()` calls became redundant and so were removed.\r\n\r\nAlso, the controls are shown/hidden _really_ smoothy now :-)\r\n\r\nPlease see the code comments for some additional coverage of the changes.","created_at":"2014-11-25T20:12:15Z","updated_at":"2014-11-25T20:14:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47725e53e2ce2e2e7e1762894a764c0904dfe18b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Animatron/player/pulls/241/commits","review_comments_url":"https://api.github.com/repos/Animatron/player/pulls/241/comments","review_comment_url":"https://api.github.com/repos/Animatron/player/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Animatron/player/issues/241/comments","statuses_url":"https://api.github.com/repos/Animatron/player/statuses/c994dbd95c779700db89dc4e886df3cfbfecd471","head":{"label":"Animatron:new-design","ref":"new-design","sha":"c994dbd95c779700db89dc4e886df3cfbfecd471","user":{"login":"Animatron","id":1387673,"avatar_url":"https://avatars.githubusercontent.com/u/1387673?v=3","gravatar_id":"","url":"https://api.github.com/users/Animatron","html_url":"https://github.com/Animatron","followers_url":"https://api.github.com/users/Animatron/followers","following_url":"https://api.github.com/users/Animatron/following{/other_user}","gists_url":"https://api.github.com/users/Animatron/gists{/gist_id}","starred_url":"https://api.github.com/users/Animatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Animatron/subscriptions","organizations_url":"https://api.github.com/users/Animatron/orgs","repos_url":"https://api.github.com/users/Animatron/repos","events_url":"https://api.github.com/users/Animatron/events{/privacy}","received_events_url":"https://api.github.com/users/Animatron/received_events","type":"Organization","site_admin":false},"repo":{"id":3326050,"name":"player","full_name":"Animatron/player","owner":{"login":"Animatron","id":1387673,"avatar_url":"https://avatars.githubusercontent.com/u/1387673?v=3","gravatar_id":"","url":"https://api.github.com/users/Animatron","html_url":"https://github.com/Animatron","followers_url":"https://api.github.com/users/Animatron/followers","following_url":"https://api.github.com/users/Animatron/following{/other_user}","gists_url":"https://api.github.com/users/Animatron/gists{/gist_id}","starred_url":"https://api.github.com/users/Animatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Animatron/subscriptions","organizations_url":"https://api.github.com/users/Animatron/orgs","repos_url":"https://api.github.com/users/Animatron/repos","events_url":"https://api.github.com/users/Animatron/events{/privacy}","received_events_url":"https://api.github.com/users/Animatron/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Animatron/player","description":"JavaScript player for Animatron Tool","fork":false,"url":"https://api.github.com/repos/Animatron/player","forks_url":"https://api.github.com/repos/Animatron/player/forks","keys_url":"https://api.github.com/repos/Animatron/player/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Animatron/player/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Animatron/player/teams","hooks_url":"https://api.github.com/repos/Animatron/player/hooks","issue_events_url":"https://api.github.com/repos/Animatron/player/issues/events{/number}","events_url":"https://api.github.com/repos/Animatron/player/events","assignees_url":"https://api.github.com/repos/Animatron/player/assignees{/user}","branches_url":"https://api.github.com/repos/Animatron/player/branches{/branch}","tags_url":"https://api.github.com/repos/Animatron/player/tags","blobs_url":"https://api.github.com/repos/Animatron/player/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Animatron/player/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Animatron/player/git/refs{/sha}","trees_url":"https://api.github.com/repos/Animatron/player/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Animatron/player/statuses/{sha}","languages_url":"https://api.github.com/repos/Animatron/player/languages","stargazers_url":"https://api.github.com/repos/Animatron/player/stargazers","contributors_url":"https://api.github.com/repos/Animatron/player/contributors","subscribers_url":"https://api.github.com/repos/Animatron/player/subscribers","subscription_url":"https://api.github.com/repos/Animatron/player/subscription","commits_url":"https://api.github.com/repos/Animatron/player/commits{/sha}","git_commits_url":"https://api.github.com/repos/Animatron/player/git/commits{/sha}","comments_url":"https://api.github.com/repos/Animatron/player/comments{/number}","issue_comment_url":"https://api.github.com/repos/Animatron/player/issues/comments/{number}","contents_url":"https://api.github.com/repos/Animatron/player/contents/{+path}","compare_url":"https://api.github.com/repos/Animatron/player/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Animatron/player/merges","archive_url":"https://api.github.com/repos/Animatron/player/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Animatron/player/downloads","issues_url":"https://api.github.com/repos/Animatron/player/issues{/number}","pulls_url":"https://api.github.com/repos/Animatron/player/pulls{/number}","milestones_url":"https://api.github.com/repos/Animatron/player/milestones{/number}","notifications_url":"https://api.github.com/repos/Animatron/player/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Animatron/player/labels{/name}","releases_url":"https://api.github.com/repos/Animatron/player/releases{/id}","created_at":"2012-02-01T15:33:51Z","updated_at":"2014-11-25T16:20:48Z","pushed_at":"2014-11-25T19:59:40Z","git_url":"git://github.com/Animatron/player.git","ssh_url":"git@github.com:Animatron/player.git","clone_url":"https://github.com/Animatron/player.git","svn_url":"https://github.com/Animatron/player","homepage":"http://animatron.com/player","size":36136,"stargazers_count":30,"watchers_count":30,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":30,"default_branch":"develop"}},"base":{"label":"Animatron:develop","ref":"develop","sha":"67b08e4b28d716f4089474e54507c9cc92ee17c6","user":{"login":"Animatron","id":1387673,"avatar_url":"https://avatars.githubusercontent.com/u/1387673?v=3","gravatar_id":"","url":"https://api.github.com/users/Animatron","html_url":"https://github.com/Animatron","followers_url":"https://api.github.com/users/Animatron/followers","following_url":"https://api.github.com/users/Animatron/following{/other_user}","gists_url":"https://api.github.com/users/Animatron/gists{/gist_id}","starred_url":"https://api.github.com/users/Animatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Animatron/subscriptions","organizations_url":"https://api.github.com/users/Animatron/orgs","repos_url":"https://api.github.com/users/Animatron/repos","events_url":"https://api.github.com/users/Animatron/events{/privacy}","received_events_url":"https://api.github.com/users/Animatron/received_events","type":"Organization","site_admin":false},"repo":{"id":3326050,"name":"player","full_name":"Animatron/player","owner":{"login":"Animatron","id":1387673,"avatar_url":"https://avatars.githubusercontent.com/u/1387673?v=3","gravatar_id":"","url":"https://api.github.com/users/Animatron","html_url":"https://github.com/Animatron","followers_url":"https://api.github.com/users/Animatron/followers","following_url":"https://api.github.com/users/Animatron/following{/other_user}","gists_url":"https://api.github.com/users/Animatron/gists{/gist_id}","starred_url":"https://api.github.com/users/Animatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Animatron/subscriptions","organizations_url":"https://api.github.com/users/Animatron/orgs","repos_url":"https://api.github.com/users/Animatron/repos","events_url":"https://api.github.com/users/Animatron/events{/privacy}","received_events_url":"https://api.github.com/users/Animatron/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Animatron/player","description":"JavaScript player for Animatron Tool","fork":false,"url":"https://api.github.com/repos/Animatron/player","forks_url":"https://api.github.com/repos/Animatron/player/forks","keys_url":"https://api.github.com/repos/Animatron/player/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Animatron/player/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Animatron/player/teams","hooks_url":"https://api.github.com/repos/Animatron/player/hooks","issue_events_url":"https://api.github.com/repos/Animatron/player/issues/events{/number}","events_url":"https://api.github.com/repos/Animatron/player/events","assignees_url":"https://api.github.com/repos/Animatron/player/assignees{/user}","branches_url":"https://api.github.com/repos/Animatron/player/branches{/branch}","tags_url":"https://api.github.com/repos/Animatron/player/tags","blobs_url":"https://api.github.com/repos/Animatron/player/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Animatron/player/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Animatron/player/git/refs{/sha}","trees_url":"https://api.github.com/repos/Animatron/player/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Animatron/player/statuses/{sha}","languages_url":"https://api.github.com/repos/Animatron/player/languages","stargazers_url":"https://api.github.com/repos/Animatron/player/stargazers","contributors_url":"https://api.github.com/repos/Animatron/player/contributors","subscribers_url":"https://api.github.com/repos/Animatron/player/subscribers","subscription_url":"https://api.github.com/repos/Animatron/player/subscription","commits_url":"https://api.github.com/repos/Animatron/player/commits{/sha}","git_commits_url":"https://api.github.com/repos/Animatron/player/git/commits{/sha}","comments_url":"https://api.github.com/repos/Animatron/player/comments{/number}","issue_comment_url":"https://api.github.com/repos/Animatron/player/issues/comments/{number}","contents_url":"https://api.github.com/repos/Animatron/player/contents/{+path}","compare_url":"https://api.github.com/repos/Animatron/player/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Animatron/player/merges","archive_url":"https://api.github.com/repos/Animatron/player/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Animatron/player/downloads","issues_url":"https://api.github.com/repos/Animatron/player/issues{/number}","pulls_url":"https://api.github.com/repos/Animatron/player/pulls{/number}","milestones_url":"https://api.github.com/repos/Animatron/player/milestones{/number}","notifications_url":"https://api.github.com/repos/Animatron/player/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Animatron/player/labels{/name}","releases_url":"https://api.github.com/repos/Animatron/player/releases{/id}","created_at":"2012-02-01T15:33:51Z","updated_at":"2014-11-25T16:20:48Z","pushed_at":"2014-11-25T19:59:40Z","git_url":"git://github.com/Animatron/player.git","ssh_url":"git@github.com:Animatron/player.git","clone_url":"https://github.com/Animatron/player.git","svn_url":"https://github.com/Animatron/player","homepage":"http://animatron.com/player","size":36136,"stargazers_count":30,"watchers_count":30,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":30,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Animatron/player/pulls/241"},"html":{"href":"https://github.com/Animatron/player/pull/241"},"issue":{"href":"https://api.github.com/repos/Animatron/player/issues/241"},"comments":{"href":"https://api.github.com/repos/Animatron/player/issues/241/comments"},"review_comments":{"href":"https://api.github.com/repos/Animatron/player/pulls/241/comments"},"review_comment":{"href":"https://api.github.com/repos/Animatron/player/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Animatron/player/pulls/241/commits"},"statuses":{"href":"https://api.github.com/repos/Animatron/player/statuses/c994dbd95c779700db89dc4e886df3cfbfecd471"}}}}