{"action":"closed","issue":{"url":"https://api.github.com/repos/jdotrjs/phaser3-nineslice/issues/6","repository_url":"https://api.github.com/repos/jdotrjs/phaser3-nineslice","labels_url":"https://api.github.com/repos/jdotrjs/phaser3-nineslice/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/jdotrjs/phaser3-nineslice/issues/6/comments","events_url":"https://api.github.com/repos/jdotrjs/phaser3-nineslice/issues/6/events","html_url":"https://github.com/jdotrjs/phaser3-nineslice/issues/6","id":336487100,"node_id":"MDU6SXNzdWUzMzY0ODcxMDA=","number":6,"title":"Should perform some kind of namespacing on frame generation","user":{"login":"jdotrjs","id":37101247,"node_id":"MDQ6VXNlcjM3MTAxMjQ3","avatar_url":"https://avatars0.githubusercontent.com/u/37101247?v=4","gravatar_id":"","url":"https://api.github.com/users/jdotrjs","html_url":"https://github.com/jdotrjs","followers_url":"https://api.github.com/users/jdotrjs/followers","following_url":"https://api.github.com/users/jdotrjs/following{/other_user}","gists_url":"https://api.github.com/users/jdotrjs/gists{/gist_id}","starred_url":"https://api.github.com/users/jdotrjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdotrjs/subscriptions","organizations_url":"https://api.github.com/users/jdotrjs/orgs","repos_url":"https://api.github.com/users/jdotrjs/repos","events_url":"https://api.github.com/users/jdotrjs/events{/privacy}","received_events_url":"https://api.github.com/users/jdotrjs/received_events","type":"User","site_admin":false},"labels":[{"id":968308576,"node_id":"MDU6TGFiZWw5NjgzMDg1NzY=","url":"https://api.github.com/repos/jdotrjs/phaser3-nineslice/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":968308578,"node_id":"MDU6TGFiZWw5NjgzMDg1Nzg=","url":"https://api.github.com/repos/jdotrjs/phaser3-nineslice/labels/good%20first%20issue","name":"good first issue","color":"7057ff","default":true}],"state":"closed","locked":false,"assignee":{"login":"jdotrjs","id":37101247,"node_id":"MDQ6VXNlcjM3MTAxMjQ3","avatar_url":"https://avatars0.githubusercontent.com/u/37101247?v=4","gravatar_id":"","url":"https://api.github.com/users/jdotrjs","html_url":"https://github.com/jdotrjs","followers_url":"https://api.github.com/users/jdotrjs/followers","following_url":"https://api.github.com/users/jdotrjs/following{/other_user}","gists_url":"https://api.github.com/users/jdotrjs/gists{/gist_id}","starred_url":"https://api.github.com/users/jdotrjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdotrjs/subscriptions","organizations_url":"https://api.github.com/users/jdotrjs/orgs","repos_url":"https://api.github.com/users/jdotrjs/repos","events_url":"https://api.github.com/users/jdotrjs/events{/privacy}","received_events_url":"https://api.github.com/users/jdotrjs/received_events","type":"User","site_admin":false},"assignees":[{"login":"jdotrjs","id":37101247,"node_id":"MDQ6VXNlcjM3MTAxMjQ3","avatar_url":"https://avatars0.githubusercontent.com/u/37101247?v=4","gravatar_id":"","url":"https://api.github.com/users/jdotrjs","html_url":"https://github.com/jdotrjs","followers_url":"https://api.github.com/users/jdotrjs/followers","following_url":"https://api.github.com/users/jdotrjs/following{/other_user}","gists_url":"https://api.github.com/users/jdotrjs/gists{/gist_id}","starred_url":"https://api.github.com/users/jdotrjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdotrjs/subscriptions","organizations_url":"https://api.github.com/users/jdotrjs/orgs","repos_url":"https://api.github.com/users/jdotrjs/repos","events_url":"https://api.github.com/users/jdotrjs/events{/privacy}","received_events_url":"https://api.github.com/users/jdotrjs/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-28T06:17:28Z","updated_at":"2018-07-22T00:02:34Z","closed_at":"2018-07-22T00:02:34Z","author_association":"OWNER","body":"Currently creation of the slices for your image are named totally reasonable things that could collide with existing keys in an atlas (`NineSlice.js # initFrames`):\r\n\r\n```javascript\r\n    const addFrame = (name, x, y, w, h) => {\r\n      if (!tex.has(name)) {\r\n        tex.add(name, 0, texX + x, texY + y, w, h)\r\n      }\r\n    }\r\n\r\n    ...\r\n\r\n    addFrame('topLeft', ...)\r\n    addFrame('topRight', ...)\r\n    addFrame('bottomRight', ...)\r\n    addFrame('bottomLeft', ...)\r\n    addFrame('topMiddle', ...)\r\n    addFrame('bottomMiddle', ...)\r\n    addFrame('leftMiddle', ...)\r\n    addFrame('rightMiddle', ...)\r\n    addFrame('center', ...)\r\n```\r\n\r\nIf this happens you can see that we won't overwrite the existing frame but it would result in some weird behaviors. I'm not super concerned but at some point it will be problematic, e.g., if two dialog frame source images live in the same sprite-packed image.\r\n\r\nWe then later directly reference these frames (`NineSlice.js # draw`):\r\n\r\n```javascript\r\n    draw(frame.center, ...)\r\n    draw(frame.topMiddle, ...)\r\n    draw(frame.bottomMiddle, ...)\r\n    draw(frame.leftMiddle, ...)\r\n    draw(frame.rightMiddle, ...)\r\n    // etc\r\n```\r\n\r\nAnyway. This will eventually be a problem and we should fix it by using a derived namespace (probably off the source frame name or, optionally, provided in config)."}}
{"actor":{"display_login":"jdotrjs"}}