{"action":"created","issue":{"url":"https://api.github.com/repos/gamelab/kiwi.js/issues/251","repository_url":"https://api.github.com/repos/gamelab/kiwi.js","labels_url":"https://api.github.com/repos/gamelab/kiwi.js/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/gamelab/kiwi.js/issues/251/comments","events_url":"https://api.github.com/repos/gamelab/kiwi.js/issues/251/events","html_url":"https://github.com/gamelab/kiwi.js/issues/251","id":142194422,"number":251,"title":"TextField Box component doesn't account for alignment","user":{"login":"BenjaminDRichards","id":4408552,"avatar_url":"https://avatars.githubusercontent.com/u/4408552?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjaminDRichards","html_url":"https://github.com/BenjaminDRichards","followers_url":"https://api.github.com/users/BenjaminDRichards/followers","following_url":"https://api.github.com/users/BenjaminDRichards/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminDRichards/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminDRichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminDRichards/subscriptions","organizations_url":"https://api.github.com/users/BenjaminDRichards/orgs","repos_url":"https://api.github.com/users/BenjaminDRichards/repos","events_url":"https://api.github.com/users/BenjaminDRichards/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminDRichards/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gamelab/kiwi.js/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/gamelab/kiwi.js/milestones/11","html_url":"https://github.com/gamelab/kiwi.js/milestones/1.4.1","labels_url":"https://api.github.com/repos/gamelab/kiwi.js/milestones/11/labels","id":1431688,"number":11,"title":"1.4.1","description":"","creator":{"login":"BenjaminHarding","id":3475810,"avatar_url":"https://avatars.githubusercontent.com/u/3475810?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjaminHarding","html_url":"https://github.com/BenjaminHarding","followers_url":"https://api.github.com/users/BenjaminHarding/followers","following_url":"https://api.github.com/users/BenjaminHarding/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminHarding/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminHarding/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminHarding/subscriptions","organizations_url":"https://api.github.com/users/BenjaminHarding/orgs","repos_url":"https://api.github.com/users/BenjaminHarding/repos","events_url":"https://api.github.com/users/BenjaminHarding/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminHarding/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":19,"state":"open","created_at":"2015-11-26T20:45:07Z","updated_at":"2016-03-24T02:02:00Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-03-20T19:16:37Z","updated_at":"2016-03-24T02:02:00Z","closed_at":"2016-03-24T02:02:00Z","body":"It appears that the `worldBounds`, and presumably other, properties of a Box on a TextField do not properly account for non-LEFT alignments. This is likely because TextField applies alignment relative to the texture origin.\r\n\r\nI think we can fix this by generating a non-origin-centered hitbox."},"comment":{"url":"https://api.github.com/repos/gamelab/kiwi.js/issues/comments/200613574","html_url":"https://github.com/gamelab/kiwi.js/issues/251#issuecomment-200613574","issue_url":"https://api.github.com/repos/gamelab/kiwi.js/issues/251","id":200613574,"user":{"login":"BenjaminDRichards","id":4408552,"avatar_url":"https://avatars.githubusercontent.com/u/4408552?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjaminDRichards","html_url":"https://github.com/BenjaminDRichards","followers_url":"https://api.github.com/users/BenjaminDRichards/followers","following_url":"https://api.github.com/users/BenjaminDRichards/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminDRichards/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminDRichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminDRichards/subscriptions","organizations_url":"https://api.github.com/users/BenjaminDRichards/orgs","repos_url":"https://api.github.com/users/BenjaminDRichards/repos","events_url":"https://api.github.com/users/BenjaminDRichards/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminDRichards/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T02:02:00Z","updated_at":"2016-03-24T02:02:00Z","body":"Addendum to previous:\r\n\r\nIt seems to be just the bounds properties that are affected. The hitbox is explicitly managed during text rendering.\r\n\r\nBounds are generated on access from the entity's own position and dimensions. There is no opportunity to modify static data, because it doesn't exist.\r\n\r\nI don't think that it's worth changing the whole meaning of bounds just to accommodate a special case. We also have particles, which don't exist within a width/height box at all; text is simply a visual phenomenon that defies box categorization. The hitbox works fine, although you won't be able to do both a custom hitbox and a default bound check.\r\n\r\nLong story short: Use hitbox."}}