Starting with 6.5.x, graphics behave differently than before #8623
Labels
📢 Accepting PRs
Would welcome a PR from the community.
🤩 Good First PR
Indicating to new contributors a PR is simple/easy. Things like documentation or type fixes.
I've attached a JS Fiddle to show what can go wrong in existing codebases:
https://jsfiddle.net/awn97mop/9/
The gist of this is, starting with 6.5.x,
PIXI.Graphics
calculate height/width differently than they did before, which I believe is due to this pull request (though I could be wrong about the cause, it feels like a bounds calculation thing!). When graphics are passed a fill of alpha 0 and no line style, they assume the graphics object has a height/width of 0.I'm not suggesting that this be changed, as technically this does make sense to me. But, it did make upgrading to the newest version of PIXI a little frustrating today as I had to figure out what had changed between versions enough to cause this.
I'm putting this out there so that perhaps this can be spread through the official channels, or so that anyone else that decides to upgrade to the latest version and experiences a similar "what happened" moment has a point of reference.
The solution for us was to not use a fill with alpha 0 when there was also no linestyle. Not a complicated solution, and probably better in the longrun.
The text was updated successfully, but these errors were encountered: