Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Not working with PIXI v5.1.1 #22

Open
Senglean opened this issue Aug 20, 2019 · 15 comments
Open

Not working with PIXI v5.1.1 #22

Senglean opened this issue Aug 20, 2019 · 15 comments

Comments

@Senglean
Copy link

Problem starts @ line

CompressedTextureManager.prototype = Object.create(WebGLManager.prototype);

Error : WebGLManager undefined

@ivanpopelyshev
Copy link
Contributor

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.

@ivanpopelyshev
Copy link
Contributor

If you cant wait, then you can try to port it yourself through TextureResource API: https://pixijs.io/examples/#/textures/gradient-resource.js

@Senglean
Copy link
Author

Of course we can wait next week, thanks for your support and dedication.

@roblyr
Copy link

roblyr commented Aug 30, 2019

hi ivanpopelyshev, any progress :) ?

@ivanpopelyshev
Copy link
Contributor

Yo! almost there. Gonna publish it today :)

@ivanpopelyshev
Copy link
Contributor

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 :)

@roblyr
Copy link

roblyr commented Sep 1, 2019

Thank you very much!

@Senglean
Copy link
Author

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.

@ivanpopelyshev
Copy link
Contributor

Check whats in ext.

@ivanpopelyshev
Copy link
Contributor

@Senglean ok, i think we broke it,I'm making spine example

@ivanpopelyshev
Copy link
Contributor

ivanpopelyshev commented Sep 19, 2019

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

@ivanpopelyshev
Copy link
Contributor

@Senglean

workaround for now: place copy of @1x without that suffix.

@ivanpopelyshev
Copy link
Contributor

ivanpopelyshev commented Sep 19, 2019

@Senglean

OK, can you please test latest version from this repo from dist folder? Specify [email protected] instead of spine.json there.

@Senglean
Copy link
Author

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.

@ivanpopelyshev
Copy link
Contributor

ivanpopelyshev commented Sep 22, 2019

@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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants