Jump to content

Pixel Perfect render issue in Chrome


cruzlutor
 Share

Recommended Posts

Hey guys, I'm making a couple of tests with Phaser3 and pixel art, but in Chrome it does not work well.

[Chrome | Edge], is the same code, but as you can see in Chrome the sprite looks bad when it moves.

Here is the code

// Game Config
const config = {
  width: window.innerWidth,
  height: window.innerHeight,
  pixelArt: true,
  roundPixels: false,
  antialias: false,
  backgroundColor: 0xffffff,
  scene: MainScene
};


// Main Scene
export class MainScene extends Phaser.Scene {
  constructor() {
    super({
      key: 'MainScene'
    });
  }

  preload() {
    this.load.image('player', '/assets/player.png');
  }

  create() {
    this.player = this.add.image(50, 70, 'player');
    this.player.setScale(4);
    const tweendata = {
      targets: this.player,
      x: this.player.x + 100,
      duration: 10000,
    }

    const tw = this.tweens.add(tweendata);
  }
}

Do you guys know how to fix this? 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...