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

Notification of Texture Loading


mwatt
 Share

Recommended Posts

Hi all,

 

As the Pixi-based (canvas) project I am working on becomes more mature, I find that my usage of sprites is increasing a lot.   It is reaching the point where I begin to think I will need to do pre-loading, which was not necessary earlier in the project.  The point of this post is to get recommendations on knowing when textures are loaded.

 

I looked in the code and noticed that Pixi is notifying itself when textures are loaded, so it can know when to update.  However, unless I missed it, there is no exposed notification.  Did I miss it?  If not, I need to figure out how best to do this.  I don't want to modify Pixi source, although that would work quite nicely.  I could do a timer-based poling and look at texture properties to discover this information but that seems ungainly.

 

I should add that I am currently loading image by image, not via sprite sheet - and would prefer to keep it that way since some images may be dynamically replaced by the user. 

 

Any suggestions?

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...