{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/6759","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/6759/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/6759/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/6759/events","html_url":"https://github.com/mrdoob/three.js/pull/6759","id":92297855,"number":6759,"title":"mod hue and clamp saturation and luminance","user":{"login":"greggman","id":234804,"avatar_url":"https://avatars.githubusercontent.com/u/234804?v=3","gravatar_id":"","url":"https://api.github.com/users/greggman","html_url":"https://github.com/greggman","followers_url":"https://api.github.com/users/greggman/followers","following_url":"https://api.github.com/users/greggman/following{/other_user}","gists_url":"https://api.github.com/users/greggman/gists{/gist_id}","starred_url":"https://api.github.com/users/greggman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greggman/subscriptions","organizations_url":"https://api.github.com/users/greggman/orgs","repos_url":"https://api.github.com/users/greggman/repos","events_url":"https://api.github.com/users/greggman/events{/privacy}","received_events_url":"https://api.github.com/users/greggman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-01T07:19:15Z","updated_at":"2015-07-01T14:21:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/6759","html_url":"https://github.com/mrdoob/three.js/pull/6759","diff_url":"https://github.com/mrdoob/three.js/pull/6759.diff","patch_url":"https://github.com/mrdoob/three.js/pull/6759.patch"},"body":"This makes it similar to rotation. With rotation you can do things\r\nlike\r\n\r\n    someObj.rotation.x += speed * deltaTime;\r\n\r\nYou don't have to keep the result in the 0 to 2*PI or -PI to PI range.\r\n\r\nSimilarly by modding hue you can cycle through hues with\r\n\r\n    someObj.hue += speed * deltaTime;\r\n    someColor.setHSL(someObj.hue, 1, 0.5);\r\n\r\nThat helps several use cases like tweening libaries\r\n\r\n    tween.fromTo(someObj, 5, { hue: 0 }, { hue: 5 });\r\n\r\nIt's also useful for random color selection from a given hue, saturation, luminance\r\n\r\n    var hsl = someColor.getHSL();\r\n    hsl.h += Math.random();\r\n    hsl.s += Math.random() * 0.2 - 0.1;  // make it slightly more or less saturated\r\n    someColor.setHSL(hsl.h, hsl.s, hsl.l);"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/117692047","html_url":"https://github.com/mrdoob/three.js/pull/6759#issuecomment-117692047","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/6759","id":117692047,"user":{"login":"greggman","id":234804,"avatar_url":"https://avatars.githubusercontent.com/u/234804?v=3","gravatar_id":"","url":"https://api.github.com/users/greggman","html_url":"https://github.com/greggman","followers_url":"https://api.github.com/users/greggman/followers","following_url":"https://api.github.com/users/greggman/following{/other_user}","gists_url":"https://api.github.com/users/greggman/gists{/gist_id}","starred_url":"https://api.github.com/users/greggman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greggman/subscriptions","organizations_url":"https://api.github.com/users/greggman/orgs","repos_url":"https://api.github.com/users/greggman/repos","events_url":"https://api.github.com/users/greggman/events{/privacy}","received_events_url":"https://api.github.com/users/greggman/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T14:20:59Z","updated_at":"2015-07-01T14:20:59Z","body":"Do you think `Math.sin` should be limited to +/- Math.PI?"}}