Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Checking for images already loaded with Loader()


Recommended Posts


I load a bunch of image files into my app with Loader:

let loader = new PIXI.Loader();


The PIXI app is part of a larger HTML application and it may get initiatet and destroyed multiple times. 

My problem is when i load the app the second time i get warnings that the Texture already have en entry:
"Texture added to the cache with an id [images/circle24.png] that already had an entry"

I can see the image is already present in the texture Cahe


But using Loader i would like to get the texture from Loader.resources[], but that one is empty if i dont load it again...?


Link to comment
Share on other sites

20 hours ago, jonforum said:

did you clear before ?


No. That might be the way... 

But whats the purpose of the cache if I have to clear it all the time?

Seem like I can only load cached images when using fromImage() ...

In other words, how do I load cached images when using Loader.resources ?

let texture = PIXI.loader.resources["image"].texture; // does not look in TextureCache


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.

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.


  • Recently Browsing   0 members

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