xxxxxxxxxx
function setup() {
createCanvas(559,397,SVG);
background(255);
rectMode(CENTER);
clear ();
}
function draw() {
translate(width/2, height/2, SVG);
let s = map(sin(millis()/50), -1, 1, -120, 150);
let sc = map(cos(millis()/150), -1, 1, -120, 150);
noFill();
stroke(0);
translate(s, sc);
rect(0, 0, 75,75);
}
function mousePressed() {
save("mySVG.svg");
}