-
Notifications
You must be signed in to change notification settings - Fork 853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIXI.utils.TextCache
instead of PIXI.loader.resource
?
#62
Comments
I'm interested in the answer too. @kittykatattack What is the difference between usage of Thanks in advance. |
I found something (loader.js#L74-L83) in PIXI's source code, the Then I found the loader of PIXI extends from englercj/resource-loader, this line (Loader.js#L389-L401) means that everything you have loaded will be destroyed once you call In a word, Update 1: Sometimes I have to call Update 2: After some searching, I found I was wrong in some words, see the reply below. |
@RexSkz Thanks for the explanation. But why the Pixi’s development team recommends use |
@ova2 I did some searching, maybe (or maybe not) you're talking about this article. The developer shows that PIXI provides two ways to load images: So I come to a conclusion:
|
@ova2 Go ahead and use TextureCache, it's fine! 😄 |
Thanks for your answers, guys. @kittykatattack I just bought your PIXI book. It's amazing :-) Do you plan a second edition with last changes and more content? I know API is almost the same, but some advanced content like WebGL Shaders would be great to have in the book. |
@ova2 Thanks! I I don't have plans for a second edition yet - but maybe when Pixi v5 stabilizes. |
I thought every texture that Pixi create, will be stored in PIXI.utils.TextCache. But as use
PIXI.loader
, Pixi’s development team recommends usePIXI.loader.resources
.I am confused aboute it. So, I make a demo:
I found that
PIXI.utils.TextCache
works well。Can I always use
PIXI.utils.TextCache
instead ofPIXI.loader.resource
.The text was updated successfully, but these errors were encountered: