pixi-compressed-textures
pixi-compressed-textures copied to clipboard
Not working with PIXI v5.1.1
Problem starts @ line
CompressedTextureManager.prototype = Object.create(WebGLManager.prototype);
Error : WebGLManager undefined
We dont have v5 compatibility. There was a PR for v5 to add in pixijs itself, but it failed.
I think I'll port this thing next week, is that ok for you?
Later, we'll make BASIS support in v5 itself.
If you cant wait, then you can try to port it yourself through TextureResource API: https://pixijs.io/examples/#/textures/gradient-resource.js
Of course we can wait next week, thanks for your support and dedication.
hi ivanpopelyshev, any progress :) ?
Yo! almost there. Gonna publish it today :)
OK, done, please test it!
Its in dist
folder, or npm 2.0.0
https://pixijs.io/examples/#/plugin-compressed-textures/dds.js
In case you need just basic stuff (load dds), there's a not in README, nothing special has to be done :)
Thank you very much!
Hi , thanks for the update..I'm trying to implement in our game but it never tries to load @2x..only @1x works.
Our export consists of the following structure :
spine.json [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
tried various options for the asset loader in particular
{metadata: {spineMetadata: {choice: ["@2x.png", "@1x.png", "@.5x.png", "@.5x.atlas", "@1x.atlas", "@2x.atlas", ".atlas", ".png"]}}}
The spine object doesn't load if I only specify @2x in the options, it asks for the atlas file (without any @ extension)
This is the code before the assets add method :
var ext = PIXI.compressedTextures.detectExtensions(renderer); this.loader.pre(PIXI.compressedTextures.extensionChooser(ext));
am I missing something ?
Thank you in advance.
Check whats in ext
.
@Senglean ok, i think we broke it,I'm making spine example
@Senglean I think it asks for atlas file without resolution when said resolution is not 0.5 , 1, 2. Like, you opened it on x1.25 or x3 devicePixelRatio. @1x is not our default fallback, I think we need a setting for default fallback setting.
@Senglean
workaround for now: place copy of @1x without that suffix.
@Senglean
OK, can you please test latest version from this repo from dist
folder? Specify [email protected]
instead of spine.json
there.
hello sorry for not following, will test once in office.
right now I'm forcing the resolution with
this.loader.pre(PIXI.compressedTextures.extensionChooser(["@2x.atlas"]));
which is fine for us, but others may encounter problems.
@Senglean I've found the problem and fixed it. The thing is, we have to add @1x in detect list (detectExtensions) even if renderer resolution is not 1, because if its not 1 nor 2 you wont have files, for it, right? Need @1x as a fallback.
Yes, its not obvious, but i dont have any better options :(
Please test it. npm 2.0.4