These are chat archives for pixijs/pixi.js

12th
Jul 2016
Daniel
@bitbay
Jul 12 2016 10:52
Hello everyone!
I was wondering about referencing loaded resources (after loading them).
It seems that the "name" (eg, "id") of the resource added to the Pixi loader isn't used anywhere...
and to my surprise the texturecache uses the "url" property as a key and not the "name"
this beats the idea of having "names" or "ids" for the resources
anybody familiar with the logic behind this decision?
or if somebody can help me out with a simple example of how to access the texture saved in the PIXI.utils.TextureCache by its name and not by it's "url" without some extra trips to getters/setters, now that would be really satisfactory as well...
Ivan Popelyshev
@ivanpopelyshev
Jul 12 2016 12:00
please dont use TextureCache
use loaders :)
Daniel
@bitbay
Jul 12 2016 13:23
@ivanpopelyshev any example on what You mean with this?
Ivan Popelyshev
@ivanpopelyshev
Jul 12 2016 13:25
texture cache sucks
it will be deprecated
Daniel
@bitbay
Jul 12 2016 13:27
You mean the loading example?
Ivan Popelyshev
@ivanpopelyshev
Jul 12 2016 13:28
yse
Daniel
@bitbay
Jul 12 2016 13:28
i suppose You mean the
PIXI.loader.resources["images/anyImage.png"].texture
one...
Ivan Popelyshev
@ivanpopelyshev
Jul 12 2016 13:29
no
you can access it by name
if you specified name
Daniel
@bitbay
Jul 12 2016 13:30
that sounds great
by using two params on the PIXI.loader.add() right?
Daniel
@bitbay
Jul 12 2016 14:12
perfect! thanks for the help @ivanpopelyshev