-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsketch.js
52 lines (47 loc) · 1.12 KB
/
sketch.js
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
40
41
42
43
44
45
46
47
48
49
50
51
52
document.addEventListener(
"touchmove",
function (n) {
n.preventDefault();
}, {
passive: false
}
);
let state = -1;
let doubleClick, ts = [];
let mic, osc, filt;
let red;
let loops = [];
function setup() {
mic = new p5.AudioIn();
mic.start();
cvs = createCanvas(windowWidth, windowHeight);
osc = new p5.Oscillator();
osc.disconnect();
osc.connect(filt);
osc.setType("sawtooth");
osc.start();
osc.freq(0);
// link = createA("http://skyl.fr","http://skyl.fr");
// link.style("color:#888884;font-family:HelveticaNeue-light,Helvetica;font-size:20px;")
// link1 = createP("Sikai LI 2018","2018");
// link1.style("color:#888884;font-family:Helvetica;font-size:17px;")
// link1.position(0.92 * windowWidth - 60, 0.9 * windowHeight+17)
// link.position(0.92 * windowWidth - 60, 0.9 * windowHeight)
}
function draw() {
background(100, 100);
let r = 100;
loops.forEach(a => {
a.inter(loops);
a.display(loops);
});
// console.clear();
noStroke();
fill(0, 30);
if (state == 0) {
ellipse(mouseX, mouseY, 255);
}
}
document.touchmove = function (n) {
n.preventDefault();
};