{"action":"created","issue":{"url":"https://api.github.com/repos/GoodBoyDigital/pixi.js/issues/1363","labels_url":"https://api.github.com/repos/GoodBoyDigital/pixi.js/issues/1363/labels{/name}","comments_url":"https://api.github.com/repos/GoodBoyDigital/pixi.js/issues/1363/comments","events_url":"https://api.github.com/repos/GoodBoyDigital/pixi.js/issues/1363/events","html_url":"https://github.com/GoodBoyDigital/pixi.js/issues/1363","id":54907529,"number":1363,"title":"when page is not cached wrong position","user":{"login":"DennisSnijder","id":6953846,"avatar_url":"https://avatars.githubusercontent.com/u/6953846?v=3","gravatar_id":"","url":"https://api.github.com/users/DennisSnijder","html_url":"https://github.com/DennisSnijder","followers_url":"https://api.github.com/users/DennisSnijder/followers","following_url":"https://api.github.com/users/DennisSnijder/following{/other_user}","gists_url":"https://api.github.com/users/DennisSnijder/gists{/gist_id}","starred_url":"https://api.github.com/users/DennisSnijder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DennisSnijder/subscriptions","organizations_url":"https://api.github.com/users/DennisSnijder/orgs","repos_url":"https://api.github.com/users/DennisSnijder/repos","events_url":"https://api.github.com/users/DennisSnijder/events{/privacy}","received_events_url":"https://api.github.com/users/DennisSnijder/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoodBoyDigital/pixi.js/labels/need-more-info","name":"need-more-info","color":"5319e7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-20T16:48:07Z","updated_at":"2015-01-20T23:38:25Z","closed_at":"2015-01-20T23:38:25Z","body":"when my page is not cached the positions are messed up\r\n\r\nhttp://dennis-snijder.nl/bomb/\r\n\r\n**Edit** (cengler - 2015/20/1): Removed some raw language."},"comment":{"url":"https://api.github.com/repos/GoodBoyDigital/pixi.js/issues/comments/70757404","html_url":"https://github.com/GoodBoyDigital/pixi.js/issues/1363#issuecomment-70757404","issue_url":"https://api.github.com/repos/GoodBoyDigital/pixi.js/issues/1363","id":70757404,"user":{"login":"englercj","id":944497,"avatar_url":"https://avatars.githubusercontent.com/u/944497?v=3","gravatar_id":"","url":"https://api.github.com/users/englercj","html_url":"https://github.com/englercj","followers_url":"https://api.github.com/users/englercj/followers","following_url":"https://api.github.com/users/englercj/following{/other_user}","gists_url":"https://api.github.com/users/englercj/gists{/gist_id}","starred_url":"https://api.github.com/users/englercj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/englercj/subscriptions","organizations_url":"https://api.github.com/users/englercj/orgs","repos_url":"https://api.github.com/users/englercj/repos","events_url":"https://api.github.com/users/englercj/events{/privacy}","received_events_url":"https://api.github.com/users/englercj/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T23:38:25Z","updated_at":"2015-01-20T23:38:25Z","body":"Looked again and saw you doing this:\r\n\r\n```js\r\npixi.Texture.fromImage('./res/sprites/bom.png');\r\n```\r\n\r\nThis means that if you use that object before it is loaded and try to set position based on width/height of the sprite, there is no way to know how big that sprite will be because the texture hasn't yet loaded.\r\n\r\nEither preload your assets, then use them; or set your sprite positions once the texture has loaded."}}