{"action":"created","comment":{"url":"https://api.github.com/repos/processing/p5.js/pulls/comments/176592065","pull_request_review_id":106325479,"id":176592065,"diff_hunk":"@@ -88,19 +71,13 @@ p5.RendererGL.prototype.vertex = function(x, y) {\n     u = arguments[3];\n     v = arguments[4];\n   }\n-  var vert = new p5.Vector(x, y, z);\n-  this.immediateMode.vertices.push(vert);\n-  var vertexColor = this.curFillColor || [0.5, 0.5, 0.5, 1.0];\n-  this.immediateMode.vertexColors.push(\n-    vertexColor[0],\n-    vertexColor[1],\n-    vertexColor[2],\n-    vertexColor[3]\n-  );\n-\n-  this.immediateMode.uvCoords.push(u, v);\n \n-  return this;\n+  var im = this.immediateMode;\n+  var push = Array.prototype.push;\n+  im.vertices.push(new p5.Vector(x, y, z));\n+  push.apply(im.vertexColors, this._diffuseColor);\n+  push.apply(im.vertexAmbients, this._ambientColor);","path":"src/webgl/p5.RendererGL.Immediate.js","position":63,"original_position":63,"commit_id":"9eec657d2f4209fe41bc542ed851b1e8cdd4f6db","original_commit_id":"9eec657d2f4209fe41bc542ed851b1e8cdd4f6db","user":{"login":"kjhollen","id":78966,"avatar_url":"https://avatars0.githubusercontent.com/u/78966?v=4","gravatar_id":"","url":"https://api.github.com/users/kjhollen","html_url":"https://github.com/kjhollen","followers_url":"https://api.github.com/users/kjhollen/followers","following_url":"https://api.github.com/users/kjhollen/following{/other_user}","gists_url":"https://api.github.com/users/kjhollen/gists{/gist_id}","starred_url":"https://api.github.com/users/kjhollen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjhollen/subscriptions","organizations_url":"https://api.github.com/users/kjhollen/orgs","repos_url":"https://api.github.com/users/kjhollen/repos","events_url":"https://api.github.com/users/kjhollen/events{/privacy}","received_events_url":"https://api.github.com/users/kjhollen/received_events","type":"User","site_admin":false},"body":"I understand what the code does, but I don't understand why the method isn't invoked the same way for all 4 cases. It's a strange thing to encounter side-by-side; a note about the optimization and why it's only needed in half of the cases would be helpful.","created_at":"2018-03-22T22:33:06Z","updated_at":"2018-03-22T22:33:06Z","html_url":"https://github.com/processing/p5.js/pull/2670#discussion_r176592065","pull_request_url":"https://api.github.com/repos/processing/p5.js/pulls/2670","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/processing/p5.js/pulls/comments/176592065"},"html":{"href":"https://github.com/processing/p5.js/pull/2670#discussion_r176592065"},"pull_request":{"href":"https://api.github.com/repos/processing/p5.js/pulls/2670"}},"in_reply_to_id":176532654},"pull_request":{"url":"https://api.github.com/repos/processing/p5.js/pulls/2670","id":171576609,"html_url":"https://github.com/processing/p5.js/pull/2670","diff_url":"https://github.com/processing/p5.js/pull/2670.diff","patch_url":"https://github.com/processing/p5.js/pull/2670.patch","issue_url":"https://api.github.com/repos/processing/p5.js/issues/2670","number":2670,"state":"open","locked":false,"title":"Render pipeline changes","user":{"login":"Spongman","id":1088194,"avatar_url":"https://avatars2.githubusercontent.com/u/1088194?v=4","gravatar_id":"","url":"https://api.github.com/users/Spongman","html_url":"https://github.com/Spongman","followers_url":"https://api.github.com/users/Spongman/followers","following_url":"https://api.github.com/users/Spongman/following{/other_user}","gists_url":"https://api.github.com/users/Spongman/gists{/gist_id}","starred_url":"https://api.github.com/users/Spongman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spongman/subscriptions","organizations_url":"https://api.github.com/users/Spongman/orgs","repos_url":"https://api.github.com/users/Spongman/repos","events_url":"https://api.github.com/users/Spongman/events{/privacy}","received_events_url":"https://api.github.com/users/Spongman/received_events","type":"User","site_admin":false},"body":"ok, this is essentially the same PR that I submitted before (#2547), but with the thunk code removed.\r\n\r\nit is rebased on top of https://github.com/processing/p5.js/pull/2587 since that is required to support the extended 3d state that is pushed.","created_at":"2018-02-27T06:44:51Z","updated_at":"2018-03-22T22:33:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4dcd45c70155c46c3981242f3f3672bf71457b3a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/processing/p5.js/pulls/2670/commits","review_comments_url":"https://api.github.com/repos/processing/p5.js/pulls/2670/comments","review_comment_url":"https://api.github.com/repos/processing/p5.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/processing/p5.js/issues/2670/comments","statuses_url":"https://api.github.com/repos/processing/p5.js/statuses/9eec657d2f4209fe41bc542ed851b1e8cdd4f6db","head":{"label":"Spongman:render-pipeline","ref":"render-pipeline","sha":"9eec657d2f4209fe41bc542ed851b1e8cdd4f6db","user":{"login":"Spongman","id":1088194,"avatar_url":"https://avatars2.githubusercontent.com/u/1088194?v=4","gravatar_id":"","url":"https://api.github.com/users/Spongman","html_url":"https://github.com/Spongman","followers_url":"https://api.github.com/users/Spongman/followers","following_url":"https://api.github.com/users/Spongman/following{/other_user}","gists_url":"https://api.github.com/users/Spongman/gists{/gist_id}","starred_url":"https://api.github.com/users/Spongman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spongman/subscriptions","organizations_url":"https://api.github.com/users/Spongman/orgs","repos_url":"https://api.github.com/users/Spongman/repos","events_url":"https://api.github.com/users/Spongman/events{/privacy}","received_events_url":"https://api.github.com/users/Spongman/received_events","type":"User","site_admin":false},"repo":{"id":95416718,"name":"p5.js","full_name":"Spongman/p5.js","owner":{"login":"Spongman","id":1088194,"avatar_url":"https://avatars2.githubusercontent.com/u/1088194?v=4","gravatar_id":"","url":"https://api.github.com/users/Spongman","html_url":"https://github.com/Spongman","followers_url":"https://api.github.com/users/Spongman/followers","following_url":"https://api.github.com/users/Spongman/following{/other_user}","gists_url":"https://api.github.com/users/Spongman/gists{/gist_id}","starred_url":"https://api.github.com/users/Spongman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Spongman/subscriptions","organizations_url":"https://api.github.com/users/Spongman/orgs","repos_url":"https://api.github.com/users/Spongman/repos","events_url":"https://api.github.com/users/Spongman/events{/privacy}","received_events_url":"https://api.github.com/users/Spongman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Spongman/p5.js","description":"p5.js is a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing. http://twitter.com/p5xjs —","fork":true,"url":"https://api.github.com/repos/Spongman/p5.js","forks_url":"https://api.github.com/repos/Spongman/p5.js/forks","keys_url":"https://api.github.com/repos/Spongman/p5.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Spongman/p5.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Spongman/p5.js/teams","hooks_url":"https://api.github.com/repos/Spongman/p5.js/hooks","issue_events_url":"https://api.github.com/repos/Spongman/p5.js/issues/events{/number}","events_url":"https://api.github.com/repos/Spongman/p5.js/events","assignees_url":"https://api.github.com/repos/Spongman/p5.js/assignees{/user}","branches_url":"https://api.github.com/repos/Spongman/p5.js/branches{/branch}","tags_url":"https://api.github.com/repos/Spongman/p5.js/tags","blobs_url":"https://api.github.com/repos/Spongman/p5.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Spongman/p5.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Spongman/p5.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Spongman/p5.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Spongman/p5.js/statuses/{sha}","languages_url":"https://api.github.com/repos/Spongman/p5.js/languages","stargazers_url":"https://api.github.com/repos/Spongman/p5.js/stargazers","contributors_url":"https://api.github.com/repos/Spongman/p5.js/contributors","subscribers_url":"https://api.github.com/repos/Spongman/p5.js/subscribers","subscription_url":"https://api.github.com/repos/Spongman/p5.js/subscription","commits_url":"https://api.github.com/repos/Spongman/p5.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Spongman/p5.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Spongman/p5.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Spongman/p5.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Spongman/p5.js/contents/{+path}","compare_url":"https://api.github.com/repos/Spongman/p5.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Spongman/p5.js/merges","archive_url":"https://api.github.com/repos/Spongman/p5.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Spongman/p5.js/downloads","issues_url":"https://api.github.com/repos/Spongman/p5.js/issues{/number}","pulls_url":"https://api.github.com/repos/Spongman/p5.js/pulls{/number}","milestones_url":"https://api.github.com/repos/Spongman/p5.js/milestones{/number}","notifications_url":"https://api.github.com/repos/Spongman/p5.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Spongman/p5.js/labels{/name}","releases_url":"https://api.github.com/repos/Spongman/p5.js/releases{/id}","deployments_url":"https://api.github.com/repos/Spongman/p5.js/deployments","created_at":"2017-06-26T06:45:27Z","updated_at":"2018-03-19T17:59:45Z","pushed_at":"2018-03-22T07:21:33Z","git_url":"git://github.com/Spongman/p5.js.git","ssh_url":"git@github.com:Spongman/p5.js.git","clone_url":"https://github.com/Spongman/p5.js.git","svn_url":"https://github.com/Spongman/p5.js","homepage":"http://p5js.org/","size":65827,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"processing:master","ref":"master","sha":"4c2f42b67aebdb89ca307e37840b329bd3413f46","user":{"login":"processing","id":1617169,"avatar_url":"https://avatars2.githubusercontent.com/u/1617169?v=4","gravatar_id":"","url":"https://api.github.com/users/processing","html_url":"https://github.com/processing","followers_url":"https://api.github.com/users/processing/followers","following_url":"https://api.github.com/users/processing/following{/other_user}","gists_url":"https://api.github.com/users/processing/gists{/gist_id}","starred_url":"https://api.github.com/users/processing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/processing/subscriptions","organizations_url":"https://api.github.com/users/processing/orgs","repos_url":"https://api.github.com/users/processing/repos","events_url":"https://api.github.com/users/processing/events{/privacy}","received_events_url":"https://api.github.com/users/processing/received_events","type":"Organization","site_admin":false},"repo":{"id":8424040,"name":"p5.js","full_name":"processing/p5.js","owner":{"login":"processing","id":1617169,"avatar_url":"https://avatars2.githubusercontent.com/u/1617169?v=4","gravatar_id":"","url":"https://api.github.com/users/processing","html_url":"https://github.com/processing","followers_url":"https://api.github.com/users/processing/followers","following_url":"https://api.github.com/users/processing/following{/other_user}","gists_url":"https://api.github.com/users/processing/gists{/gist_id}","starred_url":"https://api.github.com/users/processing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/processing/subscriptions","organizations_url":"https://api.github.com/users/processing/orgs","repos_url":"https://api.github.com/users/processing/repos","events_url":"https://api.github.com/users/processing/events{/privacy}","received_events_url":"https://api.github.com/users/processing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/processing/p5.js","description":"p5.js is a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing. http://twitter.com/p5xjs —","fork":false,"url":"https://api.github.com/repos/processing/p5.js","forks_url":"https://api.github.com/repos/processing/p5.js/forks","keys_url":"https://api.github.com/repos/processing/p5.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/processing/p5.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/processing/p5.js/teams","hooks_url":"https://api.github.com/repos/processing/p5.js/hooks","issue_events_url":"https://api.github.com/repos/processing/p5.js/issues/events{/number}","events_url":"https://api.github.com/repos/processing/p5.js/events","assignees_url":"https://api.github.com/repos/processing/p5.js/assignees{/user}","branches_url":"https://api.github.com/repos/processing/p5.js/branches{/branch}","tags_url":"https://api.github.com/repos/processing/p5.js/tags","blobs_url":"https://api.github.com/repos/processing/p5.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/processing/p5.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/processing/p5.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/processing/p5.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/processing/p5.js/statuses/{sha}","languages_url":"https://api.github.com/repos/processing/p5.js/languages","stargazers_url":"https://api.github.com/repos/processing/p5.js/stargazers","contributors_url":"https://api.github.com/repos/processing/p5.js/contributors","subscribers_url":"https://api.github.com/repos/processing/p5.js/subscribers","subscription_url":"https://api.github.com/repos/processing/p5.js/subscription","commits_url":"https://api.github.com/repos/processing/p5.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/processing/p5.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/processing/p5.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/processing/p5.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/processing/p5.js/contents/{+path}","compare_url":"https://api.github.com/repos/processing/p5.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/processing/p5.js/merges","archive_url":"https://api.github.com/repos/processing/p5.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/processing/p5.js/downloads","issues_url":"https://api.github.com/repos/processing/p5.js/issues{/number}","pulls_url":"https://api.github.com/repos/processing/p5.js/pulls{/number}","milestones_url":"https://api.github.com/repos/processing/p5.js/milestones{/number}","notifications_url":"https://api.github.com/repos/processing/p5.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/processing/p5.js/labels{/name}","releases_url":"https://api.github.com/repos/processing/p5.js/releases{/id}","deployments_url":"https://api.github.com/repos/processing/p5.js/deployments","created_at":"2013-02-26T03:14:47Z","updated_at":"2018-03-22T21:55:03Z","pushed_at":"2018-03-22T07:21:37Z","git_url":"git://github.com/processing/p5.js.git","ssh_url":"git@github.com:processing/p5.js.git","clone_url":"https://github.com/processing/p5.js.git","svn_url":"https://github.com/processing/p5.js","homepage":"http://p5js.org/","size":65594,"stargazers_count":7675,"watchers_count":7675,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1139,"mirror_url":null,"archived":false,"open_issues_count":102,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":1139,"open_issues":102,"watchers":7675,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/processing/p5.js/pulls/2670"},"html":{"href":"https://github.com/processing/p5.js/pull/2670"},"issue":{"href":"https://api.github.com/repos/processing/p5.js/issues/2670"},"comments":{"href":"https://api.github.com/repos/processing/p5.js/issues/2670/comments"},"review_comments":{"href":"https://api.github.com/repos/processing/p5.js/pulls/2670/comments"},"review_comment":{"href":"https://api.github.com/repos/processing/p5.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/processing/p5.js/pulls/2670/commits"},"statuses":{"href":"https://api.github.com/repos/processing/p5.js/statuses/9eec657d2f4209fe41bc542ed851b1e8cdd4f6db"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kjhollen"}}