-
Notifications
You must be signed in to change notification settings - Fork 918
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
Upgrade to PixiJS v6 #2447
Upgrade to PixiJS v6 #2447
Conversation
I need to test it and see for fix. |
@@ -0,0 +1,406 @@ | |||
/*! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should use the minified version? We can download the sourcemaps to make debugging easier. (Same for pixi.js)
Idk about how we should add map files if we use minified files
Le sam. 20 mars 2021 à 14:05, Arthur Pacaud ***@***.***> a
écrit :
… ***@***.**** commented on this pull request.
------------------------------
In Extensions/PrimitiveDrawing/pixi-graphics-extras/graphics-extras.js
<#2447 (comment)>:
> @@ -0,0 +1,406 @@
+/*!
Maybe we should use the minified version
***@***.******@***.***/dist/browser/graphics-extras.min.js>
?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2447 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMX4DVFURSZO7PJ46F224LTESMRTANCNFSM4ZNSPW2A>
.
|
I already did the main work in 629adcc, you just need to have the .map file sit next to the normal file and have the same name except for the .map |
Yep let's use the minified version + the .map next to it :) |
Ok I'll do that's tonight
Le sam. 20 mars 2021 à 15:29, Florian Rival ***@***.***> a
écrit :
… Yep let's use the minified version + the .map next to it :)
Btw I put the non minified version for pixi.js just to quickly test and
help if there are crashes, but we can do the same I think.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2447 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMX4DSF6JRC6IRQRMHU4ALTESWLVANCNFSM4ZNSPW2A>
.
|
Fix for texture on bitmapText is out in v6.0.1 🎉 |
Great! 👍 |
Nothing shocked me in the recent patch notes of PixiJS. |
That's good yes if you can take a look at the whole app. We'll also have to update Pixi.js inside the IDE, but if it works for the runtime then it will probably work without a single issue in the IDE, as we use much less features :) |
Awesome! If we can get this "rolling" and merged quickly, we can then merge BitmapText soon after :) |
Thank you I'll check how tilemap is working :) If there are no bugs we can also go ahead with Pixi.js v6 and upgrade to pixi-tilemap v3 later. |
for tilemap, do we still need this hack? |
It's properly integrated now in pixi-tilemap it seems. Speaking of tilemaps, I've tested the two examples and everything seems to be working fine with Pixi.js v6.0.1. So I think we don't need to update to pixi-tilemap v3 directly, we can do this in a separate task :) I've tested a larger game that works well, filters seem all to work as tested by @Bouh, so seems we're good to go? :) |
Then sound good to me! |
We're actually missing one last point: the typings! When upgrading pixi.js in the GDJS/package.json, we have tons of typescript errors, because it seems that types are declared differently and so PIXI is not recognised :/ |
No offense intended but I don't think the last commit is a good solution. Casts to unknown, trying to force pixi types into a namespace by from what I understood patching the original PIXI file and importing pixi many times in the type definition... All of this add a lot of complexity to the code and makes us bypass type checking, which beats the purpose of typescript. Then, I haven't really looked into it so if it is the only way, I guess there is no avoiding this. |
No worries! I'm also not satisfied at having to modify pixi.js to add this global variable - this is really TypeScript running in our way there. I could have added this at some other place but I need to do it immediately after PIXI is defined, so I thought it was the best place. If anything this will help migrating toward modules in the long term rather than using a global PIXI object (i.e: in the future we can replace the Let me know if you think of something better. |
@arthuro555 Let me know if you have time to look at this. Would be great to go ahead with PixiJS v6 soon as it will allow BitmapText to get in, and also it has a performance fix for games on iOS :) |
I took a longer look than I should have, and haven't found a better way. The only other way I found was using this: import * as PIXI from 'pixi.js';
export as namespace PIXI;
export = PIXI; But I didn't manage to extend the namespace with pixi-filters types without crashing the typescript compiler. I guess that having a weird hack is better than losing type coverage on all filters. |
Nice finding though this |
Seems like as soon as you try to use a |
For now just a quick test to see how it works and to get a nightly build generated with it for the runtime.
Probably upgrade pixi-tilemap to v3. See this blog article: http://www.shukantpal.com/blog/pixijs-tilemap-kit-3/ Not necessary for now it seemsWill fix #1991.
Autogenerated testing versions (be careful, please backup your game):