Jump to content

Uncaught TypeError: Cannot set property 'imageSmoothingEnabled' of null when using version 1.1.3


plicatibu
 Share

Recommended Posts

After some days away from Phaser because other priorities I updated my project to versio 1.1.3 and I get this error:

Uncaught TypeError: Cannot set property 'imageSmoothingEnabled' of null phaser.js:21718Phaser.Canvas.setSmoothingEnabled phaser.js:21718Phaser.StageScaleMode.startFullScreen phaser.js:22020Main.Boot.create Boot.js:122Phaser.StateManager.loadComplete phaser.js:9324Phaser.Game.loadComplete phaser.js:13134Phaser.SignalBinding.execute phaser.js:9996Phaser.Signal.dispatch phaser.js:9871dispatch phaser.js:9638Phaser.Loader.nextFile phaser.js:32194Phaser.Loader.fileComplete phaser.js:32018file.data.onload

What can I do in order to solve it?

 

Thank you all.

Link to comment
Share on other sites

I changed the way I was calling the constructor

 

from

var game = new Phaser.Game(1280, 720, Phaser.AUTO);

to

var game = new Phaser.Game(1280, 720, Phaser.CANVAS, '', null, false, false);

and it worked again.

 

But not that using either  Phaser.AUTO or Phaser.WEBGL presents the same error reported in the first post.

 

So, is it a bug or am I missing something?

Link to comment
Share on other sites

If you were using 

Phaser.Canvas.setSmoothingEnabled(game.context, false);

somewhere in your code, then this is not a bug.

Canvas smoothing only works in canvas mode.

Here is the example of what it does : http://gametest.mobi/phaser/examples/_site/view_full.html?d=display&f=render+crisp.js&t=render%20crisp

 

If you weren't, yes this is a bug

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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