xxxxxxxxxx
14
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
mouse = createVector(mouseX, mouseY)
center = createVector(width / 2, height / 2)
mouse.sub(center)
mouse.mult(0.5)
translate(width / 2, height / 2)
line(0, 0, mouse.x, mouse.y)
}