(Created page with "<syntaxhighlight lang="java"> void setup() { size(640,360); } void draw() { background(255); PVector mouse = new PVector(mouseX,mouseY); PVector center = new PVecto...") |
m (Max moved page GMU:Actors, Traces, Collectives/sketch01 to GMU:Actors, Traces, Collectives/SS17/sketch01: gleicher kurs im WS) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="JavaScript"> | ||
void setup() { | void setup() { | ||
size(640,360); | size(640,360); |
Latest revision as of 21:29, 13 August 2017
void setup() {
size(640,360);
}
void draw() {
background(255);
PVector mouse = new PVector(mouseX,mouseY);
PVector center = new PVector(width/2,height/2);
mouse.sub(center);
translate(width/2,height/2);
line(0,0,mouse.x,mouse.y);
}