PhaserEditor2D / PhaserEditor

A friendly IDE to develop HTML5 games based on the Phaser framework.
https://phasereditor2d.com
Eclipse Public License 1.0
327 stars 45 forks source link

Images are blury #154

Closed Marchiuzzz closed 3 years ago

Marchiuzzz commented 3 years ago

Version

Description

When I run the game in Phaser editor all of my images appear to very blurry while in the editor they seem crisp. Why is that? This is the default setup, all I did was add a few images to the scene image

Possible solution

PhaserEditor2D commented 3 years ago

The scene editor enables the pixelArt flag. You should do the same in your game config:

https://labs.phaser.io/edit.html?src=src/game%20config/pixel%20art%20mode.js&v=3.52.0


const config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    parent: 'phaser-example',
    pixelArt: true, // look here
    scene: [ Example ]
};

const game = new Phaser.Game(config);
Marchiuzzz commented 3 years ago

Yup, that was it. Thank you very much!

PhaserEditor2D commented 3 years ago

Welcome! Please, keep in contact :)