xxxxxxxxxx
34
// scale function
//scale can take one or two args. you can scale something on the x and y or
// do x one way adn y the other way
//you can put - # in scale which will flip the axes
let angle = 0;
let x = 10;
let y =10;
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
rectMode(CENTER);// how to make the rect rotate in teh center;
}
function draw() {
background(0);
push();
translate(200,200);
//rotate (angle*1);
scale(mouseX/100, mouseY/100);
fill(50,100,255);
strokeWeight(5);
stroke(200,0,50);
rect(0,0,100,50);
pop();
// angle= angle+1;
// if(x> width || y> height){
// x= 10;
// y =10;
// }
}