Sign in to follow this  
ewinter

Texture.fromImage callback

Recommended Posts

I am using PIXI's loader currently. Its working alright but one loader can only load one set of images at the time. So when I start loading, I need to wait until it finishes before adding new image urls to load AFAIK?

I would just like simple way for loading images with just callback if success. I have this hassle now with multiple loaders and adding callbacks to them if not loaded yet otherwise return loaded texture.

EDIT: oh looks like .fromImage is deprecated after v5.

Is it possible to make texture from Image() object. Would it be complicated to create own loader that way?

Share this post


Link to post
Share on other sites

Yes, it is possible to create texture from Image() please look closer, I remember that it was easy as passing ImageResource somewhere ...

No, fromImage is still a valid way, it was deprecated because there's "FROM" function now. "Texture.from".

Yes, you can just create one extra loader if you suddenly need to download one more texture.

Share this post


Link to post
Share on other sites
4 minutes ago, ivan.popelyshev said:

Yes, it is possible to create texture from Image() please look closer, I remember that it was easy as passing ImageResource somewhere ...

No, fromImage is still a valid way, it was deprecated because there's "FROM" function now. "Texture.from".

Yes, you can just create one extra loader if you suddenly need to download one more texture.

Okay! So if I wanted, I could load image to Image() object and pass that to Texture.from to create texture from it? Btw would that be syncronous task when Texture.from processes the data from Image()

Thanks for your answer :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.