cruzlutor

Pixel Perfect render issue in Chrome

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? 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.