{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/9411","repository_url":"https://api.github.com/repos/mrdoob/three.js","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/9411/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/9411/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/9411/events","html_url":"https://github.com/mrdoob/three.js/issues/9411","id":167700596,"number":9411,"title":"Question About Method Return Values in Documenation","user":{"login":"lejeunerenard","id":2146515,"avatar_url":"https://avatars.githubusercontent.com/u/2146515?v=3","gravatar_id":"","url":"https://api.github.com/users/lejeunerenard","html_url":"https://github.com/lejeunerenard","followers_url":"https://api.github.com/users/lejeunerenard/followers","following_url":"https://api.github.com/users/lejeunerenard/following{/other_user}","gists_url":"https://api.github.com/users/lejeunerenard/gists{/gist_id}","starred_url":"https://api.github.com/users/lejeunerenard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lejeunerenard/subscriptions","organizations_url":"https://api.github.com/users/lejeunerenard/orgs","repos_url":"https://api.github.com/users/lejeunerenard/repos","events_url":"https://api.github.com/users/lejeunerenard/events{/privacy}","received_events_url":"https://api.github.com/users/lejeunerenard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-26T20:14:34Z","updated_at":"2016-12-16T02:21:13Z","closed_at":null,"body":"I've been looking at contributing documentation changes and noticed that there are some inconsistencies with the return value of methods.\n\nFor example, [Vector3's page](http://threejs.org/docs/#Reference/Math/Vector3) has a `this` after all methods that modify the `Vector3` in place and then return the same `Vector3`. But there are methods like [`.distanceToSquared()`](http://threejs.org/docs/#Reference/Math/Vector3.distanceToSquared) that have no return value after the method.\n\nSo my questions are:\n1. When should a return value follow a method definition?\n2. When should that return value text be `this` or the type, eg. `Vector3`?\n\n_Side Note:_ There are methods that link to non-existent pages because their return type is a standard JS type ( eg. Boolean, Float, etc ). This is confusing if you are expecting to be redirected to the page on that type.\n"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/267501033","html_url":"https://github.com/mrdoob/three.js/issues/9411#issuecomment-267501033","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/9411","id":267501033,"user":{"login":"mrdoob","id":97088,"avatar_url":"https://avatars.githubusercontent.com/u/97088?v=3","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},"created_at":"2016-12-16T02:21:13Z","updated_at":"2016-12-16T02:21:13Z","body":"How about...\r\n\r\n```\r\n<h3>[method:Material copy]( [page:material material] )</h3>\r\n<div>\r\n     //optional argument details here <br><br>\r\n\r\n    //description here\r\n\r\n    Returns `undefined`.\r\n</div>\r\n```\r\n\r\nAlso, maybe `self` is better than `this`?"}}
{"actor":{"display_login":"mrdoob"}}