{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/7326","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/7326/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/7326/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/7326/events","html_url":"https://github.com/mrdoob/three.js/pull/7326","id":110816306,"number":7326,"title":"Added vector truncate methods","user":{"login":"Mugen87","id":12612165,"avatar_url":"https://avatars.githubusercontent.com/u/12612165?v=3","gravatar_id":"","url":"https://api.github.com/users/Mugen87","html_url":"https://github.com/Mugen87","followers_url":"https://api.github.com/users/Mugen87/followers","following_url":"https://api.github.com/users/Mugen87/following{/other_user}","gists_url":"https://api.github.com/users/Mugen87/gists{/gist_id}","starred_url":"https://api.github.com/users/Mugen87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mugen87/subscriptions","organizations_url":"https://api.github.com/users/Mugen87/orgs","repos_url":"https://api.github.com/users/Mugen87/repos","events_url":"https://api.github.com/users/Mugen87/events{/privacy}","received_events_url":"https://api.github.com/users/Mugen87/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-10-10T20:59:08Z","updated_at":"2015-10-13T07:37:58Z","closed_at":"2015-10-13T07:37:36Z","pull_request":{"url":"https://api.github.com/repos/mrdoob/three.js/pulls/7326","html_url":"https://github.com/mrdoob/three.js/pull/7326","diff_url":"https://github.com/mrdoob/three.js/pull/7326.diff","patch_url":"https://github.com/mrdoob/three.js/pull/7326.patch"},"body":"First of all, many thanks for this great library! :wink: \r\n\r\nI want to contribute a method for each THREE.Vector prototype. I use frequently this functionality when i develop AI logic for games.\r\n\r\nLet's say you calculate a \"force\" vector for a game entity (e.g. a vehicle). To ensure, that the calculated force does not exceed a maximum amount, you can use the \"truncate\" method to bound the length of a vector to a specific value."},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/147631030","html_url":"https://github.com/mrdoob/three.js/pull/7326#issuecomment-147631030","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/7326","id":147631030,"user":{"login":"threejsworker","id":14880287,"avatar_url":"https://avatars.githubusercontent.com/u/14880287?v=3","gravatar_id":"","url":"https://api.github.com/users/threejsworker","html_url":"https://github.com/threejsworker","followers_url":"https://api.github.com/users/threejsworker/followers","following_url":"https://api.github.com/users/threejsworker/following{/other_user}","gists_url":"https://api.github.com/users/threejsworker/gists{/gist_id}","starred_url":"https://api.github.com/users/threejsworker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/threejsworker/subscriptions","organizations_url":"https://api.github.com/users/threejsworker/orgs","repos_url":"https://api.github.com/users/threejsworker/repos","events_url":"https://api.github.com/users/threejsworker/events{/privacy}","received_events_url":"https://api.github.com/users/threejsworker/received_events","type":"User","site_admin":false},"created_at":"2015-10-13T07:37:58Z","updated_at":"2015-10-13T07:37:58Z","body":"The examples of this pullrequest are now built and visible in threejsworker. To view them, go to the following link: \n\n http://threejsworker.com/viewpullrequest.html#7326"}}