{"action":"created","comment":{"url":"https://api.github.com/repos/NUbots/NUsight2/pulls/comments/183210696","pull_request_review_id":114173865,"id":183210696,"diff_hunk":"@@ -0,0 +1,61 @@\n+import { autorun } from 'mobx'\n+import { action } from 'mobx'\n+import { observer } from 'mobx-react'\n+import * as React from 'react'\n+import { Component } from 'react'\n+\n+import { CameraViewModel } from './view_model'\n+\n+@observer\n+export class CameraView extends Component<{ viewModel: CameraViewModel }> {\n+  private destroy: () => void = () => {}\n+\n+  componentDidMount() {\n+    this.destroy = autorun(() => this.renderScene(), {\n+      scheduler: requestAnimationFrame,\n+    })\n+  }\n+\n+  componentWillUnmount() {\n+    this.destroy()\n+  }\n+\n+  render() {\n+\n+    const { width, height } = this.props.viewModel\n+\n+    const aspectRatio = width / height\n+    const percentage = 60\n+\n+    return (\n+      <canvas style={{\n+        display: 'inline',\n+        width: `${percentage}vw`,\n+        height: `${percentage / aspectRatio}vw`,\n+        maxHeight: `${percentage}vh`,\n+        maxWidth: `${percentage * aspectRatio}vh`,\n+      }}\n+        width={width}\n+        height={height}\n+        ref={this.onRef}/>\n+    )\n+  }\n+\n+  @action\n+  private onRef = (canvas: HTMLCanvasElement | null) => {\n+    this.props.viewModel.canvas = canvas","path":"src/client/components/vision/camera/view.tsx","position":46,"original_position":46,"commit_id":"5932a98441503d4d49a202e4c96a311de86b7c7f","original_commit_id":"5932a98441503d4d49a202e4c96a311de86b7c7f","user":{"login":"TrentHouliston","id":957962,"avatar_url":"https://avatars1.githubusercontent.com/u/957962?v=4","gravatar_id":"","url":"https://api.github.com/users/TrentHouliston","html_url":"https://github.com/TrentHouliston","followers_url":"https://api.github.com/users/TrentHouliston/followers","following_url":"https://api.github.com/users/TrentHouliston/following{/other_user}","gists_url":"https://api.github.com/users/TrentHouliston/gists{/gist_id}","starred_url":"https://api.github.com/users/TrentHouliston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrentHouliston/subscriptions","organizations_url":"https://api.github.com/users/TrentHouliston/orgs","repos_url":"https://api.github.com/users/TrentHouliston/repos","events_url":"https://api.github.com/users/TrentHouliston/events{/privacy}","received_events_url":"https://api.github.com/users/TrentHouliston/received_events","type":"User","site_admin":false},"body":"Good luck :P, need to get that renderer somehow","created_at":"2018-04-21T14:13:11Z","updated_at":"2018-04-21T14:13:11Z","html_url":"https://github.com/NUbots/NUsight2/pull/176#discussion_r183210696","pull_request_url":"https://api.github.com/repos/NUbots/NUsight2/pulls/176","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/NUbots/NUsight2/pulls/comments/183210696"},"html":{"href":"https://github.com/NUbots/NUsight2/pull/176#discussion_r183210696"},"pull_request":{"href":"https://api.github.com/repos/NUbots/NUsight2/pulls/176"}},"in_reply_to_id":183209595},"pull_request":{"url":"https://api.github.com/repos/NUbots/NUsight2/pulls/176","id":182667761,"html_url":"https://github.com/NUbots/NUsight2/pull/176","diff_url":"https://github.com/NUbots/NUsight2/pull/176.diff","patch_url":"https://github.com/NUbots/NUsight2/pull/176.patch","issue_url":"https://api.github.com/repos/NUbots/NUsight2/issues/176","number":176,"state":"open","locked":false,"title":"Implement basic vision view","user":{"login":"TrentHouliston","id":957962,"avatar_url":"https://avatars1.githubusercontent.com/u/957962?v=4","gravatar_id":"","url":"https://api.github.com/users/TrentHouliston","html_url":"https://github.com/TrentHouliston","followers_url":"https://api.github.com/users/TrentHouliston/followers","following_url":"https://api.github.com/users/TrentHouliston/following{/other_user}","gists_url":"https://api.github.com/users/TrentHouliston/gists{/gist_id}","starred_url":"https://api.github.com/users/TrentHouliston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrentHouliston/subscriptions","organizations_url":"https://api.github.com/users/TrentHouliston/orgs","repos_url":"https://api.github.com/users/TrentHouliston/repos","events_url":"https://api.github.com/users/TrentHouliston/events{/privacy}","received_events_url":"https://api.github.com/users/TrentHouliston/received_events","type":"User","site_admin":false},"body":"Implements a basic vision view.\r\nShows each robot's camera streams","created_at":"2018-04-19T05:13:22Z","updated_at":"2018-04-21T14:13:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c54634eb7e5ad7b10765f2f5e3985ac50d66e48","assignee":null,"assignees":[],"requested_reviewers":[{"login":"JosephusPaye","id":5924865,"avatar_url":"https://avatars1.githubusercontent.com/u/5924865?v=4","gravatar_id":"","url":"https://api.github.com/users/JosephusPaye","html_url":"https://github.com/JosephusPaye","followers_url":"https://api.github.com/users/JosephusPaye/followers","following_url":"https://api.github.com/users/JosephusPaye/following{/other_user}","gists_url":"https://api.github.com/users/JosephusPaye/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephusPaye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephusPaye/subscriptions","organizations_url":"https://api.github.com/users/JosephusPaye/orgs","repos_url":"https://api.github.com/users/JosephusPaye/repos","events_url":"https://api.github.com/users/JosephusPaye/events{/privacy}","received_events_url":"https://api.github.com/users/JosephusPaye/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NUbots/NUsight2/pulls/176/commits","review_comments_url":"https://api.github.com/repos/NUbots/NUsight2/pulls/176/comments","review_comment_url":"https://api.github.com/repos/NUbots/NUsight2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NUbots/NUsight2/issues/176/comments","statuses_url":"https://api.github.com/repos/NUbots/NUsight2/statuses/5932a98441503d4d49a202e4c96a311de86b7c7f","head":{"label":"NUbots:houliston/vision","ref":"houliston/vision","sha":"5932a98441503d4d49a202e4c96a311de86b7c7f","user":{"login":"NUbots","id":150660,"avatar_url":"https://avatars1.githubusercontent.com/u/150660?v=4","gravatar_id":"","url":"https://api.github.com/users/NUbots","html_url":"https://github.com/NUbots","followers_url":"https://api.github.com/users/NUbots/followers","following_url":"https://api.github.com/users/NUbots/following{/other_user}","gists_url":"https://api.github.com/users/NUbots/gists{/gist_id}","starred_url":"https://api.github.com/users/NUbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NUbots/subscriptions","organizations_url":"https://api.github.com/users/NUbots/orgs","repos_url":"https://api.github.com/users/NUbots/repos","events_url":"https://api.github.com/users/NUbots/events{/privacy}","received_events_url":"https://api.github.com/users/NUbots/received_events","type":"Organization","site_admin":false},"repo":{"id":91078846,"name":"NUsight2","full_name":"NUbots/NUsight2","owner":{"login":"NUbots","id":150660,"avatar_url":"https://avatars1.githubusercontent.com/u/150660?v=4","gravatar_id":"","url":"https://api.github.com/users/NUbots","html_url":"https://github.com/NUbots","followers_url":"https://api.github.com/users/NUbots/followers","following_url":"https://api.github.com/users/NUbots/following{/other_user}","gists_url":"https://api.github.com/users/NUbots/gists{/gist_id}","starred_url":"https://api.github.com/users/NUbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NUbots/subscriptions","organizations_url":"https://api.github.com/users/NUbots/orgs","repos_url":"https://api.github.com/users/NUbots/repos","events_url":"https://api.github.com/users/NUbots/events{/privacy}","received_events_url":"https://api.github.com/users/NUbots/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NUbots/NUsight2","description":"A visual real-time web-based debugging environment used to understand and improve robotics systems.","fork":false,"url":"https://api.github.com/repos/NUbots/NUsight2","forks_url":"https://api.github.com/repos/NUbots/NUsight2/forks","keys_url":"https://api.github.com/repos/NUbots/NUsight2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NUbots/NUsight2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NUbots/NUsight2/teams","hooks_url":"https://api.github.com/repos/NUbots/NUsight2/hooks","issue_events_url":"https://api.github.com/repos/NUbots/NUsight2/issues/events{/number}","events_url":"https://api.github.com/repos/NUbots/NUsight2/events","assignees_url":"https://api.github.com/repos/NUbots/NUsight2/assignees{/user}","branches_url":"https://api.github.com/repos/NUbots/NUsight2/branches{/branch}","tags_url":"https://api.github.com/repos/NUbots/NUsight2/tags","blobs_url":"https://api.github.com/repos/NUbots/NUsight2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NUbots/NUsight2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NUbots/NUsight2/git/refs{/sha}","trees_url":"https://api.github.com/repos/NUbots/NUsight2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NUbots/NUsight2/statuses/{sha}","languages_url":"https://api.github.com/repos/NUbots/NUsight2/languages","stargazers_url":"https://api.github.com/repos/NUbots/NUsight2/stargazers","contributors_url":"https://api.github.com/repos/NUbots/NUsight2/contributors","subscribers_url":"https://api.github.com/repos/NUbots/NUsight2/subscribers","subscription_url":"https://api.github.com/repos/NUbots/NUsight2/subscription","commits_url":"https://api.github.com/repos/NUbots/NUsight2/commits{/sha}","git_commits_url":"https://api.github.com/repos/NUbots/NUsight2/git/commits{/sha}","comments_url":"https://api.github.com/repos/NUbots/NUsight2/comments{/number}","issue_comment_url":"https://api.github.com/repos/NUbots/NUsight2/issues/comments{/number}","contents_url":"https://api.github.com/repos/NUbots/NUsight2/contents/{+path}","compare_url":"https://api.github.com/repos/NUbots/NUsight2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NUbots/NUsight2/merges","archive_url":"https://api.github.com/repos/NUbots/NUsight2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NUbots/NUsight2/downloads","issues_url":"https://api.github.com/repos/NUbots/NUsight2/issues{/number}","pulls_url":"https://api.github.com/repos/NUbots/NUsight2/pulls{/number}","milestones_url":"https://api.github.com/repos/NUbots/NUsight2/milestones{/number}","notifications_url":"https://api.github.com/repos/NUbots/NUsight2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NUbots/NUsight2/labels{/name}","releases_url":"https://api.github.com/repos/NUbots/NUsight2/releases{/id}","deployments_url":"https://api.github.com/repos/NUbots/NUsight2/deployments","created_at":"2017-05-12T10:10:59Z","updated_at":"2018-04-20T03:25:35Z","pushed_at":"2018-04-20T04:40:58Z","git_url":"git://github.com/NUbots/NUsight2.git","ssh_url":"git@github.com:NUbots/NUsight2.git","clone_url":"https://github.com/NUbots/NUsight2.git","svn_url":"https://github.com/NUbots/NUsight2","homepage":"https://nusight.herokuapp.com","size":3618,"stargazers_count":7,"watchers_count":7,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":19,"license":null,"forks":0,"open_issues":19,"watchers":7,"default_branch":"master"}},"base":{"label":"NUbots:master","ref":"master","sha":"53dd3a400e274c02a7dcf1f7c4cf862ef05c9ca0","user":{"login":"NUbots","id":150660,"avatar_url":"https://avatars1.githubusercontent.com/u/150660?v=4","gravatar_id":"","url":"https://api.github.com/users/NUbots","html_url":"https://github.com/NUbots","followers_url":"https://api.github.com/users/NUbots/followers","following_url":"https://api.github.com/users/NUbots/following{/other_user}","gists_url":"https://api.github.com/users/NUbots/gists{/gist_id}","starred_url":"https://api.github.com/users/NUbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NUbots/subscriptions","organizations_url":"https://api.github.com/users/NUbots/orgs","repos_url":"https://api.github.com/users/NUbots/repos","events_url":"https://api.github.com/users/NUbots/events{/privacy}","received_events_url":"https://api.github.com/users/NUbots/received_events","type":"Organization","site_admin":false},"repo":{"id":91078846,"name":"NUsight2","full_name":"NUbots/NUsight2","owner":{"login":"NUbots","id":150660,"avatar_url":"https://avatars1.githubusercontent.com/u/150660?v=4","gravatar_id":"","url":"https://api.github.com/users/NUbots","html_url":"https://github.com/NUbots","followers_url":"https://api.github.com/users/NUbots/followers","following_url":"https://api.github.com/users/NUbots/following{/other_user}","gists_url":"https://api.github.com/users/NUbots/gists{/gist_id}","starred_url":"https://api.github.com/users/NUbots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NUbots/subscriptions","organizations_url":"https://api.github.com/users/NUbots/orgs","repos_url":"https://api.github.com/users/NUbots/repos","events_url":"https://api.github.com/users/NUbots/events{/privacy}","received_events_url":"https://api.github.com/users/NUbots/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NUbots/NUsight2","description":"A visual real-time web-based debugging environment used to understand and improve robotics systems.","fork":false,"url":"https://api.github.com/repos/NUbots/NUsight2","forks_url":"https://api.github.com/repos/NUbots/NUsight2/forks","keys_url":"https://api.github.com/repos/NUbots/NUsight2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NUbots/NUsight2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NUbots/NUsight2/teams","hooks_url":"https://api.github.com/repos/NUbots/NUsight2/hooks","issue_events_url":"https://api.github.com/repos/NUbots/NUsight2/issues/events{/number}","events_url":"https://api.github.com/repos/NUbots/NUsight2/events","assignees_url":"https://api.github.com/repos/NUbots/NUsight2/assignees{/user}","branches_url":"https://api.github.com/repos/NUbots/NUsight2/branches{/branch}","tags_url":"https://api.github.com/repos/NUbots/NUsight2/tags","blobs_url":"https://api.github.com/repos/NUbots/NUsight2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NUbots/NUsight2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NUbots/NUsight2/git/refs{/sha}","trees_url":"https://api.github.com/repos/NUbots/NUsight2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NUbots/NUsight2/statuses/{sha}","languages_url":"https://api.github.com/repos/NUbots/NUsight2/languages","stargazers_url":"https://api.github.com/repos/NUbots/NUsight2/stargazers","contributors_url":"https://api.github.com/repos/NUbots/NUsight2/contributors","subscribers_url":"https://api.github.com/repos/NUbots/NUsight2/subscribers","subscription_url":"https://api.github.com/repos/NUbots/NUsight2/subscription","commits_url":"https://api.github.com/repos/NUbots/NUsight2/commits{/sha}","git_commits_url":"https://api.github.com/repos/NUbots/NUsight2/git/commits{/sha}","comments_url":"https://api.github.com/repos/NUbots/NUsight2/comments{/number}","issue_comment_url":"https://api.github.com/repos/NUbots/NUsight2/issues/comments{/number}","contents_url":"https://api.github.com/repos/NUbots/NUsight2/contents/{+path}","compare_url":"https://api.github.com/repos/NUbots/NUsight2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NUbots/NUsight2/merges","archive_url":"https://api.github.com/repos/NUbots/NUsight2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NUbots/NUsight2/downloads","issues_url":"https://api.github.com/repos/NUbots/NUsight2/issues{/number}","pulls_url":"https://api.github.com/repos/NUbots/NUsight2/pulls{/number}","milestones_url":"https://api.github.com/repos/NUbots/NUsight2/milestones{/number}","notifications_url":"https://api.github.com/repos/NUbots/NUsight2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NUbots/NUsight2/labels{/name}","releases_url":"https://api.github.com/repos/NUbots/NUsight2/releases{/id}","deployments_url":"https://api.github.com/repos/NUbots/NUsight2/deployments","created_at":"2017-05-12T10:10:59Z","updated_at":"2018-04-20T03:25:35Z","pushed_at":"2018-04-20T04:40:58Z","git_url":"git://github.com/NUbots/NUsight2.git","ssh_url":"git@github.com:NUbots/NUsight2.git","clone_url":"https://github.com/NUbots/NUsight2.git","svn_url":"https://github.com/NUbots/NUsight2","homepage":"https://nusight.herokuapp.com","size":3618,"stargazers_count":7,"watchers_count":7,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":19,"license":null,"forks":0,"open_issues":19,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NUbots/NUsight2/pulls/176"},"html":{"href":"https://github.com/NUbots/NUsight2/pull/176"},"issue":{"href":"https://api.github.com/repos/NUbots/NUsight2/issues/176"},"comments":{"href":"https://api.github.com/repos/NUbots/NUsight2/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/NUbots/NUsight2/pulls/176/comments"},"review_comment":{"href":"https://api.github.com/repos/NUbots/NUsight2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NUbots/NUsight2/pulls/176/commits"},"statuses":{"href":"https://api.github.com/repos/NUbots/NUsight2/statuses/5932a98441503d4d49a202e4c96a311de86b7c7f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"TrentHouliston"}}