{"action":"opened","number":37,"pull_request":{"url":"https://api.github.com/repos/ayasdi/grapher/pulls/37","id":169467134,"html_url":"https://github.com/ayasdi/grapher/pull/37","diff_url":"https://github.com/ayasdi/grapher/pull/37.diff","patch_url":"https://github.com/ayasdi/grapher/pull/37.patch","issue_url":"https://api.github.com/repos/ayasdi/grapher/issues/37","number":37,"state":"open","locked":false,"title":"updating 2d canvas rendering","user":{"login":"conorayasdi","id":10930388,"avatar_url":"https://avatars1.githubusercontent.com/u/10930388?v=4","gravatar_id":"","url":"https://api.github.com/users/conorayasdi","html_url":"https://github.com/conorayasdi","followers_url":"https://api.github.com/users/conorayasdi/followers","following_url":"https://api.github.com/users/conorayasdi/following{/other_user}","gists_url":"https://api.github.com/users/conorayasdi/gists{/gist_id}","starred_url":"https://api.github.com/users/conorayasdi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conorayasdi/subscriptions","organizations_url":"https://api.github.com/users/conorayasdi/orgs","repos_url":"https://api.github.com/users/conorayasdi/repos","events_url":"https://api.github.com/users/conorayasdi/events{/privacy}","received_events_url":"https://api.github.com/users/conorayasdi/received_events","type":"User","site_admin":false},"body":"This PR is to make the 2d canvas graphs look more like the WebGL versions. The difference is most notable when zoomed out a lot.\r\n\r\nChanges in this diff:\r\n\r\n- I added alwaysUse2dCanvas option to make it easier to test the 2d canvas mode on computers with WebGL support\r\n- Alpha was being passed to the canvas in a 0-255 range, but the rgba in fillStyle and strokeStyle expects alpha in the 0-1 range. So now the alpha is being converted to the 0-1 range\r\n- The radius of nodes in WebGL has 2 extra pixels added to it. There is a `+ 1` when passing the radius to the buffer, and then I think another pixel comes from the `(distance >= 0 && distance <= 1)` from node.frag shader.\r\n- I make the 2d links 50% thinner. I'm not sure why they look thicker on canvas, this just seemed to be a good constant for me\r\n- I added a darker border around the nodes so they look like the WebGL version. Couldn't figure out how to make it exactly match the WebGL, this just looks pretty close to me\r\n\r\nHow to test this:\r\nChrome -> Settings -> Advanced -> Disable hardware acceleration, or pass `alwaysUse2dCanvas: true` to the grapher constructor","created_at":"2018-02-15T19:45:18Z","updated_at":"2018-02-15T19:45:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ayasdi/grapher/pulls/37/commits","review_comments_url":"https://api.github.com/repos/ayasdi/grapher/pulls/37/comments","review_comment_url":"https://api.github.com/repos/ayasdi/grapher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ayasdi/grapher/issues/37/comments","statuses_url":"https://api.github.com/repos/ayasdi/grapher/statuses/c1e32d93fcd43d2962e6c2bb6bef942be0346183","head":{"label":"ayasdi:improve2dCanvas","ref":"improve2dCanvas","sha":"c1e32d93fcd43d2962e6c2bb6bef942be0346183","user":{"login":"ayasdi","id":9852563,"avatar_url":"https://avatars2.githubusercontent.com/u/9852563?v=4","gravatar_id":"","url":"https://api.github.com/users/ayasdi","html_url":"https://github.com/ayasdi","followers_url":"https://api.github.com/users/ayasdi/followers","following_url":"https://api.github.com/users/ayasdi/following{/other_user}","gists_url":"https://api.github.com/users/ayasdi/gists{/gist_id}","starred_url":"https://api.github.com/users/ayasdi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayasdi/subscriptions","organizations_url":"https://api.github.com/users/ayasdi/orgs","repos_url":"https://api.github.com/users/ayasdi/repos","events_url":"https://api.github.com/users/ayasdi/events{/privacy}","received_events_url":"https://api.github.com/users/ayasdi/received_events","type":"Organization","site_admin":false},"repo":{"id":27896891,"name":"grapher","full_name":"ayasdi/grapher","owner":{"login":"ayasdi","id":9852563,"avatar_url":"https://avatars2.githubusercontent.com/u/9852563?v=4","gravatar_id":"","url":"https://api.github.com/users/ayasdi","html_url":"https://github.com/ayasdi","followers_url":"https://api.github.com/users/ayasdi/followers","following_url":"https://api.github.com/users/ayasdi/following{/other_user}","gists_url":"https://api.github.com/users/ayasdi/gists{/gist_id}","starred_url":"https://api.github.com/users/ayasdi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayasdi/subscriptions","organizations_url":"https://api.github.com/users/ayasdi/orgs","repos_url":"https://api.github.com/users/ayasdi/repos","events_url":"https://api.github.com/users/ayasdi/events{/privacy}","received_events_url":"https://api.github.com/users/ayasdi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ayasdi/grapher","description":"WebGL/Canvas Network Graphs","fork":false,"url":"https://api.github.com/repos/ayasdi/grapher","forks_url":"https://api.github.com/repos/ayasdi/grapher/forks","keys_url":"https://api.github.com/repos/ayasdi/grapher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ayasdi/grapher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ayasdi/grapher/teams","hooks_url":"https://api.github.com/repos/ayasdi/grapher/hooks","issue_events_url":"https://api.github.com/repos/ayasdi/grapher/issues/events{/number}","events_url":"https://api.github.com/repos/ayasdi/grapher/events","assignees_url":"https://api.github.com/repos/ayasdi/grapher/assignees{/user}","branches_url":"https://api.github.com/repos/ayasdi/grapher/branches{/branch}","tags_url":"https://api.github.com/repos/ayasdi/grapher/tags","blobs_url":"https://api.github.com/repos/ayasdi/grapher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ayasdi/grapher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ayasdi/grapher/git/refs{/sha}","trees_url":"https://api.github.com/repos/ayasdi/grapher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ayasdi/grapher/statuses/{sha}","languages_url":"https://api.github.com/repos/ayasdi/grapher/languages","stargazers_url":"https://api.github.com/repos/ayasdi/grapher/stargazers","contributors_url":"https://api.github.com/repos/ayasdi/grapher/contributors","subscribers_url":"https://api.github.com/repos/ayasdi/grapher/subscribers","subscription_url":"https://api.github.com/repos/ayasdi/grapher/subscription","commits_url":"https://api.github.com/repos/ayasdi/grapher/commits{/sha}","git_commits_url":"https://api.github.com/repos/ayasdi/grapher/git/commits{/sha}","comments_url":"https://api.github.com/repos/ayasdi/grapher/comments{/number}","issue_comment_url":"https://api.github.com/repos/ayasdi/grapher/issues/comments{/number}","contents_url":"https://api.github.com/repos/ayasdi/grapher/contents/{+path}","compare_url":"https://api.github.com/repos/ayasdi/grapher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ayasdi/grapher/merges","archive_url":"https://api.github.com/repos/ayasdi/grapher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ayasdi/grapher/downloads","issues_url":"https://api.github.com/repos/ayasdi/grapher/issues{/number}","pulls_url":"https://api.github.com/repos/ayasdi/grapher/pulls{/number}","milestones_url":"https://api.github.com/repos/ayasdi/grapher/milestones{/number}","notifications_url":"https://api.github.com/repos/ayasdi/grapher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ayasdi/grapher/labels{/name}","releases_url":"https://api.github.com/repos/ayasdi/grapher/releases{/id}","deployments_url":"https://api.github.com/repos/ayasdi/grapher/deployments","created_at":"2014-12-11T23:28:15Z","updated_at":"2018-01-21T03:13:47Z","pushed_at":"2018-02-15T19:20:20Z","git_url":"git://github.com/ayasdi/grapher.git","ssh_url":"git@github.com:ayasdi/grapher.git","clone_url":"https://github.com/ayasdi/grapher.git","svn_url":"https://github.com/ayasdi/grapher","homepage":"http://ayasdi.github.io/grapher/","size":963,"stargazers_count":157,"watchers_count":157,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":31,"open_issues":5,"watchers":157,"default_branch":"master"}},"base":{"label":"ayasdi:master","ref":"master","sha":"2c89dbb2a163ced6c1f5763f86486302d58a11e9","user":{"login":"ayasdi","id":9852563,"avatar_url":"https://avatars2.githubusercontent.com/u/9852563?v=4","gravatar_id":"","url":"https://api.github.com/users/ayasdi","html_url":"https://github.com/ayasdi","followers_url":"https://api.github.com/users/ayasdi/followers","following_url":"https://api.github.com/users/ayasdi/following{/other_user}","gists_url":"https://api.github.com/users/ayasdi/gists{/gist_id}","starred_url":"https://api.github.com/users/ayasdi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayasdi/subscriptions","organizations_url":"https://api.github.com/users/ayasdi/orgs","repos_url":"https://api.github.com/users/ayasdi/repos","events_url":"https://api.github.com/users/ayasdi/events{/privacy}","received_events_url":"https://api.github.com/users/ayasdi/received_events","type":"Organization","site_admin":false},"repo":{"id":27896891,"name":"grapher","full_name":"ayasdi/grapher","owner":{"login":"ayasdi","id":9852563,"avatar_url":"https://avatars2.githubusercontent.com/u/9852563?v=4","gravatar_id":"","url":"https://api.github.com/users/ayasdi","html_url":"https://github.com/ayasdi","followers_url":"https://api.github.com/users/ayasdi/followers","following_url":"https://api.github.com/users/ayasdi/following{/other_user}","gists_url":"https://api.github.com/users/ayasdi/gists{/gist_id}","starred_url":"https://api.github.com/users/ayasdi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayasdi/subscriptions","organizations_url":"https://api.github.com/users/ayasdi/orgs","repos_url":"https://api.github.com/users/ayasdi/repos","events_url":"https://api.github.com/users/ayasdi/events{/privacy}","received_events_url":"https://api.github.com/users/ayasdi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ayasdi/grapher","description":"WebGL/Canvas Network Graphs","fork":false,"url":"https://api.github.com/repos/ayasdi/grapher","forks_url":"https://api.github.com/repos/ayasdi/grapher/forks","keys_url":"https://api.github.com/repos/ayasdi/grapher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ayasdi/grapher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ayasdi/grapher/teams","hooks_url":"https://api.github.com/repos/ayasdi/grapher/hooks","issue_events_url":"https://api.github.com/repos/ayasdi/grapher/issues/events{/number}","events_url":"https://api.github.com/repos/ayasdi/grapher/events","assignees_url":"https://api.github.com/repos/ayasdi/grapher/assignees{/user}","branches_url":"https://api.github.com/repos/ayasdi/grapher/branches{/branch}","tags_url":"https://api.github.com/repos/ayasdi/grapher/tags","blobs_url":"https://api.github.com/repos/ayasdi/grapher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ayasdi/grapher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ayasdi/grapher/git/refs{/sha}","trees_url":"https://api.github.com/repos/ayasdi/grapher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ayasdi/grapher/statuses/{sha}","languages_url":"https://api.github.com/repos/ayasdi/grapher/languages","stargazers_url":"https://api.github.com/repos/ayasdi/grapher/stargazers","contributors_url":"https://api.github.com/repos/ayasdi/grapher/contributors","subscribers_url":"https://api.github.com/repos/ayasdi/grapher/subscribers","subscription_url":"https://api.github.com/repos/ayasdi/grapher/subscription","commits_url":"https://api.github.com/repos/ayasdi/grapher/commits{/sha}","git_commits_url":"https://api.github.com/repos/ayasdi/grapher/git/commits{/sha}","comments_url":"https://api.github.com/repos/ayasdi/grapher/comments{/number}","issue_comment_url":"https://api.github.com/repos/ayasdi/grapher/issues/comments{/number}","contents_url":"https://api.github.com/repos/ayasdi/grapher/contents/{+path}","compare_url":"https://api.github.com/repos/ayasdi/grapher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ayasdi/grapher/merges","archive_url":"https://api.github.com/repos/ayasdi/grapher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ayasdi/grapher/downloads","issues_url":"https://api.github.com/repos/ayasdi/grapher/issues{/number}","pulls_url":"https://api.github.com/repos/ayasdi/grapher/pulls{/number}","milestones_url":"https://api.github.com/repos/ayasdi/grapher/milestones{/number}","notifications_url":"https://api.github.com/repos/ayasdi/grapher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ayasdi/grapher/labels{/name}","releases_url":"https://api.github.com/repos/ayasdi/grapher/releases{/id}","deployments_url":"https://api.github.com/repos/ayasdi/grapher/deployments","created_at":"2014-12-11T23:28:15Z","updated_at":"2018-01-21T03:13:47Z","pushed_at":"2018-02-15T19:20:20Z","git_url":"git://github.com/ayasdi/grapher.git","ssh_url":"git@github.com:ayasdi/grapher.git","clone_url":"https://github.com/ayasdi/grapher.git","svn_url":"https://github.com/ayasdi/grapher","homepage":"http://ayasdi.github.io/grapher/","size":963,"stargazers_count":157,"watchers_count":157,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":31,"open_issues":5,"watchers":157,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ayasdi/grapher/pulls/37"},"html":{"href":"https://github.com/ayasdi/grapher/pull/37"},"issue":{"href":"https://api.github.com/repos/ayasdi/grapher/issues/37"},"comments":{"href":"https://api.github.com/repos/ayasdi/grapher/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/ayasdi/grapher/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/ayasdi/grapher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ayasdi/grapher/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/ayasdi/grapher/statuses/c1e32d93fcd43d2962e6c2bb6bef942be0346183"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":49,"deletions":25,"changed_files":7}}
{"actor":{"display_login":"conorayasdi"}}