Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Disable Antialias in Phaser 3


luschn
 Share

Recommended Posts

In Phaser 2, there was a simple parameter you could set to disable antialiasing/smoothing, but i cannot disable it in Phaser 3. I assumed it should be in the config object like this, but it did not work:

const config = {
	width: window.innerWidth,
	height: window.innerHeight,
	parent: 'canvas',
	type: Phaser.AUTO,
	physics: {
		default: 'arcade',
		arcade: {
			gravity: {y: 0},
			debug: true
		}
	},
	scene: [
		Preloader,
		Game
	],
	antialias: false
};
const game =  new Phaser.Game(config);

Is there another way to disable it? I found "game.config.antialias" in the phaser.js file, but i tried with "false" and "0", nothing worked. I also found it in the WebGLRenderer.js file and it looks like it should be a boolean - but still, it did not work.

I tested it with <canvaselement>.getContext('webgl').getContextAttributes().antialias and the value is always true.

Link to comment
Share on other sites

  • 1 year later...
 Share

  • Recently Browsing   0 members

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