Pixi.js: potential bug in src/core/math/Matrix.toArray ?

Created on 3 Jul 2017  路  6Comments  路  Source: pixijs/pixi.js

looking at fromArray(): https://github.com/pixijs/pixi.js/blob/dev/src/core/math/Matrix.js#L76-#L83

the array structure is [a, b, tx, c, d, ty]

looking at toArray() https://github.com/pixijs/pixi.js/blob/dev/src/core/math/Matrix.js#L140-#L148

for this non-transposed case, why is the array ordering different?

Most helpful comment

We should probably deprecate that toArray() method. Would welcome a PR for that.

All 6 comments

No idea...

Pretty sure we don't use fromArray() or toArray(false) anywhere in the lib so they may just be hold overs from previous versions.

prior to submitting this issue I grep'd the code to see if toArray() is ever called with false. It's not. That's what led me to believe this could be a bug...given how fundamental the matrix module is I'd figure this would have been surfaced by now if it were used in the engine in any significant way.

Still, this might be worth investigating/fixing since the Matrix module is documented in the public interface, so someone might use it.

We should probably deprecate that toArray() method. Would welcome a PR for that.

Sounds like we're not clear there's a bug with the code. Closing.

I removed these in v5, but feel free to PR v4 with the changes you think are appropriate!

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

Darker picture Darker  路  3Comments

samueller picture samueller  路  3Comments

neciszhang picture neciszhang  路  3Comments

YuryKuvetski picture YuryKuvetski  路  3Comments

distinctdan picture distinctdan  路  3Comments