{"action":"created","issue":{"url":"https://api.github.com/repos/aframevr/aframe-core/issues/695","labels_url":"https://api.github.com/repos/aframevr/aframe-core/issues/695/labels{/name}","comments_url":"https://api.github.com/repos/aframevr/aframe-core/issues/695/comments","events_url":"https://api.github.com/repos/aframevr/aframe-core/issues/695/events","html_url":"https://github.com/aframevr/aframe-core/pull/695","id":122812534,"number":695,"title":"have entities wait for child entities to load before emitting load","user":{"login":"ngokevin","id":674727,"avatar_url":"https://avatars.githubusercontent.com/u/674727?v=3","gravatar_id":"","url":"https://api.github.com/users/ngokevin","html_url":"https://github.com/ngokevin","followers_url":"https://api.github.com/users/ngokevin/followers","following_url":"https://api.github.com/users/ngokevin/following{/other_user}","gists_url":"https://api.github.com/users/ngokevin/gists{/gist_id}","starred_url":"https://api.github.com/users/ngokevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngokevin/subscriptions","organizations_url":"https://api.github.com/users/ngokevin/orgs","repos_url":"https://api.github.com/users/ngokevin/repos","events_url":"https://api.github.com/users/ngokevin/events{/privacy}","received_events_url":"https://api.github.com/users/ngokevin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aframevr/aframe-core/labels/needs%20review","name":"needs review","color":"336699"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-17T20:03:00Z","updated_at":"2015-12-17T20:07:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aframevr/aframe-core/pulls/695","html_url":"https://github.com/aframevr/aframe-core/pull/695","diff_url":"https://github.com/aframevr/aframe-core/pull/695.diff","patch_url":"https://github.com/aframevr/aframe-core/pull/695.patch"},"body":"- unblocks components that change the behavior of its children entities (e.g., layout component)\r\n- creates `getChildEntities` method that returns Array over NodeList\r\n- three tests initially failed (look at, animation), had to make some tweaks to get it working\r\n\r\n**Loading logic**\r\n\r\n- consolidates loading logic into ANode. AEntity/AScene/AAssets can customize what kind of children they wait upon before loading using a function.\r\n- use promises\r\n- scene loading logic changes. rather than keeping track of elements as they are added and decrementing count as they are loaded, it utilizes ANode's loading logic which waits for all of its direct children nodes to load before loading. And all of those children nodes are waiting for *its* children nodes before loading. So recursion satisfies waiting for all nodes in scene to load.\r\n- scene default camera logic made to match default light logic to ease loading logic\r\n- scene now fires `loaded` when its children loads, which is used to determine when to render. another event is added `renderstart` for those that want to listen to it."},"comment":{"url":"https://api.github.com/repos/aframevr/aframe-core/issues/comments/165568556","html_url":"https://github.com/aframevr/aframe-core/pull/695#issuecomment-165568556","issue_url":"https://api.github.com/repos/aframevr/aframe-core/issues/695","id":165568556,"user":{"login":"ngokevin","id":674727,"avatar_url":"https://avatars.githubusercontent.com/u/674727?v=3","gravatar_id":"","url":"https://api.github.com/users/ngokevin","html_url":"https://github.com/ngokevin","followers_url":"https://api.github.com/users/ngokevin/followers","following_url":"https://api.github.com/users/ngokevin/following{/other_user}","gists_url":"https://api.github.com/users/ngokevin/gists{/gist_id}","starred_url":"https://api.github.com/users/ngokevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngokevin/subscriptions","organizations_url":"https://api.github.com/users/ngokevin/orgs","repos_url":"https://api.github.com/users/ngokevin/repos","events_url":"https://api.github.com/users/ngokevin/events{/privacy}","received_events_url":"https://api.github.com/users/ngokevin/received_events","type":"User","site_admin":false},"created_at":"2015-12-17T20:07:47Z","updated_at":"2015-12-17T20:07:47Z","body":"r? @dmarcos "}}