I’ve followed the getting started guide more than twice now, and nothing is mentioned about this. Whether I try with one of the suggestions, http-server, or just a basic Express web server, I get CORS errors on every this.load.image
call.
Phaser makes the url based on calls like this in the preload function, this.load.image('sky', 'assets/sky.png')
, after setting this.load.setBaseURL('https://labs.phaser.io')
. These calls are in my index.html, and the game gets “started” with this.add.image(400, 300, 'sky')
I presume. This is all copied straight from the Phaser tutorial website and tutorial source download.