xxxxxxxxxx
function setup() {
createCanvas(559, 397, SVG);
//background(0);
clear();
}
function draw() {
translate(width/2, height/2);
let s = map(sin(millis()/3000), -1, 1, -400, 400)
let r = map(sin(millis()/800), 0, 1, 10, PI);
noFill();
stroke(0);
translate(s, 0);
rotate(r);
line(50, 0, 100, 300)
}
function mousePressed() {
save("mySVG.svg");
}