Skip to content

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

@AlvaroNeuronup

Description

@AlvaroNeuronup

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 ]
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions