DungeonDame Posted May 15, 2019 Share Posted May 15, 2019 I noticed in PIXI.loaders.Loader you can set an error handler like loader.on('error', func); and I was wondering what practical applications this has, other than handling the edge case where a user's internet cuts in and out in a precise timeframe. I'm storing my textures on AWS file hosting, so if I attempt to load a texture and it returns an error, I'm assuming the user's internet connection is faulty (Amazon's servers should never be down). Therefore attempting to reload the texture would be pointless, right? Is there any practical benefit to implementing reloading of textures using the error handler when I store textures on AWS? Would anyone recommend I do it? Thanks Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 15, 2019 Share Posted May 15, 2019 its not an edge case, sometimes just one resource can fail, depends on what server or service do you use. If its a problem for your users, make a fallback, for example you can start downloading everything again pxlatedtraveler and DungeonDame 2 Quote Link to comment Share on other sites More sharing options...
DungeonDame Posted May 15, 2019 Author Share Posted May 15, 2019 1 hour ago, ivan.popelyshev said: its not an edge case, sometimes just one resource can fail, depends on what server or service do you use. If its a problem for your users, make a fallback, for example you can start downloading everything again Good to know that's it's not an edge case, I assumed so because I've never seen a resource fail during testing. I guess those that fail I will queue up to load again at the end, so there's a delay between it failing and it reloading. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.