Jump to content

Moving from 4.0.1 to 4.5.6


botmaster
 Share

Recommended Posts

I have an extensive framework built on top of pixijs 4.0.1 (mostly using composition) that we use with many of our apps but now I'd like to update to 4.5.6 and not much between both is compatible as far as I can tell. I'll probably have to go class by class and fix/update everything as I go and kinda hope everything will work at the end but I was wondering if any of you guys have some pointers as to which areas of pixi framework are fairly compatible and which are not (might save me some time).

On another note I got the ts definition for 4.5.6 here: https://github.com/pixijs/pixi-typescript and I get some errors in visual studio on that line: 

type UniformDataMap<U> = {[K in keyof U]: UniformData<U[K]>};

 

declarations/pixi.js.d.ts(1288,43): error TS1005: ']' expected.
declarations/pixi.js.d.ts(1288,44): error TS1005: ';' expected.
declarations/pixi.js.d.ts(1288,45): error TS1128: Declaration or statement expected.
declarations/pixi.js.d.ts(1288,61): error TS1005: ']' expected.
declarations/pixi.js.d.ts(1288,62): error TS1005: ',' expected.
declarations/pixi.js.d.ts(1288,64): error TS1005: '(' expected.
declarations/pixi.js.d.ts(3520,1): error TS1128: Declaration or statement expected.
 
 
 
 
Link to comment
Share on other sites

I "fixed" the pixi.js.d.ts by commenting out this and changing 'object' to 'Object', not great I know

 

//type UniformDataMap<U> = {[K in keyof U]: UniformData<U[K]>};
export class Filter<U extends Object> {
//constructor(vertexSrc?: string, fragmentSrc?: string, uniforms?: UniformDataMap<U>);
//protected uniformData: UniformDataMap<U>;

 

Link to comment
Share on other sites

It's a framework that mirrors flash major packages (events, display,  net, ect ...) bpixijs objects are used with composition in all classes, so in theory any engine can be plugged to the framework with a bit of work. It's easy to fix what's missing/not working anymore, what's harder is integrate new pixi features to replace old workarounds of what was missing in 4.0.1 since I have to discover them.

Link to comment
Share on other sites

We convert our as3 code to typescript (in house converter) so all flash packages/classes have to match and we end up with a html5 and flash app from the same code. Now I noticed (with pixi 4.0.1) the android support is spotty but with 4.5.6 I couldn't find one android device that couldn't run it thus the need to update.

So far the biggest work seem to be with the event system and text since those are very different but I also see they are a lot better.

Link to comment
Share on other sites

We didn't integrate 3D as we never use it here (so far) but our typescript/flash is 234 classes, bunch in display, media (simulate Sound API), net, events, and the whole Timer thing which we might change and base on the ticker.add instead. It's not a lot of classes since we only did what we needed. But our base as3 code outputs to Desktop, Ios, Android and Web so we needed to get a html5 engine in the mix. Here a little video I made to show the system on the adobe forums.

 

Link to comment
Share on other sites

How exactly proprietary is your product? Is there a website about it?

I'm using sources for Haxe openfl and Shumway to create separate stage tree that can use the same renderer as pixi. Whole app that is using it has ~10MB of code, its several thousands of classes.

For UI its flash tree, but the field is different: its a tree that is faster both PIXI and flash, has pixel-perfect interaction with animations, and can work on old Indel GMA3000:

 

Link to comment
Share on other sites

We actually implemented "int" and "uint" in typescript using transforms, so now we have new script language in the middle: TS with some extra types :)

I was hysterical when we made those type definitions:

class Fake1 { } 
class Fake2 { }

type int = number & Fake1;
type uint = number & Fake2;

var x: int;
x = 0;
var y = x; //type of y is "int"

 

Link to comment
Share on other sites

I need to look into the Vector stuff then, I auto convert to T[] which is not bad but you are giving ideas for later. My company has very low testing budget so I won't extend on this .... 

The true one thing I don't directly handle in converting is XML, so I handle this case by case but I pushed long ago for the use of JSON and web services and that paid off when converting to typescript cos XML is a big pain.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...