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

setOrigin() has no effect on DynamicBitmapText with Canvas renderer #4108

Closed
garethwhittaker opened this issue Oct 11, 2018 · 1 comment
Closed

Comments

@garethwhittaker
Copy link

garethwhittaker commented Oct 11, 2018

Version

  • Phaser Version: 3.14.0

  • Operating system: MacOS High Sierra

  • Browser: Multiple

Description

I've modified one of the Phaser Labs demo's below to show how an origin applied to a DynamicBitmapText instance has no effect when using renderer type CANVAS. If you change this to WEBGL, then their origins change as expected.

Example Test Code

const config = {
    type: Phaser.CANVAS,
    parent: 'phaser-example',
    scene: {
        preload: preload,
        create: create
    }
};

const game = new Phaser.Game(config);

function preload() {
    this.load.bitmapFont('ice', 'assets/fonts/bitmap/iceicebaby.png', 'assets/fonts/bitmap/iceicebaby.xml');
}

function create() {
    const example1 = this.add.dynamicBitmapText(200, 200, 'ice', '10', 128)
        .setOrigin(0, 0);

    const example2 = this.add.dynamicBitmapText(200, 200, 'ice', '10', 128)
        .setOrigin(0.5, 0.5);

    const example3 = this.add.dynamicBitmapText(200, 200, 'ice', '10', 128)
        .setOrigin(1, 1);
}

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants