-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
39 lines (29 loc) · 707 Bytes
/
script.js
File metadata and controls
39 lines (29 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var sketchHolder = $('sketch-holder');
function setup() {
var canvas = createCanvas(900, 500);
canvas.parent('sketch-holder');
}
function draw() {
background(200);
testNode.display();
}
function windowResized() {
// resizeCanvas(windowWidth / 2, windowHeight / 2);
}
//place in seperate file
var VisualNode = function(x, y, w, h) {
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.edges = [];
};
VisualNode.prototype.update = function() {
//if this.edges changed from last frame, add edge
};
VisualNode.prototype.display = function() {
fill(200, 0, 60);
strokeWeight(0);
ellipse(this.x, this.y, this.w, this.h);
};
var testNode = new VisualNode(100, 100, 100, 100);