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

GameObject.Line.setLineWidth() works different between Canvas and WebGL render #6604

Closed
AlvaroNeuronup opened this issue Sep 1, 2023 · 1 comment

Comments

@AlvaroNeuronup
Copy link

Version

  • Phaser Version: 3.60.0

  • Operating system: Windows, Android

  • Browser: Chrome, Firefox, Edge

Description

When i set the configuration to Canvas renderer the lines have its size changed. It looks like the width of the lines is half.
I think the expected behaviour is both renders to work the same.

Example Test Code

class Example extends Phaser.Scene
{

    create ()
    {
        const line = this.add.line(100, 100, 200, 300, 500, 200, 0xff0000);
        line.setLineWidth(40);
    }
       
}

const config = {
    type: Phaser.CANVAS, //Phaser.WEBGL
    width: 800,
    height: 600,
    backgroundColor: '#2d2d2d',
    parent: 'phaser-example',
    scene: Example
};

const game = new Phaser.Game(config);
@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants