I try to do “Making your first Phaser 3 game: Part 2” on firefox but image not display , i open up console it’s tell Error like bellow image.
Please help me and sorry if my language is wrong.
I try to do “Making your first Phaser 3 game: Part 2” on firefox but image not display , i open up console it’s tell Error like bellow image.
Please help me and sorry if my language is wrong.
var game = Phaser.Game(config);
needs to be:
var game = new Phaser.Game(config);
It took me a minute to find that! The new
keyword means you are creating a new Phaser.Game object, which is what you want to do in this case. Without the new, it means you are assigning the class/constructor of Phaser.Game to your variable which is not what you want to do.
Oh! I should not mistake that, thanks for your help.
I’ve done that myself several times now and I have been working with Javascript for years! Just a simple mistake