New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix lineStyle+fillStyle drawCalls count #5981
Conversation
This doesn’t make sense to me. Native is a line specific property. It doesn’t make sense to throw it on Fill. Are you sure you’re fixing the right thing here? |
Oh, right, I didnt explain it, sorry :) One big problem: https://github.com/pixijs/pixi.js/blob/dev/packages/graphics/src/GraphicsGeometry.js#L653
|
So fix that case. If native is undefined use false. Don’t change the API to something illogical. |
OK then, do you want me to change those to |
Just don't change LineStyle or FillStyle. It's not fixing the problem, it just creating API confusion. For fills, can you just do |
ok, done |
Codecov Report
@@ Coverage Diff @@
## dev #5981 +/- ##
=======================================
Coverage 70.43% 70.43%
=======================================
Files 208 208
Lines 10516 10516
=======================================
Hits 7407 7407
Misses 3109 3109
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coool 👍
lineStyle never goes into one drawCall with fillStyle if batching is turned off. That means PixiJS just spams drawCalls for graphics! Bug exists even in 5.0.1
Demo has extra feature: it shows wireframe for fills!
Bug, 2 drawcalls: https://www.pixiplayground.com/#/edit/oXRqFpfuva9wwP6B_0V1d
Fixed, 1 drawcall: https://www.pixiplayground.com/#/edit/AjVLQ2NLsXQXM9KrUWCcp