Skip to content
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

lineWidth of grid game object not working on WebGL mode #7029

Open
AlvaroNeuronup opened this issue Feb 4, 2025 · 0 comments
Open

lineWidth of grid game object not working on WebGL mode #7029

AlvaroNeuronup opened this issue Feb 4, 2025 · 0 comments

Comments

@AlvaroNeuronup
Copy link

Version 3.86.0

  • Browser: Tested on edge, chrome.

Description

Grid object lineWidth only works on Phaser.Canvas.
Expected behaviour: Both modes must show the same result.

Example Test Code

class MainScene extends Phaser.Scene {

    constructor() {
        super({ key: "MainScene" });
    }

    create() {
       const grid = this.add.grid(200, 200, 200, 200, 40, 40, 0xff00ff, 0.2, 0xff0000);
       grid.lineWidth = 10; // Only works on CANVAS
    }
}

const game = new Phaser.Game({
    type: Phaser.WEBGL, // Phaser.CANVAS
    width: 800,
    height: 800,
    backgroundColor: '#ffffff',
    scale: {
        mode: Phaser.Scale.FIT,
        autoCenter: Phaser.Scale.CENTER_BOTH
    },
    scene: [ MainScene ]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant