I’m new to Phaser, and fairly new to JavaScript in general. I’m trying to create a rectangle object, but it’s throwing the error “Object doesn’t support this action.”
Here’s my code:
var rectangle = new Phaser.Rectangle(0, 0, 1000, 500);
Actually it is still saying “Object doesn’t support property or method 'rectangle”. When I comment out the ‘…this.add.rectangle…’ line, the background appears on the screen correctly (in the background color I set in ‘config’), but when I have that line uncommented, it just turns the background color black. Could there be something else going wrong here besides the code?