{"action":"created","comment":{"url":"https://api.github.com/repos/three-rs/three/pulls/comments/173862292","pull_request_review_id":103121258,"id":173862292,"diff_hunk":"@@ -945,15 +945,18 @@ impl Renderer {\n             let mx_world: mint::ColumnMatrix4<_> = Matrix4::from(w.world_transform).into();\n             let pso_data = material.to_pso_data();\n \n-            if let Some(ref key) = gpu_data.instance_cache_key {\n-                let uv_range = [0.0; 4];\n-                match pso_data {\n-                    PsoData::Basic { color, param0, .. } => {\n+            let instance = match pso_data {\n+                PsoData::Basic { color, map, param0 } => {\n+                    let uv_range = match map {\n+                        Some(ref map) => map.uv_range(),\n+                        None => [0.0; 4],\n+                    };\n+                    if let Some(ref key) = gpu_data.instance_cache_key {\n                         let vec = self.instance_cache.entry(key.clone()).or_insert((\n                             InstanceData {\n                                 slice: gpu_data.slice.clone(),\n                                 vertices: gpu_data.vertices.clone(),\n-                                pso_data: pso_data.clone(),\n+                                pso_data: PsoData::Basic { color, map, param0 },","path":"src/render/mod.rs","position":20,"original_position":20,"commit_id":"41d6b39f091bac457bf7bad296a2b6ba4a561467","original_commit_id":"41d6b39f091bac457bf7bad296a2b6ba4a561467","user":{"login":"kvark","id":107301,"avatar_url":"https://avatars1.githubusercontent.com/u/107301?v=4","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"body":"it's basically `pso_data` that has been destructured, so we compose it again\r\nI'll add a comment","created_at":"2018-03-12T16:34:41Z","updated_at":"2018-03-12T16:34:41Z","html_url":"https://github.com/three-rs/three/pull/193#discussion_r173862292","pull_request_url":"https://api.github.com/repos/three-rs/three/pulls/193","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/three-rs/three/pulls/comments/173862292"},"html":{"href":"https://github.com/three-rs/three/pull/193#discussion_r173862292"},"pull_request":{"href":"https://api.github.com/repos/three-rs/three/pulls/193"}},"in_reply_to_id":173859633},"pull_request":{"url":"https://api.github.com/repos/three-rs/three/pulls/193","id":174369934,"html_url":"https://github.com/three-rs/three/pull/193","diff_url":"https://github.com/three-rs/three/pull/193.diff","patch_url":"https://github.com/three-rs/three/pull/193.patch","issue_url":"https://api.github.com/repos/three-rs/three/issues/193","number":193,"state":"open","locked":false,"title":"Instanced sprites entry point","user":{"login":"kvark","id":107301,"avatar_url":"https://avatars1.githubusercontent.com/u/107301?v=4","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"body":"Fixes #192\r\nTODO: instanced tile map example (in follow-ups)","created_at":"2018-03-12T13:38:03Z","updated_at":"2018-03-12T16:34:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"638392ea056deb04f4453ee1978e1928e6fa1b35","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/three-rs/three/pulls/193/commits","review_comments_url":"https://api.github.com/repos/three-rs/three/pulls/193/comments","review_comment_url":"https://api.github.com/repos/three-rs/three/pulls/comments{/number}","comments_url":"https://api.github.com/repos/three-rs/three/issues/193/comments","statuses_url":"https://api.github.com/repos/three-rs/three/statuses/41d6b39f091bac457bf7bad296a2b6ba4a561467","head":{"label":"three-rs:sprite-inst","ref":"sprite-inst","sha":"41d6b39f091bac457bf7bad296a2b6ba4a561467","user":{"login":"three-rs","id":31379641,"avatar_url":"https://avatars1.githubusercontent.com/u/31379641?v=4","gravatar_id":"","url":"https://api.github.com/users/three-rs","html_url":"https://github.com/three-rs","followers_url":"https://api.github.com/users/three-rs/followers","following_url":"https://api.github.com/users/three-rs/following{/other_user}","gists_url":"https://api.github.com/users/three-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/three-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/three-rs/subscriptions","organizations_url":"https://api.github.com/users/three-rs/orgs","repos_url":"https://api.github.com/users/three-rs/repos","events_url":"https://api.github.com/users/three-rs/events{/privacy}","received_events_url":"https://api.github.com/users/three-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":80894451,"name":"three","full_name":"three-rs/three","owner":{"login":"three-rs","id":31379641,"avatar_url":"https://avatars1.githubusercontent.com/u/31379641?v=4","gravatar_id":"","url":"https://api.github.com/users/three-rs","html_url":"https://github.com/three-rs","followers_url":"https://api.github.com/users/three-rs/followers","following_url":"https://api.github.com/users/three-rs/following{/other_user}","gists_url":"https://api.github.com/users/three-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/three-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/three-rs/subscriptions","organizations_url":"https://api.github.com/users/three-rs/orgs","repos_url":"https://api.github.com/users/three-rs/repos","events_url":"https://api.github.com/users/three-rs/events{/privacy}","received_events_url":"https://api.github.com/users/three-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/three-rs/three","description":"Totally not inspired Rust 3D library","fork":false,"url":"https://api.github.com/repos/three-rs/three","forks_url":"https://api.github.com/repos/three-rs/three/forks","keys_url":"https://api.github.com/repos/three-rs/three/keys{/key_id}","collaborators_url":"https://api.github.com/repos/three-rs/three/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/three-rs/three/teams","hooks_url":"https://api.github.com/repos/three-rs/three/hooks","issue_events_url":"https://api.github.com/repos/three-rs/three/issues/events{/number}","events_url":"https://api.github.com/repos/three-rs/three/events","assignees_url":"https://api.github.com/repos/three-rs/three/assignees{/user}","branches_url":"https://api.github.com/repos/three-rs/three/branches{/branch}","tags_url":"https://api.github.com/repos/three-rs/three/tags","blobs_url":"https://api.github.com/repos/three-rs/three/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/three-rs/three/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/three-rs/three/git/refs{/sha}","trees_url":"https://api.github.com/repos/three-rs/three/git/trees{/sha}","statuses_url":"https://api.github.com/repos/three-rs/three/statuses/{sha}","languages_url":"https://api.github.com/repos/three-rs/three/languages","stargazers_url":"https://api.github.com/repos/three-rs/three/stargazers","contributors_url":"https://api.github.com/repos/three-rs/three/contributors","subscribers_url":"https://api.github.com/repos/three-rs/three/subscribers","subscription_url":"https://api.github.com/repos/three-rs/three/subscription","commits_url":"https://api.github.com/repos/three-rs/three/commits{/sha}","git_commits_url":"https://api.github.com/repos/three-rs/three/git/commits{/sha}","comments_url":"https://api.github.com/repos/three-rs/three/comments{/number}","issue_comment_url":"https://api.github.com/repos/three-rs/three/issues/comments{/number}","contents_url":"https://api.github.com/repos/three-rs/three/contents/{+path}","compare_url":"https://api.github.com/repos/three-rs/three/compare/{base}...{head}","merges_url":"https://api.github.com/repos/three-rs/three/merges","archive_url":"https://api.github.com/repos/three-rs/three/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/three-rs/three/downloads","issues_url":"https://api.github.com/repos/three-rs/three/issues{/number}","pulls_url":"https://api.github.com/repos/three-rs/three/pulls{/number}","milestones_url":"https://api.github.com/repos/three-rs/three/milestones{/number}","notifications_url":"https://api.github.com/repos/three-rs/three/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/three-rs/three/labels{/name}","releases_url":"https://api.github.com/repos/three-rs/three/releases{/id}","deployments_url":"https://api.github.com/repos/three-rs/three/deployments","created_at":"2017-02-04T04:53:36Z","updated_at":"2018-03-12T16:19:30Z","pushed_at":"2018-03-12T14:22:19Z","git_url":"git://github.com/three-rs/three.git","ssh_url":"git@github.com:three-rs/three.git","clone_url":"https://github.com/three-rs/three.git","svn_url":"https://github.com/three-rs/three","homepage":null,"size":50763,"stargazers_count":176,"watchers_count":176,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":42,"license":null,"forks":27,"open_issues":42,"watchers":176,"default_branch":"master"}},"base":{"label":"three-rs:master","ref":"master","sha":"7aed73ab3f96e1d208206308d2ad6b50dfd7dc59","user":{"login":"three-rs","id":31379641,"avatar_url":"https://avatars1.githubusercontent.com/u/31379641?v=4","gravatar_id":"","url":"https://api.github.com/users/three-rs","html_url":"https://github.com/three-rs","followers_url":"https://api.github.com/users/three-rs/followers","following_url":"https://api.github.com/users/three-rs/following{/other_user}","gists_url":"https://api.github.com/users/three-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/three-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/three-rs/subscriptions","organizations_url":"https://api.github.com/users/three-rs/orgs","repos_url":"https://api.github.com/users/three-rs/repos","events_url":"https://api.github.com/users/three-rs/events{/privacy}","received_events_url":"https://api.github.com/users/three-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":80894451,"name":"three","full_name":"three-rs/three","owner":{"login":"three-rs","id":31379641,"avatar_url":"https://avatars1.githubusercontent.com/u/31379641?v=4","gravatar_id":"","url":"https://api.github.com/users/three-rs","html_url":"https://github.com/three-rs","followers_url":"https://api.github.com/users/three-rs/followers","following_url":"https://api.github.com/users/three-rs/following{/other_user}","gists_url":"https://api.github.com/users/three-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/three-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/three-rs/subscriptions","organizations_url":"https://api.github.com/users/three-rs/orgs","repos_url":"https://api.github.com/users/three-rs/repos","events_url":"https://api.github.com/users/three-rs/events{/privacy}","received_events_url":"https://api.github.com/users/three-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/three-rs/three","description":"Totally not inspired Rust 3D library","fork":false,"url":"https://api.github.com/repos/three-rs/three","forks_url":"https://api.github.com/repos/three-rs/three/forks","keys_url":"https://api.github.com/repos/three-rs/three/keys{/key_id}","collaborators_url":"https://api.github.com/repos/three-rs/three/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/three-rs/three/teams","hooks_url":"https://api.github.com/repos/three-rs/three/hooks","issue_events_url":"https://api.github.com/repos/three-rs/three/issues/events{/number}","events_url":"https://api.github.com/repos/three-rs/three/events","assignees_url":"https://api.github.com/repos/three-rs/three/assignees{/user}","branches_url":"https://api.github.com/repos/three-rs/three/branches{/branch}","tags_url":"https://api.github.com/repos/three-rs/three/tags","blobs_url":"https://api.github.com/repos/three-rs/three/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/three-rs/three/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/three-rs/three/git/refs{/sha}","trees_url":"https://api.github.com/repos/three-rs/three/git/trees{/sha}","statuses_url":"https://api.github.com/repos/three-rs/three/statuses/{sha}","languages_url":"https://api.github.com/repos/three-rs/three/languages","stargazers_url":"https://api.github.com/repos/three-rs/three/stargazers","contributors_url":"https://api.github.com/repos/three-rs/three/contributors","subscribers_url":"https://api.github.com/repos/three-rs/three/subscribers","subscription_url":"https://api.github.com/repos/three-rs/three/subscription","commits_url":"https://api.github.com/repos/three-rs/three/commits{/sha}","git_commits_url":"https://api.github.com/repos/three-rs/three/git/commits{/sha}","comments_url":"https://api.github.com/repos/three-rs/three/comments{/number}","issue_comment_url":"https://api.github.com/repos/three-rs/three/issues/comments{/number}","contents_url":"https://api.github.com/repos/three-rs/three/contents/{+path}","compare_url":"https://api.github.com/repos/three-rs/three/compare/{base}...{head}","merges_url":"https://api.github.com/repos/three-rs/three/merges","archive_url":"https://api.github.com/repos/three-rs/three/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/three-rs/three/downloads","issues_url":"https://api.github.com/repos/three-rs/three/issues{/number}","pulls_url":"https://api.github.com/repos/three-rs/three/pulls{/number}","milestones_url":"https://api.github.com/repos/three-rs/three/milestones{/number}","notifications_url":"https://api.github.com/repos/three-rs/three/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/three-rs/three/labels{/name}","releases_url":"https://api.github.com/repos/three-rs/three/releases{/id}","deployments_url":"https://api.github.com/repos/three-rs/three/deployments","created_at":"2017-02-04T04:53:36Z","updated_at":"2018-03-12T16:19:30Z","pushed_at":"2018-03-12T14:22:19Z","git_url":"git://github.com/three-rs/three.git","ssh_url":"git@github.com:three-rs/three.git","clone_url":"https://github.com/three-rs/three.git","svn_url":"https://github.com/three-rs/three","homepage":null,"size":50763,"stargazers_count":176,"watchers_count":176,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":27,"mirror_url":null,"archived":false,"open_issues_count":42,"license":null,"forks":27,"open_issues":42,"watchers":176,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/three-rs/three/pulls/193"},"html":{"href":"https://github.com/three-rs/three/pull/193"},"issue":{"href":"https://api.github.com/repos/three-rs/three/issues/193"},"comments":{"href":"https://api.github.com/repos/three-rs/three/issues/193/comments"},"review_comments":{"href":"https://api.github.com/repos/three-rs/three/pulls/193/comments"},"review_comment":{"href":"https://api.github.com/repos/three-rs/three/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/three-rs/three/pulls/193/commits"},"statuses":{"href":"https://api.github.com/repos/three-rs/three/statuses/41d6b39f091bac457bf7bad296a2b6ba4a561467"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kvark"}}