Pixi.js: Migration guide v3->v4

Created on 26 Aug 2016  路  7Comments  路  Source: pixijs/pixi.js

texture.baseTexture.wrapMode=PIXI.WRAP_MODES.REPEAT;
  • For filters , you have to use mappedMatrix to convert textureCoord to mapCoord, all because of paddings and pow2. Also, use filterClamp uniform to prevent bad things on edges (inputCoord.xy, filterClamp.xy, filterClamp.zw) : http://www.html5gamedevs.com/topic/24347-weird-filterareas-size-on-v4/ , displacement and blur are good examples for that
  • if you had that piece of code somewhere, remove it. In most cases, pixi-display plugin might be able to help you.
s.position = myPoint; // COPYING ASSIGNMENT! in v3 that was reference
s2.position = myPoint; //shadow sprite , same coord
myPoint.x = 10; //wont work. ha-ha

s.anchor = myPoint ; // DONT do that please! we will fix it later
  • https://github.com/pixijs/pixi.js/issues/2859 - YEAH, font is deprecated use font-family and all that
  • TilingSprite works bad with mipmap, and pow2 textures are mipmapped by default. We will fix that issue later, for now just
texture.baseTexture.mipmap=false;

Most helpful comment

Would we move this to a Wiki page instead of an Issue?

All 7 comments

Thanks for that @ivanpopelyshev ! To all - if you find anything els please feel free to add it here. I think we have most bases covered at this point! 馃憤

Would we move this to a Wiki page instead of an Issue?

Is Pixi4 actually not understanding comments in shaders source code ?
The new system finds uniforms even when they are commented out...

Is Pixi4 actually not understanding comments in shaders source code ?
The new system finds uniforms even when they are commented out...

That is correct, it does not account for comments. You should open a separate bug, and we should not do source parsing and just use the results of the compiled shader instead.

Anyone who find things to add to the guide can add them in the wiki here: https://github.com/pixijs/pixi.js/wiki/Pixi-v4-Migration-Guide

@ivanpopelyshev can you move your stuff to the wiki please?

Closing this for now.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MRVDH picture MRVDH  路  3Comments

zcr1 picture zcr1  路  3Comments

Darker picture Darker  路  3Comments

neciszhang picture neciszhang  路  3Comments

softshape picture softshape  路  3Comments