Hi, how can I maintain the image quality using zoom on phaser? I tryed many ways and nothing seems to work. The code below shows with bitmap and nothing changes.
var config = {
type : Phaser.CANVAS,
parent : 'content',
width : 400,
height : 300,
zoom : 3,
pixelArt : true,
renderer: {
mipmapFilter: 'LINEAR_MIPMAP_NEAREST'
},
physics : {
default : 'arcade',
arcade : {
gravity : { y : 0},
debug : true,
}
},
scene : [
BootScene,
MenuScene,
WorldScene,
/* GameOver*/
]
};
var game = new Phaser.Game(config);
class MenuScene extends Phaser.Scene {
constructor() {
super( { key: 'MenuScene' } );
}
preload() {}
create() {
this.add.image(game.scale.width/ 2, game.scale.height / 2, 'background');
this.menu = this.add.image(game.scale.width/ 2, game.scale.height / 2, 'menu');
this.buttonRestart = this.add.image(game.scale.width/ 2, 100, 'buttonRestart').setDisplaySize(128, 128).setInteractive({ useHandCursor: true });
// this.buttonOptions = this.add.image(160, 200, 'buttonOptions').setScale(0.2).setInteractive({ useHandCursor: true });
// this.buttonHelp = this.add.image(160, 200, 'buttonHelp').setScale(0.2).setInteractive({ useHandCursor: true });
// this.buttonPlay = this.add.image(160, 200, 'buttonPlay').setScale(0.25).setInteractive({ useHandCursor: true });
// // -- click no button
this.buttonRestart.once('pointerdown', function (pointer) {
this.scene.start('WorldScene');
}, this);
}
}