{"action":"created","comment":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/comments/196674243","pull_request_review_id":130269893,"id":196674243,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjY3NDI0Mw==","diff_hunk":"@@ -181,9 +181,15 @@ THREE.GLTFLoader = ( function () {\n \t\t\t\t\tanimations: animations,\n \t\t\t\t\tasset: json.asset,\n \t\t\t\t\tparser: parser,\n-\t\t\t\t\tuserData: {}\n+\t\t\t\t\tuserData: undefined\n \t\t\t\t};\n \n+\t\t\t\t// Though glTF spec allows 'extras' to be anything, allowing primitives\n+\t\t\t\t// would break addUnknownExtensionsToUserData\n+\t\t\t\tglTF.userData = ( typeof json.extras === \"object\" )\n+\t\t\t\t\t? json.extras\n+\t\t\t\t\t: {};\n+","path":"examples/js/loaders/GLTFLoader.js","position":13,"original_position":13,"commit_id":"eaf001abee84652c6169f6f0c982fe89505d93ab","original_commit_id":"eaf001abee84652c6169f6f0c982fe89505d93ab","user":{"login":"takahirox","id":7637832,"node_id":"MDQ6VXNlcjc2Mzc4MzI=","avatar_url":"https://avatars2.githubusercontent.com/u/7637832?v=4","gravatar_id":"","url":"https://api.github.com/users/takahirox","html_url":"https://github.com/takahirox","followers_url":"https://api.github.com/users/takahirox/followers","following_url":"https://api.github.com/users/takahirox/following{/other_user}","gists_url":"https://api.github.com/users/takahirox/gists{/gist_id}","starred_url":"https://api.github.com/users/takahirox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takahirox/subscriptions","organizations_url":"https://api.github.com/users/takahirox/orgs","repos_url":"https://api.github.com/users/takahirox/repos","events_url":"https://api.github.com/users/takahirox/events{/privacy}","received_events_url":"https://api.github.com/users/takahirox/received_events","type":"User","site_admin":false},"body":"About handling primitive type `.extras`, it isn't top level `gltf.extras` specific issue but all `*.extras` like `material.extras` and `mesh.extras`.\r\n\r\nSo I think it'd be better to make common function like \r\n\r\n    function assignUserData( object, extras ) {\r\n\r\n        if ( extras === undefined ) return;\r\n\r\n        if ( typeof extras === 'object ) {\r\n\r\n            object.userData = extras;\r\n\r\n        } else {\r\n\r\n            object.userData = { value: extras };\r\n\r\n        }\r\n\r\n    }\r\n\r\nBut just in case I wanna make sure `any` type can be primitive type. Let's ask glTF team first and solve this issue in another PR because probably we need a bit discussion.","created_at":"2018-06-20T07:34:40Z","updated_at":"2018-06-20T07:34:41Z","html_url":"https://github.com/mrdoob/three.js/pull/14315#discussion_r196674243","pull_request_url":"https://api.github.com/repos/mrdoob/three.js/pulls/14315","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/comments/196674243"},"html":{"href":"https://github.com/mrdoob/three.js/pull/14315#discussion_r196674243"},"pull_request":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/14315"}},"in_reply_to_id":196554670},"pull_request":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/14315","id":195446966,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NDQ2OTY2","html_url":"https://github.com/mrdoob/three.js/pull/14315","diff_url":"https://github.com/mrdoob/three.js/pull/14315.diff","patch_url":"https://github.com/mrdoob/three.js/pull/14315.patch","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/14315","number":14315,"state":"open","locked":false,"title":"Save glTF root object 'extras'","user":{"login":"wlinna","id":1473454,"node_id":"MDQ6VXNlcjE0NzM0NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1473454?v=4","gravatar_id":"","url":"https://api.github.com/users/wlinna","html_url":"https://github.com/wlinna","followers_url":"https://api.github.com/users/wlinna/followers","following_url":"https://api.github.com/users/wlinna/following{/other_user}","gists_url":"https://api.github.com/users/wlinna/gists{/gist_id}","starred_url":"https://api.github.com/users/wlinna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlinna/subscriptions","organizations_url":"https://api.github.com/users/wlinna/orgs","repos_url":"https://api.github.com/users/wlinna/repos","events_url":"https://api.github.com/users/wlinna/events{/privacy}","received_events_url":"https://api.github.com/users/wlinna/received_events","type":"User","site_admin":false},"body":"Fixes #14294 \r\n\r\nI tested this by trying models with and without `extras ` on threejs editor.","created_at":"2018-06-18T07:59:25Z","updated_at":"2018-06-20T07:34:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cfdeb54ecda037f99cd9ba138a3c2275bb75c58","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/mrdoob/three.js/milestones/8","html_url":"https://github.com/mrdoob/three.js/milestone/8","labels_url":"https://api.github.com/repos/mrdoob/three.js/milestones/8/labels","id":3394281,"node_id":"MDk6TWlsZXN0b25lMzM5NDI4MQ==","number":8,"title":"r95","description":"","creator":{"login":"mrdoob","id":97088,"node_id":"MDQ6VXNlcjk3MDg4","avatar_url":"https://avatars0.githubusercontent.com/u/97088?v=4","gravatar_id":"","url":"https://api.github.com/users/mrdoob","html_url":"https://github.com/mrdoob","followers_url":"https://api.github.com/users/mrdoob/followers","following_url":"https://api.github.com/users/mrdoob/following{/other_user}","gists_url":"https://api.github.com/users/mrdoob/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdoob/subscriptions","organizations_url":"https://api.github.com/users/mrdoob/orgs","repos_url":"https://api.github.com/users/mrdoob/repos","events_url":"https://api.github.com/users/mrdoob/events{/privacy}","received_events_url":"https://api.github.com/users/mrdoob/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":1,"state":"open","created_at":"2018-06-01T19:59:49Z","updated_at":"2018-06-20T07:01:35Z","due_on":"2018-07-11T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mrdoob/three.js/pulls/14315/commits","review_comments_url":"https://api.github.com/repos/mrdoob/three.js/pulls/14315/comments","review_comment_url":"https://api.github.com/repos/mrdoob/three.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/14315/comments","statuses_url":"https://api.github.com/repos/mrdoob/three.js/statuses/eaf001abee84652c6169f6f0c982fe89505d93ab","head":{"label":"wlinna:save-gltf-root-extras","ref":"save-gltf-root-extras","sha":"eaf001abee84652c6169f6f0c982fe89505d93ab","user":{"login":"wlinna","id":1473454,"node_id":"MDQ6VXNlcjE0NzM0NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1473454?v=4","gravatar_id":"","url":"https://api.github.com/users/wlinna","html_url":"https://github.com/wlinna","followers_url":"https://api.github.com/users/wlinna/followers","following_url":"https://api.github.com/users/wlinna/following{/other_user}","gists_url":"https://api.github.com/users/wlinna/gists{/gist_id}","starred_url":"https://api.github.com/users/wlinna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlinna/subscriptions","organizations_url":"https://api.github.com/users/wlinna/orgs","repos_url":"https://api.github.com/users/wlinna/repos","events_url":"https://api.github.com/users/wlinna/events{/privacy}","received_events_url":"https://api.github.com/users/wlinna/received_events","type":"User","site_admin":false},"repo":{"id":137717712,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc3MTc3MTI=","name":"three.js","full_name":"wlinna/three.js","owner":{"login":"wlinna","id":1473454,"node_id":"MDQ6VXNlcjE0NzM0NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/1473454?v=4","gravatar_id":"","url":"https://api.github.com/users/wlinna","html_url":"https://github.com/wlinna","followers_url":"https://api.github.com/users/wlinna/followers","following_url":"https://api.github.com/users/wlinna/following{/other_user}","gists_url":"https://api.github.com/users/wlinna/gists{/gist_id}","starred_url":"https://api.github.com/users/wlinna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wlinna/subscriptions","organizations_url":"https://api.github.com/users/wlinna/orgs","repos_url":"https://api.github.com/users/wlinna/repos","events_url":"https://api.github.com/users/wlinna/events{/privacy}","received_events_url":"https://api.github.com/users/wlinna/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wlinna/three.js","description":"JavaScript 3D library.","fork":true,"url":"https://api.github.com/repos/wlinna/three.js","forks_url":"https://api.github.com/repos/wlinna/three.js/forks","keys_url":"https://api.github.com/repos/wlinna/three.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wlinna/three.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wlinna/three.js/teams","hooks_url":"https://api.github.com/repos/wlinna/three.js/hooks","issue_events_url":"https://api.github.com/repos/wlinna/three.js/issues/events{/number}","events_url":"https://api.github.com/repos/wlinna/three.js/events","assignees_url":"https://api.github.com/repos/wlinna/three.js/assignees{/user}","branches_url":"https://api.github.com/repos/wlinna/three.js/branches{/branch}","tags_url":"https://api.github.com/repos/wlinna/three.js/tags","blobs_url":"https://api.github.com/repos/wlinna/three.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wlinna/three.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wlinna/three.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/wlinna/three.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wlinna/three.js/statuses/{sha}","languages_url":"https://api.github.com/repos/wlinna/three.js/languages","stargazers_url":"https://api.github.com/repos/wlinna/three.js/stargazers","contributors_url":"https://api.github.com/repos/wlinna/three.js/contributors","subscribers_url":"https://api.github.com/repos/wlinna/three.js/subscribers","subscription_url":"https://api.github.com/repos/wlinna/three.js/subscription","commits_url":"https://api.github.com/repos/wlinna/three.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/wlinna/three.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/wlinna/three.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/wlinna/three.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/wlinna/three.js/contents/{+path}","compare_url":"https://api.github.com/repos/wlinna/three.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wlinna/three.js/merges","archive_url":"https://api.github.com/repos/wlinna/three.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wlinna/three.js/downloads","issues_url":"https://api.github.com/repos/wlinna/three.js/issues{/number}","pulls_url":"https://api.github.com/repos/wlinna/three.js/pulls{/number}","milestones_url":"https://api.github.com/repos/wlinna/three.js/milestones{/number}","notifications_url":"https://api.github.com/repos/wlinna/three.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wlinna/three.js/labels{/name}","releases_url":"https://api.github.com/repos/wlinna/three.js/releases{/id}","deployments_url":"https://api.github.com/repos/wlinna/three.js/deployments","created_at":"2018-06-18T06:36:46Z","updated_at":"2018-06-18T07:50:31Z","pushed_at":"2018-06-18T07:52:23Z","git_url":"git://github.com/wlinna/three.js.git","ssh_url":"git@github.com:wlinna/three.js.git","clone_url":"https://github.com/wlinna/three.js.git","svn_url":"https://github.com/wlinna/three.js","homepage":"https://threejs.org/","size":642212,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"mrdoob:dev","ref":"dev","sha":"531b1b3277fabf3b27bb99e3d375682d421327d1","user":{"login":"mrdoob","id":97088,"node_id":"MDQ6VXNlcjk3MDg4","avatar_url":"https://avatars0.githubusercontent.com/u/97088?v=4","gravatar_id":"","url":"https://api.github.com/users/mrdoob","html_url":"https://github.com/mrdoob","followers_url":"https://api.github.com/users/mrdoob/followers","following_url":"https://api.github.com/users/mrdoob/following{/other_user}","gists_url":"https://api.github.com/users/mrdoob/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdoob/subscriptions","organizations_url":"https://api.github.com/users/mrdoob/orgs","repos_url":"https://api.github.com/users/mrdoob/repos","events_url":"https://api.github.com/users/mrdoob/events{/privacy}","received_events_url":"https://api.github.com/users/mrdoob/received_events","type":"User","site_admin":false},"repo":{"id":576201,"node_id":"MDEwOlJlcG9zaXRvcnk1NzYyMDE=","name":"three.js","full_name":"mrdoob/three.js","owner":{"login":"mrdoob","id":97088,"node_id":"MDQ6VXNlcjk3MDg4","avatar_url":"https://avatars0.githubusercontent.com/u/97088?v=4","gravatar_id":"","url":"https://api.github.com/users/mrdoob","html_url":"https://github.com/mrdoob","followers_url":"https://api.github.com/users/mrdoob/followers","following_url":"https://api.github.com/users/mrdoob/following{/other_user}","gists_url":"https://api.github.com/users/mrdoob/gists{/gist_id}","starred_url":"https://api.github.com/users/mrdoob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrdoob/subscriptions","organizations_url":"https://api.github.com/users/mrdoob/orgs","repos_url":"https://api.github.com/users/mrdoob/repos","events_url":"https://api.github.com/users/mrdoob/events{/privacy}","received_events_url":"https://api.github.com/users/mrdoob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrdoob/three.js","description":"JavaScript 3D library.","fork":false,"url":"https://api.github.com/repos/mrdoob/three.js","forks_url":"https://api.github.com/repos/mrdoob/three.js/forks","keys_url":"https://api.github.com/repos/mrdoob/three.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrdoob/three.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrdoob/three.js/teams","hooks_url":"https://api.github.com/repos/mrdoob/three.js/hooks","issue_events_url":"https://api.github.com/repos/mrdoob/three.js/issues/events{/number}","events_url":"https://api.github.com/repos/mrdoob/three.js/events","assignees_url":"https://api.github.com/repos/mrdoob/three.js/assignees{/user}","branches_url":"https://api.github.com/repos/mrdoob/three.js/branches{/branch}","tags_url":"https://api.github.com/repos/mrdoob/three.js/tags","blobs_url":"https://api.github.com/repos/mrdoob/three.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrdoob/three.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrdoob/three.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrdoob/three.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrdoob/three.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mrdoob/three.js/languages","stargazers_url":"https://api.github.com/repos/mrdoob/three.js/stargazers","contributors_url":"https://api.github.com/repos/mrdoob/three.js/contributors","subscribers_url":"https://api.github.com/repos/mrdoob/three.js/subscribers","subscription_url":"https://api.github.com/repos/mrdoob/three.js/subscription","commits_url":"https://api.github.com/repos/mrdoob/three.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrdoob/three.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrdoob/three.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrdoob/three.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrdoob/three.js/contents/{+path}","compare_url":"https://api.github.com/repos/mrdoob/three.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrdoob/three.js/merges","archive_url":"https://api.github.com/repos/mrdoob/three.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrdoob/three.js/downloads","issues_url":"https://api.github.com/repos/mrdoob/three.js/issues{/number}","pulls_url":"https://api.github.com/repos/mrdoob/three.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mrdoob/three.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mrdoob/three.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrdoob/three.js/labels{/name}","releases_url":"https://api.github.com/repos/mrdoob/three.js/releases{/id}","deployments_url":"https://api.github.com/repos/mrdoob/three.js/deployments","created_at":"2010-03-23T18:58:01Z","updated_at":"2018-06-20T07:06:01Z","pushed_at":"2018-06-20T06:52:18Z","git_url":"git://github.com/mrdoob/three.js.git","ssh_url":"git@github.com:mrdoob/three.js.git","clone_url":"https://github.com/mrdoob/three.js.git","svn_url":"https://github.com/mrdoob/three.js","homepage":"https://threejs.org/","size":643068,"stargazers_count":42634,"watchers_count":42634,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":16042,"mirror_url":null,"archived":false,"open_issues_count":730,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":16042,"open_issues":730,"watchers":42634,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/14315"},"html":{"href":"https://github.com/mrdoob/three.js/pull/14315"},"issue":{"href":"https://api.github.com/repos/mrdoob/three.js/issues/14315"},"comments":{"href":"https://api.github.com/repos/mrdoob/three.js/issues/14315/comments"},"review_comments":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/14315/comments"},"review_comment":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/14315/commits"},"statuses":{"href":"https://api.github.com/repos/mrdoob/three.js/statuses/eaf001abee84652c6169f6f0c982fe89505d93ab"}},"author_association":"NONE"}}
{"actor":{"display_login":"takahirox"}}