luschn Posted March 13, 2018 Share Posted March 13, 2018 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 More sharing options...
samme Posted March 13, 2018 Share Posted March 13, 2018 phaser/issues/3386 You can try pixelArt: true instead. luschn and Stathis 2 Link to comment Share on other sites More sharing options...
luschn Posted March 14, 2018 Author Share Posted March 14, 2018 19 hours ago, samme said: phaser/issues/3386 You can try pixelArt: true instead. that´s it, thank you so much! could not find this in any documentation or the examples, but i guess that´s because phaser 3 is brandnew... Link to comment Share on other sites More sharing options...
samme Posted March 17, 2018 Share Posted March 17, 2018 There will be antialias in v3.3.0. Link to comment Share on other sites More sharing options...
amoshydra Posted September 9, 2019 Share Posted September 9, 2019 In 3.19.0 the setting has been moved into renderConfig const config = { // ... render: { pixelArt: true }, } https://github.com/photonstorm/phaser/blob/v3.19.0/src/core/typedefs/RenderConfig.js Link to comment Share on other sites More sharing options...
Recommended Posts