{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/hubs/pulls/comments/235274610","pull_request_review_id":177102003,"id":235274610,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTI3NDYxMA==","diff_hunk":"@@ -0,0 +1,9 @@\n+AFRAME.registerComponent(\"teleport-controls-matrix-auto-update\", {","path":"src/components/teleport-controls-matrix-auto-update.js","position":1,"original_position":1,"commit_id":"510a6f0d785d5c9bc63f1c57fbb9d877ed311aab","original_commit_id":"510a6f0d785d5c9bc63f1c57fbb9d877ed311aab","user":{"login":"gfodor","id":220020,"node_id":"MDQ6VXNlcjIyMDAyMA==","avatar_url":"https://avatars3.githubusercontent.com/u/220020?v=4","gravatar_id":"","url":"https://api.github.com/users/gfodor","html_url":"https://github.com/gfodor","followers_url":"https://api.github.com/users/gfodor/followers","following_url":"https://api.github.com/users/gfodor/following{/other_user}","gists_url":"https://api.github.com/users/gfodor/gists{/gist_id}","starred_url":"https://api.github.com/users/gfodor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfodor/subscriptions","organizations_url":"https://api.github.com/users/gfodor/orgs","repos_url":"https://api.github.com/users/gfodor/repos","events_url":"https://api.github.com/users/gfodor/events{/privacy}","received_events_url":"https://api.github.com/users/gfodor/received_events","type":"User","site_admin":false},"body":"yeah this is pretty awful i agree. the current teleporter controls also is quite gnarly. it took me way too long to get this to work","created_at":"2018-11-21T07:21:00Z","updated_at":"2018-11-21T07:21:01Z","html_url":"https://github.com/mozilla/hubs/pull/753#discussion_r235274610","pull_request_url":"https://api.github.com/repos/mozilla/hubs/pulls/753","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla/hubs/pulls/comments/235274610"},"html":{"href":"https://github.com/mozilla/hubs/pull/753#discussion_r235274610"},"pull_request":{"href":"https://api.github.com/repos/mozilla/hubs/pulls/753"}},"in_reply_to_id":235225871},"pull_request":{"url":"https://api.github.com/repos/mozilla/hubs/pulls/753","id":232166649,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyMTY2NjQ5","html_url":"https://github.com/mozilla/hubs/pull/753","diff_url":"https://github.com/mozilla/hubs/pull/753.diff","patch_url":"https://github.com/mozilla/hubs/pull/753.patch","issue_url":"https://api.github.com/repos/mozilla/hubs/issues/753","number":753,"state":"open","locked":false,"title":"Fix up matrix updates","user":{"login":"gfodor","id":220020,"node_id":"MDQ6VXNlcjIyMDAyMA==","avatar_url":"https://avatars3.githubusercontent.com/u/220020?v=4","gravatar_id":"","url":"https://api.github.com/users/gfodor","html_url":"https://github.com/gfodor","followers_url":"https://api.github.com/users/gfodor/followers","following_url":"https://api.github.com/users/gfodor/following{/other_user}","gists_url":"https://api.github.com/users/gfodor/gists{/gist_id}","starred_url":"https://api.github.com/users/gfodor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfodor/subscriptions","organizations_url":"https://api.github.com/users/gfodor/orgs","repos_url":"https://api.github.com/users/gfodor/repos","events_url":"https://api.github.com/users/gfodor/events{/privacy}","received_events_url":"https://api.github.com/users/gfodor/received_events","type":"User","site_admin":false},"body":"This PR performs an internal overhaul and a few monkey patches to three.js to reduce the amount of matrix operations for local + world xforms in the steady state case by approx 80-90%.\r\n\r\n- Disable the automatic matrix update loop on the scene and takes it over via an A-Frame system called `world-update`\r\n\r\n- Turns off `matrixAutoUpdate` by default on all objects, and adds the `matrix-auto-update` component which can be added piecemeal to entities to turn it back on. Also turns it on for imported GLTF nodes that have animations.\r\n\r\n- Introduces the `matrixNeedsUpdate` flag which will cause the local and world matrix to be updated on that object at the end of the frame.\r\n\r\n- Adds `Object3D.updateMatrices` which will update the local and world matrix on an object and (optionally) all of its parents. (doing the parents first, so the final world matrices will be correct.) This should generally be what you call instead of `updateMatrixWorld(true)` if you want to forcibly update the world matrix.\r\n\r\n- Updates `getWorldPosition`, etc. to no longer use `updateMatrixWorld` but now instead use `updateMatrices`\r\n\r\n- Adds helper functions to get world space position/rotation/scale without performing a world matrix update.\r\n\r\n- Re-implements `updateMatrixWorld` with two major optimizations. First, non-visible objects will no longer have their local nor world matrices updated (nor their children.) Second, objects which never have their local matrices changed from the identity matrix end up just copying by reference the world matrix from the parent during the world matrix update. (This is extremely common in A-Frame)\r\n\r\n- Fixes one or two weird bugs in the GLTF loader that seemed to be paved over when we were updating matrices every frame.\r\n\r\nThe net result of whitelisting auto matrix updates, avoiding non-visible updates, and skipping world matrix updates for identity matrices results in a test scene with 5 ducks dropping from 384 local matrix updates and 388 world matrix updates to 18 and 38 respectively.\r\n","created_at":"2018-11-20T01:44:57Z","updated_at":"2018-11-21T07:21:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90126a7bcc0edd57f5325ffc738978f3c39ac85f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mquander","id":428637,"node_id":"MDQ6VXNlcjQyODYzNw==","avatar_url":"https://avatars2.githubusercontent.com/u/428637?v=4","gravatar_id":"","url":"https://api.github.com/users/mquander","html_url":"https://github.com/mquander","followers_url":"https://api.github.com/users/mquander/followers","following_url":"https://api.github.com/users/mquander/following{/other_user}","gists_url":"https://api.github.com/users/mquander/gists{/gist_id}","starred_url":"https://api.github.com/users/mquander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mquander/subscriptions","organizations_url":"https://api.github.com/users/mquander/orgs","repos_url":"https://api.github.com/users/mquander/repos","events_url":"https://api.github.com/users/mquander/events{/privacy}","received_events_url":"https://api.github.com/users/mquander/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/hubs/pulls/753/commits","review_comments_url":"https://api.github.com/repos/mozilla/hubs/pulls/753/comments","review_comment_url":"https://api.github.com/repos/mozilla/hubs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/hubs/issues/753/comments","statuses_url":"https://api.github.com/repos/mozilla/hubs/statuses/510a6f0d785d5c9bc63f1c57fbb9d877ed311aab","head":{"label":"mozilla:update-matrix-world-patch","ref":"update-matrix-world-patch","sha":"510a6f0d785d5c9bc63f1c57fbb9d877ed311aab","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":104933644,"node_id":"MDEwOlJlcG9zaXRvcnkxMDQ5MzM2NDQ=","name":"hubs","full_name":"mozilla/hubs","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/hubs","description":"Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.","fork":false,"url":"https://api.github.com/repos/mozilla/hubs","forks_url":"https://api.github.com/repos/mozilla/hubs/forks","keys_url":"https://api.github.com/repos/mozilla/hubs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/hubs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/hubs/teams","hooks_url":"https://api.github.com/repos/mozilla/hubs/hooks","issue_events_url":"https://api.github.com/repos/mozilla/hubs/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/hubs/events","assignees_url":"https://api.github.com/repos/mozilla/hubs/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/hubs/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/hubs/tags","blobs_url":"https://api.github.com/repos/mozilla/hubs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/hubs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/hubs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/hubs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/hubs/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/hubs/languages","stargazers_url":"https://api.github.com/repos/mozilla/hubs/stargazers","contributors_url":"https://api.github.com/repos/mozilla/hubs/contributors","subscribers_url":"https://api.github.com/repos/mozilla/hubs/subscribers","subscription_url":"https://api.github.com/repos/mozilla/hubs/subscription","commits_url":"https://api.github.com/repos/mozilla/hubs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/hubs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/hubs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/hubs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/hubs/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/hubs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/hubs/merges","archive_url":"https://api.github.com/repos/mozilla/hubs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/hubs/downloads","issues_url":"https://api.github.com/repos/mozilla/hubs/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/hubs/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/hubs/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/hubs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/hubs/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/hubs/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/hubs/deployments","created_at":"2017-09-26T20:20:12Z","updated_at":"2018-11-20T00:29:11Z","pushed_at":"2018-11-21T01:38:55Z","git_url":"git://github.com/mozilla/hubs.git","ssh_url":"git@github.com:mozilla/hubs.git","clone_url":"https://github.com/mozilla/hubs.git","svn_url":"https://github.com/mozilla/hubs","homepage":"https://hubs.mozilla.com","size":98534,"stargazers_count":158,"watchers_count":158,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":111,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":33,"open_issues":111,"watchers":158,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"d3da981531cdf8e702d4ceca73e0241233c2f4e4","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":104933644,"node_id":"MDEwOlJlcG9zaXRvcnkxMDQ5MzM2NDQ=","name":"hubs","full_name":"mozilla/hubs","private":false,"owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mozilla/hubs","description":"Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.","fork":false,"url":"https://api.github.com/repos/mozilla/hubs","forks_url":"https://api.github.com/repos/mozilla/hubs/forks","keys_url":"https://api.github.com/repos/mozilla/hubs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/hubs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/hubs/teams","hooks_url":"https://api.github.com/repos/mozilla/hubs/hooks","issue_events_url":"https://api.github.com/repos/mozilla/hubs/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/hubs/events","assignees_url":"https://api.github.com/repos/mozilla/hubs/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/hubs/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/hubs/tags","blobs_url":"https://api.github.com/repos/mozilla/hubs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/hubs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/hubs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/hubs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/hubs/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/hubs/languages","stargazers_url":"https://api.github.com/repos/mozilla/hubs/stargazers","contributors_url":"https://api.github.com/repos/mozilla/hubs/contributors","subscribers_url":"https://api.github.com/repos/mozilla/hubs/subscribers","subscription_url":"https://api.github.com/repos/mozilla/hubs/subscription","commits_url":"https://api.github.com/repos/mozilla/hubs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/hubs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/hubs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/hubs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/hubs/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/hubs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/hubs/merges","archive_url":"https://api.github.com/repos/mozilla/hubs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/hubs/downloads","issues_url":"https://api.github.com/repos/mozilla/hubs/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/hubs/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/hubs/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/hubs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/hubs/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/hubs/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/hubs/deployments","created_at":"2017-09-26T20:20:12Z","updated_at":"2018-11-20T00:29:11Z","pushed_at":"2018-11-21T01:38:55Z","git_url":"git://github.com/mozilla/hubs.git","ssh_url":"git@github.com:mozilla/hubs.git","clone_url":"https://github.com/mozilla/hubs.git","svn_url":"https://github.com/mozilla/hubs","homepage":"https://hubs.mozilla.com","size":98534,"stargazers_count":158,"watchers_count":158,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"archived":false,"open_issues_count":111,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":33,"open_issues":111,"watchers":158,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/hubs/pulls/753"},"html":{"href":"https://github.com/mozilla/hubs/pull/753"},"issue":{"href":"https://api.github.com/repos/mozilla/hubs/issues/753"},"comments":{"href":"https://api.github.com/repos/mozilla/hubs/issues/753/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/hubs/pulls/753/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/hubs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/hubs/pulls/753/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/hubs/statuses/510a6f0d785d5c9bc63f1c57fbb9d877ed311aab"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"gfodor"}}