{"action":"created","comment":{"url":"https://api.github.com/repos/EngoEngine/engo/pulls/comments/156845789","pull_request_review_id":83388391,"id":156845789,"diff_hunk":"@@ -4,23 +4,58 @@ import (\n \t\"log\"\n \n \t\"engo.io/engo\"\n+\t\"engo.io/engo/math\"\n \t\"engo.io/gl\"\n )\n \n // Spritesheet is a class that stores a set of tiles from a file, used by tilemaps and animations\n type Spritesheet struct {\n-\ttexture               *gl.Texture     // The original texture\n-\twidth, height         float32         // The dimensions of the total texture\n-\tcellWidth, cellHeight int             // The dimensions of the cells\n-\tcache                 map[int]Texture // The cell cache cells\n+\ttexture       *gl.Texture     // The original texture\n+\twidth, height float32         // The dimensions of the total texture\n+\tcells         []Sprite        // The dimensions of each sprite\n+\tcache         map[int]Texture // The cell cache cells\n }\n \n-func NewSpritesheetFromTexture(tr *TextureResource, cellWidth, cellHeight int) *Spritesheet {\n-\treturn &Spritesheet{texture: tr.Texture,\n-\t\twidth: tr.Width, height: tr.Height,\n-\t\tcellWidth: cellWidth, cellHeight: cellHeight,\n-\t\tcache: make(map[int]Texture),\n+// Sprite holds the position data for each sprite on the sheet\n+type Sprite struct {","path":"common/spritesheet.go","position":null,"original_position":26,"commit_id":"c8667d6cb7fa2ba246e73cd9c0ca60aa10aadfe1","original_commit_id":"217d8ac62bd1aabc3d1ebad24e5d49c19853fdfb","user":{"login":"Noofbiz","id":5117030,"avatar_url":"https://avatars3.githubusercontent.com/u/5117030?v=4","gravatar_id":"","url":"https://api.github.com/users/Noofbiz","html_url":"https://github.com/Noofbiz","followers_url":"https://api.github.com/users/Noofbiz/followers","following_url":"https://api.github.com/users/Noofbiz/following{/other_user}","gists_url":"https://api.github.com/users/Noofbiz/gists{/gist_id}","starred_url":"https://api.github.com/users/Noofbiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Noofbiz/subscriptions","organizations_url":"https://api.github.com/users/Noofbiz/orgs","repos_url":"https://api.github.com/users/Noofbiz/repos","events_url":"https://api.github.com/users/Noofbiz/events{/privacy}","received_events_url":"https://api.github.com/users/Noofbiz/received_events","type":"User","site_admin":false},"body":"Updated to SpriteRegion. Thanks, that is much more clear ^_^","created_at":"2017-12-14T03:19:43Z","updated_at":"2017-12-14T03:19:43Z","html_url":"https://github.com/EngoEngine/engo/pull/481#discussion_r156845789","pull_request_url":"https://api.github.com/repos/EngoEngine/engo/pulls/481","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/EngoEngine/engo/pulls/comments/156845789"},"html":{"href":"https://github.com/EngoEngine/engo/pull/481#discussion_r156845789"},"pull_request":{"href":"https://api.github.com/repos/EngoEngine/engo/pulls/481"}},"in_reply_to_id":156803334},"pull_request":{"url":"https://api.github.com/repos/EngoEngine/engo/pulls/481","id":158153162,"html_url":"https://github.com/EngoEngine/engo/pull/481","diff_url":"https://github.com/EngoEngine/engo/pull/481.diff","patch_url":"https://github.com/EngoEngine/engo/pull/481.patch","issue_url":"https://api.github.com/repos/EngoEngine/engo/issues/481","number":481,"state":"open","locked":false,"title":"added support for asymmetric sprite sheets as well as for borders bet…","user":{"login":"Noofbiz","id":5117030,"avatar_url":"https://avatars3.githubusercontent.com/u/5117030?v=4","gravatar_id":"","url":"https://api.github.com/users/Noofbiz","html_url":"https://github.com/Noofbiz","followers_url":"https://api.github.com/users/Noofbiz/followers","following_url":"https://api.github.com/users/Noofbiz/following{/other_user}","gists_url":"https://api.github.com/users/Noofbiz/gists{/gist_id}","starred_url":"https://api.github.com/users/Noofbiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Noofbiz/subscriptions","organizations_url":"https://api.github.com/users/Noofbiz/orgs","repos_url":"https://api.github.com/users/Noofbiz/repos","events_url":"https://api.github.com/users/Noofbiz/events{/privacy}","received_events_url":"https://api.github.com/users/Noofbiz/received_events","type":"User","site_admin":false},"body":"…ween sprites on the sprite sheet\r\n\r\nAdded support for asymmetric sprite sheets. Created a sprite struct that keeps the position and size information about each sprite. Since the symmetric is just a subset of asymmetric, all the symmetric stuff produces sprites on it's own then feeds that to the asymmetric.\r\nAlso implemented symmetric sprite sheets with borders between the sprites, which helps with issues that sprites bleed into eachother.\r\nCloses #478 ","created_at":"2017-12-13T17:14:27Z","updated_at":"2017-12-14T03:19:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"269cdc0cb364acc5fb4065d158ff01295e2dc930","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/EngoEngine/engo/pulls/481/commits","review_comments_url":"https://api.github.com/repos/EngoEngine/engo/pulls/481/comments","review_comment_url":"https://api.github.com/repos/EngoEngine/engo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EngoEngine/engo/issues/481/comments","statuses_url":"https://api.github.com/repos/EngoEngine/engo/statuses/c8667d6cb7fa2ba246e73cd9c0ca60aa10aadfe1","head":{"label":"EngoEngine:asymmetric-sprite-sheets","ref":"asymmetric-sprite-sheets","sha":"c8667d6cb7fa2ba246e73cd9c0ca60aa10aadfe1","user":{"login":"EngoEngine","id":18199841,"avatar_url":"https://avatars1.githubusercontent.com/u/18199841?v=4","gravatar_id":"","url":"https://api.github.com/users/EngoEngine","html_url":"https://github.com/EngoEngine","followers_url":"https://api.github.com/users/EngoEngine/followers","following_url":"https://api.github.com/users/EngoEngine/following{/other_user}","gists_url":"https://api.github.com/users/EngoEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/EngoEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EngoEngine/subscriptions","organizations_url":"https://api.github.com/users/EngoEngine/orgs","repos_url":"https://api.github.com/users/EngoEngine/repos","events_url":"https://api.github.com/users/EngoEngine/events{/privacy}","received_events_url":"https://api.github.com/users/EngoEngine/received_events","type":"Organization","site_admin":false},"repo":{"id":26521386,"name":"engo","full_name":"EngoEngine/engo","owner":{"login":"EngoEngine","id":18199841,"avatar_url":"https://avatars1.githubusercontent.com/u/18199841?v=4","gravatar_id":"","url":"https://api.github.com/users/EngoEngine","html_url":"https://github.com/EngoEngine","followers_url":"https://api.github.com/users/EngoEngine/followers","following_url":"https://api.github.com/users/EngoEngine/following{/other_user}","gists_url":"https://api.github.com/users/EngoEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/EngoEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EngoEngine/subscriptions","organizations_url":"https://api.github.com/users/EngoEngine/orgs","repos_url":"https://api.github.com/users/EngoEngine/repos","events_url":"https://api.github.com/users/EngoEngine/events{/privacy}","received_events_url":"https://api.github.com/users/EngoEngine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EngoEngine/engo","description":"Engo is an open-source 2D game engine written in Go.","fork":false,"url":"https://api.github.com/repos/EngoEngine/engo","forks_url":"https://api.github.com/repos/EngoEngine/engo/forks","keys_url":"https://api.github.com/repos/EngoEngine/engo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EngoEngine/engo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EngoEngine/engo/teams","hooks_url":"https://api.github.com/repos/EngoEngine/engo/hooks","issue_events_url":"https://api.github.com/repos/EngoEngine/engo/issues/events{/number}","events_url":"https://api.github.com/repos/EngoEngine/engo/events","assignees_url":"https://api.github.com/repos/EngoEngine/engo/assignees{/user}","branches_url":"https://api.github.com/repos/EngoEngine/engo/branches{/branch}","tags_url":"https://api.github.com/repos/EngoEngine/engo/tags","blobs_url":"https://api.github.com/repos/EngoEngine/engo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EngoEngine/engo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EngoEngine/engo/git/refs{/sha}","trees_url":"https://api.github.com/repos/EngoEngine/engo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EngoEngine/engo/statuses/{sha}","languages_url":"https://api.github.com/repos/EngoEngine/engo/languages","stargazers_url":"https://api.github.com/repos/EngoEngine/engo/stargazers","contributors_url":"https://api.github.com/repos/EngoEngine/engo/contributors","subscribers_url":"https://api.github.com/repos/EngoEngine/engo/subscribers","subscription_url":"https://api.github.com/repos/EngoEngine/engo/subscription","commits_url":"https://api.github.com/repos/EngoEngine/engo/commits{/sha}","git_commits_url":"https://api.github.com/repos/EngoEngine/engo/git/commits{/sha}","comments_url":"https://api.github.com/repos/EngoEngine/engo/comments{/number}","issue_comment_url":"https://api.github.com/repos/EngoEngine/engo/issues/comments{/number}","contents_url":"https://api.github.com/repos/EngoEngine/engo/contents/{+path}","compare_url":"https://api.github.com/repos/EngoEngine/engo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EngoEngine/engo/merges","archive_url":"https://api.github.com/repos/EngoEngine/engo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EngoEngine/engo/downloads","issues_url":"https://api.github.com/repos/EngoEngine/engo/issues{/number}","pulls_url":"https://api.github.com/repos/EngoEngine/engo/pulls{/number}","milestones_url":"https://api.github.com/repos/EngoEngine/engo/milestones{/number}","notifications_url":"https://api.github.com/repos/EngoEngine/engo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EngoEngine/engo/labels{/name}","releases_url":"https://api.github.com/repos/EngoEngine/engo/releases{/id}","deployments_url":"https://api.github.com/repos/EngoEngine/engo/deployments","created_at":"2014-11-12T05:50:03Z","updated_at":"2017-12-13T14:08:30Z","pushed_at":"2017-12-14T03:19:19Z","git_url":"git://github.com/EngoEngine/engo.git","ssh_url":"git@github.com:EngoEngine/engo.git","clone_url":"https://github.com/EngoEngine/engo.git","svn_url":"https://github.com/EngoEngine/engo","homepage":"https://engo.io","size":8859,"stargazers_count":693,"watchers_count":693,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":67,"mirror_url":null,"archived":false,"open_issues_count":62,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":67,"open_issues":62,"watchers":693,"default_branch":"master"}},"base":{"label":"EngoEngine:master","ref":"master","sha":"9a8b80c0e3bee1e3411ee832afbe221e72e5f337","user":{"login":"EngoEngine","id":18199841,"avatar_url":"https://avatars1.githubusercontent.com/u/18199841?v=4","gravatar_id":"","url":"https://api.github.com/users/EngoEngine","html_url":"https://github.com/EngoEngine","followers_url":"https://api.github.com/users/EngoEngine/followers","following_url":"https://api.github.com/users/EngoEngine/following{/other_user}","gists_url":"https://api.github.com/users/EngoEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/EngoEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EngoEngine/subscriptions","organizations_url":"https://api.github.com/users/EngoEngine/orgs","repos_url":"https://api.github.com/users/EngoEngine/repos","events_url":"https://api.github.com/users/EngoEngine/events{/privacy}","received_events_url":"https://api.github.com/users/EngoEngine/received_events","type":"Organization","site_admin":false},"repo":{"id":26521386,"name":"engo","full_name":"EngoEngine/engo","owner":{"login":"EngoEngine","id":18199841,"avatar_url":"https://avatars1.githubusercontent.com/u/18199841?v=4","gravatar_id":"","url":"https://api.github.com/users/EngoEngine","html_url":"https://github.com/EngoEngine","followers_url":"https://api.github.com/users/EngoEngine/followers","following_url":"https://api.github.com/users/EngoEngine/following{/other_user}","gists_url":"https://api.github.com/users/EngoEngine/gists{/gist_id}","starred_url":"https://api.github.com/users/EngoEngine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EngoEngine/subscriptions","organizations_url":"https://api.github.com/users/EngoEngine/orgs","repos_url":"https://api.github.com/users/EngoEngine/repos","events_url":"https://api.github.com/users/EngoEngine/events{/privacy}","received_events_url":"https://api.github.com/users/EngoEngine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EngoEngine/engo","description":"Engo is an open-source 2D game engine written in Go.","fork":false,"url":"https://api.github.com/repos/EngoEngine/engo","forks_url":"https://api.github.com/repos/EngoEngine/engo/forks","keys_url":"https://api.github.com/repos/EngoEngine/engo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EngoEngine/engo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EngoEngine/engo/teams","hooks_url":"https://api.github.com/repos/EngoEngine/engo/hooks","issue_events_url":"https://api.github.com/repos/EngoEngine/engo/issues/events{/number}","events_url":"https://api.github.com/repos/EngoEngine/engo/events","assignees_url":"https://api.github.com/repos/EngoEngine/engo/assignees{/user}","branches_url":"https://api.github.com/repos/EngoEngine/engo/branches{/branch}","tags_url":"https://api.github.com/repos/EngoEngine/engo/tags","blobs_url":"https://api.github.com/repos/EngoEngine/engo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EngoEngine/engo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EngoEngine/engo/git/refs{/sha}","trees_url":"https://api.github.com/repos/EngoEngine/engo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EngoEngine/engo/statuses/{sha}","languages_url":"https://api.github.com/repos/EngoEngine/engo/languages","stargazers_url":"https://api.github.com/repos/EngoEngine/engo/stargazers","contributors_url":"https://api.github.com/repos/EngoEngine/engo/contributors","subscribers_url":"https://api.github.com/repos/EngoEngine/engo/subscribers","subscription_url":"https://api.github.com/repos/EngoEngine/engo/subscription","commits_url":"https://api.github.com/repos/EngoEngine/engo/commits{/sha}","git_commits_url":"https://api.github.com/repos/EngoEngine/engo/git/commits{/sha}","comments_url":"https://api.github.com/repos/EngoEngine/engo/comments{/number}","issue_comment_url":"https://api.github.com/repos/EngoEngine/engo/issues/comments{/number}","contents_url":"https://api.github.com/repos/EngoEngine/engo/contents/{+path}","compare_url":"https://api.github.com/repos/EngoEngine/engo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EngoEngine/engo/merges","archive_url":"https://api.github.com/repos/EngoEngine/engo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EngoEngine/engo/downloads","issues_url":"https://api.github.com/repos/EngoEngine/engo/issues{/number}","pulls_url":"https://api.github.com/repos/EngoEngine/engo/pulls{/number}","milestones_url":"https://api.github.com/repos/EngoEngine/engo/milestones{/number}","notifications_url":"https://api.github.com/repos/EngoEngine/engo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EngoEngine/engo/labels{/name}","releases_url":"https://api.github.com/repos/EngoEngine/engo/releases{/id}","deployments_url":"https://api.github.com/repos/EngoEngine/engo/deployments","created_at":"2014-11-12T05:50:03Z","updated_at":"2017-12-13T14:08:30Z","pushed_at":"2017-12-14T03:19:19Z","git_url":"git://github.com/EngoEngine/engo.git","ssh_url":"git@github.com:EngoEngine/engo.git","clone_url":"https://github.com/EngoEngine/engo.git","svn_url":"https://github.com/EngoEngine/engo","homepage":"https://engo.io","size":8859,"stargazers_count":693,"watchers_count":693,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":67,"mirror_url":null,"archived":false,"open_issues_count":62,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":67,"open_issues":62,"watchers":693,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EngoEngine/engo/pulls/481"},"html":{"href":"https://github.com/EngoEngine/engo/pull/481"},"issue":{"href":"https://api.github.com/repos/EngoEngine/engo/issues/481"},"comments":{"href":"https://api.github.com/repos/EngoEngine/engo/issues/481/comments"},"review_comments":{"href":"https://api.github.com/repos/EngoEngine/engo/pulls/481/comments"},"review_comment":{"href":"https://api.github.com/repos/EngoEngine/engo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EngoEngine/engo/pulls/481/commits"},"statuses":{"href":"https://api.github.com/repos/EngoEngine/engo/statuses/c8667d6cb7fa2ba246e73cd9c0ca60aa10aadfe1"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Noofbiz"}}