{"action":"created","comment":{"url":"https://api.github.com/repos/uber/luma.gl/pulls/comments/208444783","pull_request_review_id":144254790,"id":208444783,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODQ0NDc4Mw==","diff_hunk":"@@ -0,0 +1,176 @@\n+// Copyright (c) 2015 - 2018 Uber Technologies, Inc.\n+//\n+// Permission is hereby granted, free of charge, to any person obtaining a copy\n+// of this software and associated documentation files (the 'Software'), to deal\n+// in the Software without restriction, including without limitation the rights\n+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+// copies of the Software, and to permit persons to whom the Software is\n+// furnished to do so, subject to the following conditions:\n+//\n+// The above copyright notice and this permission notice shall be included in\n+// all copies or substantial portions of the Software.\n+//\n+// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+// THE SOFTWARE.\n+\n+import {Buffer, Transform, picking, registerShaderModules} from 'luma.gl';\n+import test from 'tape-catch';\n+import {fixture} from 'luma.gl/test/setup';\n+\n+// TODO: test WebGL1 when Transform class is ready\n+const gl = fixture.gl2;\n+\n+registerShaderModules([picking]);\n+\n+const isPickedTestData = {\n+  vertexColorData: new Float32Array([\n+    0, 0, 0,\n+    255, 100, 150,\n+    50, 50, 50,\n+    251, 103, 153, // is picked only when threshold is 5\n+    150, 100, 255,\n+    254.5, 100, 150, // is picked with default threshold (1)\n+    100, 150, 255,\n+    255, 255, 255,\n+    255, 100, 149.5 // // is picked with default threshold (1)\n+  ]),\n+  tests: [\n+    {\n+      pickingSelectedColor: null,\n+      isPicked: [0, 0, 0, 0, 0, 0, 0, 0, 0]\n+    },\n+    {\n+      pickingSelectedColor: [255, 255, 255],\n+      isPicked: [0, 0, 0, 0, 0, 0, 0, 1, 0]\n+    },\n+    {\n+      pickingSelectedColor: [255, 100, 150],\n+      isPicked: [0, 1, 0, 0, 0, 1, 0, 0, 1]\n+    },\n+    {\n+      pickingSelectedColor: [255, 100, 150],\n+      pickingThreshold: 5,\n+      isPicked: [0, 1, 0, 1, 0, 1, 0, 0, 1]\n+    }\n+  ]\n+};\n+\n+test('picking#isVertexPicked(pickingSelectedColor invalid)', t => {\n+  if (!Transform.isSupported(gl)) {\n+    t.comment('Transform not available, skipping tests');\n+    t.end();\n+    return;\n+  }\n+\n+  const VS = `\\\n+  attribute vec3 vertexColor;\n+  varying float isPicked;\n+\n+  void main()\n+  {\n+    isPicked = float(isVertexPicked(vertexColor));\n+  }\n+  `;\n+  const vertexColorData = isPickedTestData.vertexColorData;\n+\n+  const elementCount = vertexColorData.length / 3;\n+  const vertexColor = new Buffer(gl, {size: 3, data: vertexColorData});","path":"test/modules/core/shadertools/picking.spec.js","position":82,"original_position":82,"commit_id":"bca45b5f4f402777ba8cef5cfa6555cca6dfe0a9","original_commit_id":"bca45b5f4f402777ba8cef5cfa6555cca6dfe0a9","user":{"login":"1chandu","id":9502731,"node_id":"MDQ6VXNlcjk1MDI3MzE=","avatar_url":"https://avatars3.githubusercontent.com/u/9502731?v=4","gravatar_id":"","url":"https://api.github.com/users/1chandu","html_url":"https://github.com/1chandu","followers_url":"https://api.github.com/users/1chandu/followers","following_url":"https://api.github.com/users/1chandu/following{/other_user}","gists_url":"https://api.github.com/users/1chandu/gists{/gist_id}","starred_url":"https://api.github.com/users/1chandu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1chandu/subscriptions","organizations_url":"https://api.github.com/users/1chandu/orgs","repos_url":"https://api.github.com/users/1chandu/repos","events_url":"https://api.github.com/users/1chandu/events{/privacy}","received_events_url":"https://api.github.com/users/1chandu/received_events","type":"User","site_admin":false},"body":"> Q: Is this case run with GL.POINTS? Is that the default for Transform? If not there will be color interpolation.\r\n\r\nYeah, POINTS by default.","created_at":"2018-08-08T03:13:16Z","updated_at":"2018-08-08T03:13:16Z","html_url":"https://github.com/uber/luma.gl/pull/636#discussion_r208444783","pull_request_url":"https://api.github.com/repos/uber/luma.gl/pulls/636","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/uber/luma.gl/pulls/comments/208444783"},"html":{"href":"https://github.com/uber/luma.gl/pull/636#discussion_r208444783"},"pull_request":{"href":"https://api.github.com/repos/uber/luma.gl/pulls/636"}},"in_reply_to_id":208365357},"pull_request":{"url":"https://api.github.com/repos/uber/luma.gl/pulls/636","id":206206578,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MjA2NTc4","html_url":"https://github.com/uber/luma.gl/pull/636","diff_url":"https://github.com/uber/luma.gl/pull/636.diff","patch_url":"https://github.com/uber/luma.gl/pull/636.patch","issue_url":"https://api.github.com/repos/uber/luma.gl/issues/636","number":636,"state":"open","locked":false,"title":"picking shader module: Add Transform based unit tests","user":{"login":"1chandu","id":9502731,"node_id":"MDQ6VXNlcjk1MDI3MzE=","avatar_url":"https://avatars3.githubusercontent.com/u/9502731?v=4","gravatar_id":"","url":"https://api.github.com/users/1chandu","html_url":"https://github.com/1chandu","followers_url":"https://api.github.com/users/1chandu/followers","following_url":"https://api.github.com/users/1chandu/following{/other_user}","gists_url":"https://api.github.com/users/1chandu/gists{/gist_id}","starred_url":"https://api.github.com/users/1chandu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1chandu/subscriptions","organizations_url":"https://api.github.com/users/1chandu/orgs","repos_url":"https://api.github.com/users/1chandu/repos","events_url":"https://api.github.com/users/1chandu/events{/privacy}","received_events_url":"https://api.github.com/users/1chandu/received_events","type":"User","site_admin":false},"body":"<!-- For feature, feature enhancement or bug fix, create an issue first and finish To Do List there -->\r\n<!-- Anything doesn't work as expected is a bug, including code, doc and test -->\r\nFor #630 \r\n<!-- For other PRs without open issue -->\r\n#### Background\r\npicking shader module: Add Transform based unit tests\r\n<!-- For all the PRs -->\r\n#### Change List\r\n-  Add picking module unit tests\r\n","created_at":"2018-08-04T19:31:59Z","updated_at":"2018-08-08T03:13:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f008212b345cb6a98447e77e4b88eac4d82042bb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/uber/luma.gl/pulls/636/commits","review_comments_url":"https://api.github.com/repos/uber/luma.gl/pulls/636/comments","review_comment_url":"https://api.github.com/repos/uber/luma.gl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uber/luma.gl/issues/636/comments","statuses_url":"https://api.github.com/repos/uber/luma.gl/statuses/bca45b5f4f402777ba8cef5cfa6555cca6dfe0a9","head":{"label":"uber:pickingModuleTests","ref":"pickingModuleTests","sha":"bca45b5f4f402777ba8cef5cfa6555cca6dfe0a9","user":{"login":"uber","id":538264,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODI2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":50340928,"node_id":"MDEwOlJlcG9zaXRvcnk1MDM0MDkyOA==","name":"luma.gl","full_name":"uber/luma.gl","owner":{"login":"uber","id":538264,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODI2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/luma.gl","description":"WebGL2 Components for Data Visualization","fork":false,"url":"https://api.github.com/repos/uber/luma.gl","forks_url":"https://api.github.com/repos/uber/luma.gl/forks","keys_url":"https://api.github.com/repos/uber/luma.gl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/luma.gl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/luma.gl/teams","hooks_url":"https://api.github.com/repos/uber/luma.gl/hooks","issue_events_url":"https://api.github.com/repos/uber/luma.gl/issues/events{/number}","events_url":"https://api.github.com/repos/uber/luma.gl/events","assignees_url":"https://api.github.com/repos/uber/luma.gl/assignees{/user}","branches_url":"https://api.github.com/repos/uber/luma.gl/branches{/branch}","tags_url":"https://api.github.com/repos/uber/luma.gl/tags","blobs_url":"https://api.github.com/repos/uber/luma.gl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/luma.gl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/luma.gl/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/luma.gl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/luma.gl/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/luma.gl/languages","stargazers_url":"https://api.github.com/repos/uber/luma.gl/stargazers","contributors_url":"https://api.github.com/repos/uber/luma.gl/contributors","subscribers_url":"https://api.github.com/repos/uber/luma.gl/subscribers","subscription_url":"https://api.github.com/repos/uber/luma.gl/subscription","commits_url":"https://api.github.com/repos/uber/luma.gl/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/luma.gl/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/luma.gl/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/luma.gl/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/luma.gl/contents/{+path}","compare_url":"https://api.github.com/repos/uber/luma.gl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/luma.gl/merges","archive_url":"https://api.github.com/repos/uber/luma.gl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/luma.gl/downloads","issues_url":"https://api.github.com/repos/uber/luma.gl/issues{/number}","pulls_url":"https://api.github.com/repos/uber/luma.gl/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/luma.gl/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/luma.gl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/luma.gl/labels{/name}","releases_url":"https://api.github.com/repos/uber/luma.gl/releases{/id}","deployments_url":"https://api.github.com/repos/uber/luma.gl/deployments","created_at":"2016-01-25T09:41:59Z","updated_at":"2018-08-07T19:22:00Z","pushed_at":"2018-08-08T02:38:15Z","git_url":"git://github.com/uber/luma.gl.git","ssh_url":"git@github.com:uber/luma.gl.git","clone_url":"https://github.com/uber/luma.gl.git","svn_url":"https://github.com/uber/luma.gl","homepage":"http://uber.github.io/luma.gl/","size":105737,"stargazers_count":1105,"watchers_count":1105,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":37,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":97,"open_issues":37,"watchers":1105,"default_branch":"master"}},"base":{"label":"uber:master","ref":"master","sha":"173bc79fd42300480b06f93986f0dc10027aaede","user":{"login":"uber","id":538264,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODI2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"repo":{"id":50340928,"node_id":"MDEwOlJlcG9zaXRvcnk1MDM0MDkyOA==","name":"luma.gl","full_name":"uber/luma.gl","owner":{"login":"uber","id":538264,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzODI2NA==","avatar_url":"https://avatars3.githubusercontent.com/u/538264?v=4","gravatar_id":"","url":"https://api.github.com/users/uber","html_url":"https://github.com/uber","followers_url":"https://api.github.com/users/uber/followers","following_url":"https://api.github.com/users/uber/following{/other_user}","gists_url":"https://api.github.com/users/uber/gists{/gist_id}","starred_url":"https://api.github.com/users/uber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uber/subscriptions","organizations_url":"https://api.github.com/users/uber/orgs","repos_url":"https://api.github.com/users/uber/repos","events_url":"https://api.github.com/users/uber/events{/privacy}","received_events_url":"https://api.github.com/users/uber/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uber/luma.gl","description":"WebGL2 Components for Data Visualization","fork":false,"url":"https://api.github.com/repos/uber/luma.gl","forks_url":"https://api.github.com/repos/uber/luma.gl/forks","keys_url":"https://api.github.com/repos/uber/luma.gl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uber/luma.gl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uber/luma.gl/teams","hooks_url":"https://api.github.com/repos/uber/luma.gl/hooks","issue_events_url":"https://api.github.com/repos/uber/luma.gl/issues/events{/number}","events_url":"https://api.github.com/repos/uber/luma.gl/events","assignees_url":"https://api.github.com/repos/uber/luma.gl/assignees{/user}","branches_url":"https://api.github.com/repos/uber/luma.gl/branches{/branch}","tags_url":"https://api.github.com/repos/uber/luma.gl/tags","blobs_url":"https://api.github.com/repos/uber/luma.gl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uber/luma.gl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uber/luma.gl/git/refs{/sha}","trees_url":"https://api.github.com/repos/uber/luma.gl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uber/luma.gl/statuses/{sha}","languages_url":"https://api.github.com/repos/uber/luma.gl/languages","stargazers_url":"https://api.github.com/repos/uber/luma.gl/stargazers","contributors_url":"https://api.github.com/repos/uber/luma.gl/contributors","subscribers_url":"https://api.github.com/repos/uber/luma.gl/subscribers","subscription_url":"https://api.github.com/repos/uber/luma.gl/subscription","commits_url":"https://api.github.com/repos/uber/luma.gl/commits{/sha}","git_commits_url":"https://api.github.com/repos/uber/luma.gl/git/commits{/sha}","comments_url":"https://api.github.com/repos/uber/luma.gl/comments{/number}","issue_comment_url":"https://api.github.com/repos/uber/luma.gl/issues/comments{/number}","contents_url":"https://api.github.com/repos/uber/luma.gl/contents/{+path}","compare_url":"https://api.github.com/repos/uber/luma.gl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uber/luma.gl/merges","archive_url":"https://api.github.com/repos/uber/luma.gl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uber/luma.gl/downloads","issues_url":"https://api.github.com/repos/uber/luma.gl/issues{/number}","pulls_url":"https://api.github.com/repos/uber/luma.gl/pulls{/number}","milestones_url":"https://api.github.com/repos/uber/luma.gl/milestones{/number}","notifications_url":"https://api.github.com/repos/uber/luma.gl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uber/luma.gl/labels{/name}","releases_url":"https://api.github.com/repos/uber/luma.gl/releases{/id}","deployments_url":"https://api.github.com/repos/uber/luma.gl/deployments","created_at":"2016-01-25T09:41:59Z","updated_at":"2018-08-07T19:22:00Z","pushed_at":"2018-08-08T02:38:15Z","git_url":"git://github.com/uber/luma.gl.git","ssh_url":"git@github.com:uber/luma.gl.git","clone_url":"https://github.com/uber/luma.gl.git","svn_url":"https://github.com/uber/luma.gl","homepage":"http://uber.github.io/luma.gl/","size":105737,"stargazers_count":1105,"watchers_count":1105,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":37,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":97,"open_issues":37,"watchers":1105,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uber/luma.gl/pulls/636"},"html":{"href":"https://github.com/uber/luma.gl/pull/636"},"issue":{"href":"https://api.github.com/repos/uber/luma.gl/issues/636"},"comments":{"href":"https://api.github.com/repos/uber/luma.gl/issues/636/comments"},"review_comments":{"href":"https://api.github.com/repos/uber/luma.gl/pulls/636/comments"},"review_comment":{"href":"https://api.github.com/repos/uber/luma.gl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uber/luma.gl/pulls/636/commits"},"statuses":{"href":"https://api.github.com/repos/uber/luma.gl/statuses/bca45b5f4f402777ba8cef5cfa6555cca6dfe0a9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"1chandu"}}