{"action":"created","comment":{"url":"https://api.github.com/repos/playcanvas/engine/pulls/comments/32817934","id":32817934,"diff_hunk":"@@ -229,6 +273,13 @@ pc.extend(pc, function () {\n             this.c[name].enabled = false;\n         }\n \n+        //Stop any coroutines\n+        if (this._coroutines) {\n+            this._coroutines.forEach(function (c) {","path":"src/framework/entity/entity_entity.js","position":218,"original_position":218,"commit_id":"3c6dd65007e5861aa344c4aab908f774bd1bc3af","original_commit_id":"3c6dd65007e5861aa344c4aab908f774bd1bc3af","user":{"login":"Maksims","id":636263,"avatar_url":"https://avatars.githubusercontent.com/u/636263?v=3","gravatar_id":"","url":"https://api.github.com/users/Maksims","html_url":"https://github.com/Maksims","followers_url":"https://api.github.com/users/Maksims/followers","following_url":"https://api.github.com/users/Maksims/following{/other_user}","gists_url":"https://api.github.com/users/Maksims/gists{/gist_id}","starred_url":"https://api.github.com/users/Maksims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maksims/subscriptions","organizations_url":"https://api.github.com/users/Maksims/orgs","repos_url":"https://api.github.com/users/Maksims/repos","events_url":"https://api.github.com/users/Maksims/events{/privacy}","received_events_url":"https://api.github.com/users/Maksims/received_events","type":"User","site_admin":false},"body":"`Array.forEach` does look semantically well, but most benefit it has over normal loop is to have scoped local variable. In this case it is not necessary, and classic for loop is way more efficient in this case.","created_at":"2015-06-19T10:29:12Z","updated_at":"2015-06-19T10:29:12Z","html_url":"https://github.com/playcanvas/engine/pull/326#discussion_r32817934","pull_request_url":"https://api.github.com/repos/playcanvas/engine/pulls/326","_links":{"self":{"href":"https://api.github.com/repos/playcanvas/engine/pulls/comments/32817934"},"html":{"href":"https://github.com/playcanvas/engine/pull/326#discussion_r32817934"},"pull_request":{"href":"https://api.github.com/repos/playcanvas/engine/pulls/326"}}},"pull_request":{"url":"https://api.github.com/repos/playcanvas/engine/pulls/326","id":38058251,"html_url":"https://github.com/playcanvas/engine/pull/326","diff_url":"https://github.com/playcanvas/engine/pull/326.diff","patch_url":"https://github.com/playcanvas/engine/pull/326.patch","issue_url":"https://api.github.com/repos/playcanvas/engine/issues/326","number":326,"state":"open","locked":false,"title":"Create new StateMachine extension for pc","user":{"login":"whydoidoit","id":947235,"avatar_url":"https://avatars.githubusercontent.com/u/947235?v=3","gravatar_id":"","url":"https://api.github.com/users/whydoidoit","html_url":"https://github.com/whydoidoit","followers_url":"https://api.github.com/users/whydoidoit/followers","following_url":"https://api.github.com/users/whydoidoit/following{/other_user}","gists_url":"https://api.github.com/users/whydoidoit/gists{/gist_id}","starred_url":"https://api.github.com/users/whydoidoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whydoidoit/subscriptions","organizations_url":"https://api.github.com/users/whydoidoit/orgs","repos_url":"https://api.github.com/users/whydoidoit/repos","events_url":"https://api.github.com/users/whydoidoit/events{/privacy}","received_events_url":"https://api.github.com/users/whydoidoit/received_events","type":"User","site_admin":false},"body":"Create new Coroutine extension for pc\nCreate new interpolate extension for pc\n\nModify pc.Curve to allow value interpolation in a range using quaternions, vectors or values.\nModify pc.Curve to allow value interpolation over time using a coroutine\nModify pc.CurveSet to allow value interpolation in a range using quaternions, vectors or values.\nModify pc.CurveSet to allow value interpolation over time using a coroutine\n\nAdd documentation for above classes and methods\nAdd tests for above classes and methods (tests/statemachine)","created_at":"2015-06-18T22:05:01Z","updated_at":"2015-06-19T10:29:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2dd08814a44ee41c75c9eb0681cc9e73258ad11f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/playcanvas/engine/pulls/326/commits","review_comments_url":"https://api.github.com/repos/playcanvas/engine/pulls/326/comments","review_comment_url":"https://api.github.com/repos/playcanvas/engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/playcanvas/engine/issues/326/comments","statuses_url":"https://api.github.com/repos/playcanvas/engine/statuses/3c6dd65007e5861aa344c4aab908f774bd1bc3af","head":{"label":"whydoidoit:feature/statemachine","ref":"feature/statemachine","sha":"3c6dd65007e5861aa344c4aab908f774bd1bc3af","user":{"login":"whydoidoit","id":947235,"avatar_url":"https://avatars.githubusercontent.com/u/947235?v=3","gravatar_id":"","url":"https://api.github.com/users/whydoidoit","html_url":"https://github.com/whydoidoit","followers_url":"https://api.github.com/users/whydoidoit/followers","following_url":"https://api.github.com/users/whydoidoit/following{/other_user}","gists_url":"https://api.github.com/users/whydoidoit/gists{/gist_id}","starred_url":"https://api.github.com/users/whydoidoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whydoidoit/subscriptions","organizations_url":"https://api.github.com/users/whydoidoit/orgs","repos_url":"https://api.github.com/users/whydoidoit/repos","events_url":"https://api.github.com/users/whydoidoit/events{/privacy}","received_events_url":"https://api.github.com/users/whydoidoit/received_events","type":"User","site_admin":false},"repo":{"id":37656962,"name":"engine","full_name":"whydoidoit/engine","owner":{"login":"whydoidoit","id":947235,"avatar_url":"https://avatars.githubusercontent.com/u/947235?v=3","gravatar_id":"","url":"https://api.github.com/users/whydoidoit","html_url":"https://github.com/whydoidoit","followers_url":"https://api.github.com/users/whydoidoit/followers","following_url":"https://api.github.com/users/whydoidoit/following{/other_user}","gists_url":"https://api.github.com/users/whydoidoit/gists{/gist_id}","starred_url":"https://api.github.com/users/whydoidoit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whydoidoit/subscriptions","organizations_url":"https://api.github.com/users/whydoidoit/orgs","repos_url":"https://api.github.com/users/whydoidoit/repos","events_url":"https://api.github.com/users/whydoidoit/events{/privacy}","received_events_url":"https://api.github.com/users/whydoidoit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/whydoidoit/engine","description":"3D WebGL game engine with online toolset.","fork":true,"url":"https://api.github.com/repos/whydoidoit/engine","forks_url":"https://api.github.com/repos/whydoidoit/engine/forks","keys_url":"https://api.github.com/repos/whydoidoit/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/whydoidoit/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/whydoidoit/engine/teams","hooks_url":"https://api.github.com/repos/whydoidoit/engine/hooks","issue_events_url":"https://api.github.com/repos/whydoidoit/engine/issues/events{/number}","events_url":"https://api.github.com/repos/whydoidoit/engine/events","assignees_url":"https://api.github.com/repos/whydoidoit/engine/assignees{/user}","branches_url":"https://api.github.com/repos/whydoidoit/engine/branches{/branch}","tags_url":"https://api.github.com/repos/whydoidoit/engine/tags","blobs_url":"https://api.github.com/repos/whydoidoit/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/whydoidoit/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/whydoidoit/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/whydoidoit/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/whydoidoit/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/whydoidoit/engine/languages","stargazers_url":"https://api.github.com/repos/whydoidoit/engine/stargazers","contributors_url":"https://api.github.com/repos/whydoidoit/engine/contributors","subscribers_url":"https://api.github.com/repos/whydoidoit/engine/subscribers","subscription_url":"https://api.github.com/repos/whydoidoit/engine/subscription","commits_url":"https://api.github.com/repos/whydoidoit/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/whydoidoit/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/whydoidoit/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/whydoidoit/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/whydoidoit/engine/contents/{+path}","compare_url":"https://api.github.com/repos/whydoidoit/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/whydoidoit/engine/merges","archive_url":"https://api.github.com/repos/whydoidoit/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/whydoidoit/engine/downloads","issues_url":"https://api.github.com/repos/whydoidoit/engine/issues{/number}","pulls_url":"https://api.github.com/repos/whydoidoit/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/whydoidoit/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/whydoidoit/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/whydoidoit/engine/labels{/name}","releases_url":"https://api.github.com/repos/whydoidoit/engine/releases{/id}","created_at":"2015-06-18T12:01:01Z","updated_at":"2015-06-18T12:01:03Z","pushed_at":"2015-06-19T09:25:08Z","git_url":"git://github.com/whydoidoit/engine.git","ssh_url":"git@github.com:whydoidoit/engine.git","clone_url":"https://github.com/whydoidoit/engine.git","svn_url":"https://github.com/whydoidoit/engine","homepage":"https://playcanvas.com/","size":60909,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"playcanvas:master","ref":"master","sha":"1d9915c255bb32af2b68ba271e1e1e276d29e2b9","user":{"login":"playcanvas","id":1030579,"avatar_url":"https://avatars.githubusercontent.com/u/1030579?v=3","gravatar_id":"","url":"https://api.github.com/users/playcanvas","html_url":"https://github.com/playcanvas","followers_url":"https://api.github.com/users/playcanvas/followers","following_url":"https://api.github.com/users/playcanvas/following{/other_user}","gists_url":"https://api.github.com/users/playcanvas/gists{/gist_id}","starred_url":"https://api.github.com/users/playcanvas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playcanvas/subscriptions","organizations_url":"https://api.github.com/users/playcanvas/orgs","repos_url":"https://api.github.com/users/playcanvas/repos","events_url":"https://api.github.com/users/playcanvas/events{/privacy}","received_events_url":"https://api.github.com/users/playcanvas/received_events","type":"Organization","site_admin":false},"repo":{"id":19696006,"name":"engine","full_name":"playcanvas/engine","owner":{"login":"playcanvas","id":1030579,"avatar_url":"https://avatars.githubusercontent.com/u/1030579?v=3","gravatar_id":"","url":"https://api.github.com/users/playcanvas","html_url":"https://github.com/playcanvas","followers_url":"https://api.github.com/users/playcanvas/followers","following_url":"https://api.github.com/users/playcanvas/following{/other_user}","gists_url":"https://api.github.com/users/playcanvas/gists{/gist_id}","starred_url":"https://api.github.com/users/playcanvas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playcanvas/subscriptions","organizations_url":"https://api.github.com/users/playcanvas/orgs","repos_url":"https://api.github.com/users/playcanvas/repos","events_url":"https://api.github.com/users/playcanvas/events{/privacy}","received_events_url":"https://api.github.com/users/playcanvas/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/playcanvas/engine","description":"3D WebGL game engine with online toolset.","fork":false,"url":"https://api.github.com/repos/playcanvas/engine","forks_url":"https://api.github.com/repos/playcanvas/engine/forks","keys_url":"https://api.github.com/repos/playcanvas/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/playcanvas/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/playcanvas/engine/teams","hooks_url":"https://api.github.com/repos/playcanvas/engine/hooks","issue_events_url":"https://api.github.com/repos/playcanvas/engine/issues/events{/number}","events_url":"https://api.github.com/repos/playcanvas/engine/events","assignees_url":"https://api.github.com/repos/playcanvas/engine/assignees{/user}","branches_url":"https://api.github.com/repos/playcanvas/engine/branches{/branch}","tags_url":"https://api.github.com/repos/playcanvas/engine/tags","blobs_url":"https://api.github.com/repos/playcanvas/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/playcanvas/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/playcanvas/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/playcanvas/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/playcanvas/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/playcanvas/engine/languages","stargazers_url":"https://api.github.com/repos/playcanvas/engine/stargazers","contributors_url":"https://api.github.com/repos/playcanvas/engine/contributors","subscribers_url":"https://api.github.com/repos/playcanvas/engine/subscribers","subscription_url":"https://api.github.com/repos/playcanvas/engine/subscription","commits_url":"https://api.github.com/repos/playcanvas/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/playcanvas/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/playcanvas/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/playcanvas/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/playcanvas/engine/contents/{+path}","compare_url":"https://api.github.com/repos/playcanvas/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/playcanvas/engine/merges","archive_url":"https://api.github.com/repos/playcanvas/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/playcanvas/engine/downloads","issues_url":"https://api.github.com/repos/playcanvas/engine/issues{/number}","pulls_url":"https://api.github.com/repos/playcanvas/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/playcanvas/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/playcanvas/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/playcanvas/engine/labels{/name}","releases_url":"https://api.github.com/repos/playcanvas/engine/releases{/id}","created_at":"2014-05-12T11:24:30Z","updated_at":"2015-06-19T04:17:19Z","pushed_at":"2015-06-19T09:25:09Z","git_url":"git://github.com/playcanvas/engine.git","ssh_url":"git@github.com:playcanvas/engine.git","clone_url":"https://github.com/playcanvas/engine.git","svn_url":"https://github.com/playcanvas/engine","homepage":"https://playcanvas.com/","size":60909,"stargazers_count":1307,"watchers_count":1307,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":248,"mirror_url":null,"open_issues_count":58,"forks":248,"open_issues":58,"watchers":1307,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/playcanvas/engine/pulls/326"},"html":{"href":"https://github.com/playcanvas/engine/pull/326"},"issue":{"href":"https://api.github.com/repos/playcanvas/engine/issues/326"},"comments":{"href":"https://api.github.com/repos/playcanvas/engine/issues/326/comments"},"review_comments":{"href":"https://api.github.com/repos/playcanvas/engine/pulls/326/comments"},"review_comment":{"href":"https://api.github.com/repos/playcanvas/engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/playcanvas/engine/pulls/326/commits"},"statuses":{"href":"https://api.github.com/repos/playcanvas/engine/statuses/3c6dd65007e5861aa344c4aab908f774bd1bc3af"}}}}