Menu
Hey so I’m really new to JavaScript and I’m having a problem wiht making an object work.
This is my code right now:
[CODE]var player = {
x: width/2,
y: height/2,
}
function setup() {
createCanvas(500, 500);
}
function draw() {
background(0);
ellipse(player.x, player.y, 25, 25);
}
problem is, the ellipse doesn’t show up on the screen…
Any help would be awesome! Thanks.