{"action":"created","comment":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/comments/186671566","pull_request_review_id":118293811,"id":186671566,"diff_hunk":"@@ -325,6 +325,26 @@ THREE.GLTFExporter.prototype = {\n \n \t\t}\n \n+\t\t/**\n+\t\t * Serializes a userData.\n+\t\t *\n+\t\t * @param {Object} userData\n+\t\t * @returns {Object}\n+\t\t */\n+\t\tfunction serializeUserData( userData ) {\n+\n+\t\t\ttry {\n+\n+\t\t\t\treturn JSON.parse( JSON.stringify( userData ) );\n+\n+\t\t\t} catch ( error ) {\n+\n+\t\t\t\tthrow new Error( 'THREE.GLTFExporter: userData can\\'t be serialized' );","path":"examples/js/exporters/GLTFExporter.js","position":18,"original_position":18,"commit_id":"39a01e4adf19c72e6910ae9570369e09be076219","original_commit_id":"39a01e4adf19c72e6910ae9570369e09be076219","user":{"login":"takahirox","id":7637832,"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":"If you didn't have any special reasons why it halted, try-catch with console.warn would sound reasonable for me.  Agreed with\r\n\r\n> Loss of userData doesn't seem to me like it needs to halt export.\r\n\r\n    try {\r\n\r\n        return JSON.parse( JSON.stringify( userData ) );\r\n\r\n    } catch ( error ) {\r\n\r\n        console.warn( 'THREE.GLTFExporter: userData won\\'t be serialized ' +\r\n                      'because JSON.stringify failed. ' + error.message );\r\n        return {};\r\n\r\n    }","created_at":"2018-05-08T09:43:24Z","updated_at":"2018-05-08T09:43:24Z","html_url":"https://github.com/mrdoob/three.js/pull/14015#discussion_r186671566","pull_request_url":"https://api.github.com/repos/mrdoob/three.js/pulls/14015","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/comments/186671566"},"html":{"href":"https://github.com/mrdoob/three.js/pull/14015#discussion_r186671566"},"pull_request":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/14015"}},"in_reply_to_id":186587888},"pull_request":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/14015","id":186395679,"html_url":"https://github.com/mrdoob/three.js/pull/14015","diff_url":"https://github.com/mrdoob/three.js/pull/14015.diff","patch_url":"https://github.com/mrdoob/three.js/pull/14015.patch","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/14015","number":14015,"state":"open","locked":false,"title":"GLTFExporter: Serialize material.userData","user":{"login":"takahirox","id":7637832,"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":"This PR adds `material.userData` serialization to `GLTFExporter`. ","created_at":"2018-05-07T16:11:45Z","updated_at":"2018-05-08T09:43:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3cd673197a0fd305e3dd446975788a44fffee625","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/mrdoob/three.js/milestones/7","html_url":"https://github.com/mrdoob/three.js/milestone/7","labels_url":"https://api.github.com/repos/mrdoob/three.js/milestones/7/labels","id":3279335,"number":7,"title":"r94","description":"","creator":{"login":"mrdoob","id":97088,"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":3,"closed_issues":0,"state":"open","created_at":"2018-04-18T22:01:36Z","updated_at":"2018-05-08T01:41:01Z","due_on":"2018-06-06T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mrdoob/three.js/pulls/14015/commits","review_comments_url":"https://api.github.com/repos/mrdoob/three.js/pulls/14015/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/14015/comments","statuses_url":"https://api.github.com/repos/mrdoob/three.js/statuses/39a01e4adf19c72e6910ae9570369e09be076219","head":{"label":"takahirox:GLTFExporterMaterialExtras","ref":"GLTFExporterMaterialExtras","sha":"39a01e4adf19c72e6910ae9570369e09be076219","user":{"login":"takahirox","id":7637832,"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},"repo":{"id":45166916,"name":"three.js","full_name":"takahirox/three.js","owner":{"login":"takahirox","id":7637832,"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},"private":false,"html_url":"https://github.com/takahirox/three.js","description":"Three.js fork for MMDLoader","fork":true,"url":"https://api.github.com/repos/takahirox/three.js","forks_url":"https://api.github.com/repos/takahirox/three.js/forks","keys_url":"https://api.github.com/repos/takahirox/three.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/takahirox/three.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/takahirox/three.js/teams","hooks_url":"https://api.github.com/repos/takahirox/three.js/hooks","issue_events_url":"https://api.github.com/repos/takahirox/three.js/issues/events{/number}","events_url":"https://api.github.com/repos/takahirox/three.js/events","assignees_url":"https://api.github.com/repos/takahirox/three.js/assignees{/user}","branches_url":"https://api.github.com/repos/takahirox/three.js/branches{/branch}","tags_url":"https://api.github.com/repos/takahirox/three.js/tags","blobs_url":"https://api.github.com/repos/takahirox/three.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/takahirox/three.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/takahirox/three.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/takahirox/three.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/takahirox/three.js/statuses/{sha}","languages_url":"https://api.github.com/repos/takahirox/three.js/languages","stargazers_url":"https://api.github.com/repos/takahirox/three.js/stargazers","contributors_url":"https://api.github.com/repos/takahirox/three.js/contributors","subscribers_url":"https://api.github.com/repos/takahirox/three.js/subscribers","subscription_url":"https://api.github.com/repos/takahirox/three.js/subscription","commits_url":"https://api.github.com/repos/takahirox/three.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/takahirox/three.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/takahirox/three.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/takahirox/three.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/takahirox/three.js/contents/{+path}","compare_url":"https://api.github.com/repos/takahirox/three.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/takahirox/three.js/merges","archive_url":"https://api.github.com/repos/takahirox/three.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/takahirox/three.js/downloads","issues_url":"https://api.github.com/repos/takahirox/three.js/issues{/number}","pulls_url":"https://api.github.com/repos/takahirox/three.js/pulls{/number}","milestones_url":"https://api.github.com/repos/takahirox/three.js/milestones{/number}","notifications_url":"https://api.github.com/repos/takahirox/three.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/takahirox/three.js/labels{/name}","releases_url":"https://api.github.com/repos/takahirox/three.js/releases{/id}","deployments_url":"https://api.github.com/repos/takahirox/three.js/deployments","created_at":"2015-10-29T07:20:39Z","updated_at":"2018-03-27T19:47:23Z","pushed_at":"2018-05-07T17:41:08Z","git_url":"git://github.com/takahirox/three.js.git","ssh_url":"git@github.com:takahirox/three.js.git","clone_url":"https://github.com/takahirox/three.js.git","svn_url":"https://github.com/takahirox/three.js","homepage":"http://takahirox.github.io/three.js/examples/#webgl_loader_mmd","size":704787,"stargazers_count":23,"watchers_count":23,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":2,"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"},"forks":2,"open_issues":0,"watchers":23,"default_branch":"master"}},"base":{"label":"mrdoob:dev","ref":"dev","sha":"624b4e6a45c4b123a87c2cb6b24fae5abca884be","user":{"login":"mrdoob","id":97088,"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,"name":"three.js","full_name":"mrdoob/three.js","owner":{"login":"mrdoob","id":97088,"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-05-08T09:28:58Z","pushed_at":"2018-05-08T08:30:41Z","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":627300,"stargazers_count":41576,"watchers_count":41576,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":15553,"mirror_url":null,"archived":false,"open_issues_count":751,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":15553,"open_issues":751,"watchers":41576,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/14015"},"html":{"href":"https://github.com/mrdoob/three.js/pull/14015"},"issue":{"href":"https://api.github.com/repos/mrdoob/three.js/issues/14015"},"comments":{"href":"https://api.github.com/repos/mrdoob/three.js/issues/14015/comments"},"review_comments":{"href":"https://api.github.com/repos/mrdoob/three.js/pulls/14015/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/14015/commits"},"statuses":{"href":"https://api.github.com/repos/mrdoob/three.js/statuses/39a01e4adf19c72e6910ae9570369e09be076219"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"takahirox"}}