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
{{ message }}
Repository navigation
lineWidth of grid game object not working on WebGL mode #7029
Grid object lineWidth only works on Phaser.Canvas.
Expected behaviour: Both modes must show the same result.
Example Test Code
classMainSceneextendsPhaser.Scene{constructor(){super({key: "MainScene"});}create(){constgrid=this.add.grid(200,200,200,200,40,40,0xff00ff,0.2,0xff0000);grid.lineWidth=10;// Only works on CANVAS}}constgame=newPhaser.Game({type: Phaser.WEBGL,// Phaser.CANVASwidth: 800,height: 800,backgroundColor: '#ffffff',scale: {mode: Phaser.Scale.FIT,autoCenter: Phaser.Scale.CENTER_BOTH},scene: [MainScene]})
Hi @AlvaroNeuronup. Thanks for submitting this issue. We have fixed this and pushed it to the master branch. It will be part of the next release. Do test it out and let us know if you encounter any issues. Keep in mind the way lineWidth renders in Canvas and WebGL mode is slightly different so the results will differ.
Activity
zekeatchan commentedon Mar 17, 2025
Hi @AlvaroNeuronup. Thanks for submitting this issue. We have fixed this and pushed it to the
masterbranch. It will be part of the next release. Do test it out and let us know if you encounter any issues. Keep in mind the waylineWidthrenders in Canvas and WebGL mode is slightly different so the results will differ.Fix phaserjs#7029. Grid renders lineWidth correctly in WebGL mode.