{"action":"created","issue":{"url":"https://api.github.com/repos/aframevr/aframe/issues/1364","repository_url":"https://api.github.com/repos/aframevr/aframe","labels_url":"https://api.github.com/repos/aframevr/aframe/issues/1364/labels{/name}","comments_url":"https://api.github.com/repos/aframevr/aframe/issues/1364/comments","events_url":"https://api.github.com/repos/aframevr/aframe/issues/1364/events","html_url":"https://github.com/aframevr/aframe/pull/1364","id":147588340,"number":1364,"title":"refactor material + texture system","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/labels/needs%20review","name":"needs review","color":"e1fd39"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-11T23:44:51Z","updated_at":"2016-04-19T03:53:18Z","closed_at":"2016-04-19T03:50:13Z","pull_request":{"url":"https://api.github.com/repos/aframevr/aframe/pulls/1364","html_url":"https://github.com/aframevr/aframe/pull/1364","diff_url":"https://github.com/aframevr/aframe/pull/1364.diff","patch_url":"https://github.com/aframevr/aframe/pull/1364.patch"},"body":"**Description:**\r\n\r\nThis started off as trying to cache materials (#1350), but I found that negatively impacted CPU performance, although it did save relatively a lot of memory. Now it's mostly a refactor with a couple enhancements.\r\n\r\n**Changes proposed:**\r\n- Split material system + texture system.\r\n- Move handling of loaded texture to the shader. `standard` and `flat` shaders now handle setting `material.map` and the texture system should only worry about loading/caching the texture.\r\n- Shader talks to texture system.\r\n- Move material/shader creation to material system.\r\n- Set `material.shader` to shader instance such that shader methods can be manually envoked.\r\n- Utility function between `standard`/`flat` shader to load textures for `material.map`.\r\n- Flatten texture cache. Cache is keyed off of serialized data like geometry component. The subset of data to use to make the key is determined by shader.\r\n- Support `repeat` (and future texture properties) for videos.\r\n- Fix unnecessary `<img>` creation when loading img elements.\r\n- Bump rStats to get program stats\r\n- Namespace and link performance tests\r\n- Add more tests for texture caching\r\n- Slightly improve material component perf by not calling `utils.diff`"},"comment":{"url":"https://api.github.com/repos/aframevr/aframe/issues/comments/211717205","html_url":"https://github.com/aframevr/aframe/pull/1364#issuecomment-211717205","issue_url":"https://api.github.com/repos/aframevr/aframe/issues/1364","id":211717205,"user":{"login":"dmarcos","id":39342,"avatar_url":"https://avatars.githubusercontent.com/u/39342?v=3","gravatar_id":"","url":"https://api.github.com/users/dmarcos","html_url":"https://github.com/dmarcos","followers_url":"https://api.github.com/users/dmarcos/followers","following_url":"https://api.github.com/users/dmarcos/following{/other_user}","gists_url":"https://api.github.com/users/dmarcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dmarcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmarcos/subscriptions","organizations_url":"https://api.github.com/users/dmarcos/orgs","repos_url":"https://api.github.com/users/dmarcos/repos","events_url":"https://api.github.com/users/dmarcos/events{/privacy}","received_events_url":"https://api.github.com/users/dmarcos/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T03:53:18Z","updated_at":"2016-04-19T03:53:18Z","body":"It's very very hard to review PRs with a lot of unrelated changes"}}