Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

feat: Support PIXI v5 #88

Merged
merged 6 commits into from
Jan 24, 2020
Merged

feat: Support PIXI v5 #88

merged 6 commits into from
Jan 24, 2020

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Jan 16, 2020

Closes #83

I took over PR #79 by @motla, because I really need PIXI5 support.

motla and others added 3 commits January 16, 2020 22:23
Adds compatibility for PIXI v5 as PIXI.BaseTexture.realWidth and PIXI.BaseTexture.realHeight are now getters (read-only).
@exoego
Copy link
Contributor Author

exoego commented Jan 16, 2020

@tleunen

It seems that build succeeded, then some test fails

large (2048x2048) Error: Error: Error rendering "Basic example":
  WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.
    at /root/project/node_modules/happo-target-firefox/lib/index.js:49:19
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

in https://circleci.com/gh/tleunen/pixi-multistyle-text/86?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

It looks like PIXI5 now use WebGL and drop canvas2d by default.

Do you have any idea to resolve this?

@themoonrat
Copy link

Some test environments do not have WebGL support.
In v4, PixiJS supported bother canvas and WebGL out of the box
For v5, regular PixiJS supports WebGL, but only the legacy builds includes Canvas support.

Should be a case of switching over unit tests to rely and use pixi-legacy.js rather than pixi.js

@exoego
Copy link
Contributor Author

exoego commented Jan 16, 2020

Is it OK to switch from pixi.js to pixi.js-legacy ?
Or, is it possible to use pixi.js-legacy only on test ?

@themoonrat
Copy link

The only reason it exists as a dev dependency is for the unit tests, I believe, so I think it'll be fine to switch.

@tleunen
Copy link
Owner

tleunen commented Jan 16, 2020

You probably want to update this line too

'node_modules/pixi.js/dist/pixi.js',

@tleunen
Copy link
Owner

tleunen commented Jan 16, 2020

cc @blurymind Mind taking a look as well? I think you want to keep v4 compatibility for a bit until Gdevelop moves to v5?

We can also decide to only support v5 going forward and release a major version.

@exoego
Copy link
Contributor Author

exoego commented Jan 16, 2020

OK, now CI is green.

@blurymind
Copy link
Contributor

blurymind commented Jan 17, 2020 via email

@yev-stash
Copy link

Hi guys, can you please push this version to npm?

@tleunen
Copy link
Owner

tleunen commented Jan 24, 2020

I'm going to merge it and release a version.

What's going to happen to Pixi with canvas support? Are they dropping it?

Copy link
Owner

@tleunen tleunen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit! Thank you @exoego

@tleunen tleunen changed the title Add PIXI5 support and drop PIXI4 feat: Support PIXI v5 Jan 24, 2020
@tleunen tleunen merged commit eee5534 into tleunen:master Jan 24, 2020
@blurymind
Copy link
Contributor

@4ian the pixi-multistyle library now supports pixi5, so it wont be a problem when updating GD to 5 :)

@4ian
Copy link

4ian commented Jan 24, 2020

Great! We should get started with the migration to Pixi 5 on GDevelop then :)

@exoego exoego deleted the pixi5-support branch January 24, 2020 22:20
@Bouh
Copy link

Bouh commented Aug 1, 2020

Will there be support for bitmapText from pixi v5 ?

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

Successfully merging this pull request may close these issues.

Do you plan to make it compatible with Pixi 5?
8 participants