SWBAT incement variables using shorthand notation
Write the code to draw a circle that is 200 pixels in diameter that follows around the mouse pointer.
var draw = function (){
background(255, 255, 255);//white
ellipse(mouseX, mouseY, 200, 200);
};
Analyze the code below. What will it look like?
var draw = function (){
background(255, 255, 255);//white
line(mouseX - 100, mouseY - 100, mouseX + 100, mouseY + 100);
};
We want to use incrementing shortcuts to make the circle move diagonally across the screen.
What will the impact of the code below be?