{"action":"created","issue":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/2323","labels_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2323/labels{/name}","comments_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2323/comments","events_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2323/events","html_url":"https://github.com/pixijs/pixi.js/issues/2323","id":128817606,"number":2323,"title":"Async loading, not ajax.","user":{"login":"ivanpopelyshev","id":695831,"avatar_url":"https://avatars.githubusercontent.com/u/695831?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanpopelyshev","html_url":"https://github.com/ivanpopelyshev","followers_url":"https://api.github.com/users/ivanpopelyshev/followers","following_url":"https://api.github.com/users/ivanpopelyshev/following{/other_user}","gists_url":"https://api.github.com/users/ivanpopelyshev/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanpopelyshev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanpopelyshev/subscriptions","organizations_url":"https://api.github.com/users/ivanpopelyshev/orgs","repos_url":"https://api.github.com/users/ivanpopelyshev/repos","events_url":"https://api.github.com/users/ivanpopelyshev/events{/privacy}","received_events_url":"https://api.github.com/users/ivanpopelyshev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-26T13:19:19Z","updated_at":"2016-01-26T18:16:56Z","closed_at":null,"body":"Yes, some people need it. I dont understand why. Do you think its better to be added in async loader?\r\n\r\n[Topic on html5gamedevs](http://www.html5gamedevs.com/topic/20128-pixijs-loader-loading-assets-from-sever-path-not-url/)\r\n\r\nCurrent implementation:\r\n\r\n```javascript\r\n//this is for single image\r\n\r\nvar tex = PIXI.Texture.fromCanvas(document.getElementById(\"my_image_id\")); \r\n\r\n//and this will help if you want to track all elements loading process:\r\n\r\nvar pages= [\r\n   PIXI.Texture.fromCanvas(document.getElementById(\"pic1\")),\r\n   PIXI.Texture.fromCanvas(document.getElementById(\"pic2\"))\r\n];\r\nPIXI.utils.async.each(pages, function (page, done) {\r\n                if (page.baseTexture.hasLoaded) {\r\n                    done();\r\n                }\r\n                else {\r\n                    page.baseTexture.once('loaded', done);\r\n                }\r\n            }, complete);\r\n\r\nfunction complete() {\r\n   var tex1 = pages[0];\r\n   var tex2 = pages[1];\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/pixijs/pixi.js/issues/comments/175153069","html_url":"https://github.com/pixijs/pixi.js/issues/2323#issuecomment-175153069","issue_url":"https://api.github.com/repos/pixijs/pixi.js/issues/2323","id":175153069,"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":"2016-01-26T18:16:56Z","updated_at":"2016-01-26T18:16:56Z","body":"The loader doesn't use ajax for images by default, it uses image elements. It would be trivial to allow you to pass in the actual element to do the loading."}}