Closed notboring closed 4 years ago
work in progress:
I need some input on what's still missing or broken on the current pixi 5 externs. Please throw pixi 5 related issues and pull requests at me. Thanks!
Just want to let you know that I did quite some updates on my pixi5 branch lately. I've used it in production (using pixi.js v5.2.1) https://github.com/markknol/pixi-haxe/commits/pixi5 The spine externs are as good as fully up to date now.
I made it haxe 4 only.
Thanks a lot, @markknol. I updated my pixi 5 branch to include all of your changes. The limitation to haxe 4 is fine with me since haxe 4 is mature enough for productive work.
I will merge the pixi 5 branch into the official pixi repository and ofc also create the haxelib release, if nobody else has any suggestions or comments.
How stable and production ready is this and the rest of the master branch?
My branch is stable. I'm using it for our recent games. The spine externs are also up to date to latest. It does require Haxe 4.
Thanks for the response, @markknol. 😸
I'm porting another framework's Pixi-Haxe implementation from v4 to v5 and, so far, it's been a very smooth transition. The code compiles and runs, but I'm getting an Uncaught TypeError: PIXI.Renderer is not a constructor
in the console and nothing is rendering. Any ideas here?
Webpack stuff?
Not that I can tell. It's going straight to the browser and only required changing something like 10 lines of code to compile.
I'm moving from this:
_renderer = Detector.autoDetectRenderer( { view: _canvas }, isLocal || ( _canvas.getAttribute( "forceCanvas" ) == "true" ) );
_renderer.resize( factory.width, factory.height );
to this:
_renderer = new Renderer( { view: _canvas, width: factory.width, height: factory.height });
Renderer is the new pixi.core.renderers.webgl.Renderer
one since the Canvas renderer has been deprecated in v5.
Canvas renderer wasnt deprecated, its just not available in default bundle, how could you write this heresy? Canvas2d is alive and nothing can replace it! :)
Canvas will rule the world of WebGL still. Bwahahah
I solved my issue pretty easily. The pixi.min.js file for the framework wasn't the proper version (so I changed the htm file script to link to 5.2.1 release page) and had to load the pixi-sound plugin there. Then, enabling file system resource loading in my browser allowed for the demo to run. :smile_cat:
@notboring and @markknol, great job on updating this to version 5. Super slick porting process from v4 to v5.
Hello! It seems the haxe externs is missing this pixi API? I cannot found:
Do you mean in my pixi5 branch?
I meant version 4.8.4 of master. (haxelib install pixijs) Is this a new api that isn't in version 4?
So, i will try look pixi5 branch, thanks.
Hello again! Now I'm trying use you pixi5 branch, and i have trouble with overriding methods.
I cannot override width/height properties of pixi.core.display.Container. In source TypeScript code its is getter and setter, not simple variable, as in haxe externs.
How i can extend Container with override his params, for my custom Components?
@notboring thanks do you have an eta for a v5 haxelib push?
The pixi 5 version has been put live on haxelib. If you posted issues/questions here and your issue hasn't resolved yet, please post a seperate issue for it.
These externs need to be updated for pixijs 5. This issue is for updates and comments.
Some of the required changes for v5 are listed here:
https://github.com/pixijs/pixi.js/wiki/v5-Migration-Guide