You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StrokePathWebGL (called from PolygonWebGLRenderer when type === Phaser.WEBGL) checks for closePath (here)
A solution which can be found in ArcCanvasRenderer & CurveCanvasRenderer wraps closePath() with a check:
if(src.closePath) {
ctx.closePath();
}
The text was updated successfully, but these errors were encountered:
Thanks for opening this issue, and for submitting a PR to fix it. We have merged your PR into the master branch and attributed the work to you in the Change Log. If you need to tweak the code for whatever reason please submit a new PR.
Version
Description
Phaser.GameObjects.Polygon ignores the
closePath
boolean when GameConfig.type === Phaser.CANVASExample Test Code
https://codepen.io/optimumsuave/pen/abVzweR
Additional Information
I have forked the repo and will be opening a PR.
Problem
PolygonCanvasRenderer always calls
closePath()
- does not check forsrc.closePath
boolean.https://github.com/photonstorm/phaser/blob/master/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js#L59
Solution
StrokePathWebGL (called from PolygonWebGLRenderer when type === Phaser.WEBGL) checks for closePath (here)
A solution which can be found in
ArcCanvasRenderer
&CurveCanvasRenderer
wraps closePath() with a check:The text was updated successfully, but these errors were encountered: