Smooth graphics in PhaserJS WebGL

Viewed 100

Drawn graphics in a PhaserJS WebGL setup show these pixelated "stairs like" outlines as shown in the picture. How to get them smooth?

1

Example: https://phaser.io/examples/v3/view/game-objects/graphics/primitives/line-gradient-stroked

var config = {
    width: 800,
    height: 600,
    type: Phaser.WEBGL,
    parent: 'phaser-example',
    scene: {
        create: create
    }
};

var game = new Phaser.Game(config);

function create ()
{
    var graphics = this.add.graphics();

    graphics.lineGradientStyle(128, 0xff0000, 0xff0000, 0x0000ff, 0x0000ff, 1);

    graphics.lineBetween(100, 100, 600, 500);
}
0 Answers
Related