xxxxxxxxxx
function setup() {
createCanvas(559, 397);
background(255);
rectMode(CENTER);
}
function draw() {
//background(0);
// jump to the center of the sketch
translate(width/2, height/2);
let s = map(sin(millis()/1500), -1, 1, -300, 300);
let sc = map(cos(millis()/1000), -1, 1, -300, 300);
noFill();
stroke(0);
translate(sc, 0)
rotate(millis()/1000);
triangle (0, 0, 400, 400, 25, 25);
triangle (-40, 0, 600, -500, 25, -25);
rect(40, 500, 200)
}