Jump to content

Benefit to reloading texture after error?


DungeonDame
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...