-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
72 lines (68 loc) · 1.29 KB
/
main.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
const sketchData = {
p5: null,
svg: {
el: null,
original: null,
pathologize: null,
width: 0,
height: 0,
get area() {
return this.width * this.height
},
get aspect() {
return [
]
}
},
canvas: {
id: `fourier-art-${Math.floor(Math.random() * 10 + (10 - 1))}`,
width: window.screen.width,
height: window.screen.height,
get area() {
return this.width * this.height
}
},
waveCount: 3500,
scale: 1,
transformX: 0,
transformY: 0,
images: [],
currentIndex: 0,
pathCoordinates: [],
x: [],
fourierX: [],
path: [],
time: 0,
finished: false,
seperate: false,
record: false,
}
const options = {
background: '#000000',
color: '#ffffff',
show: {
axis: false,
coordinate: false,
grid: false
},
dots: {
radius: 2,
active: true,
scale: 1,
opacity: 100
},
lineStroke: {
opacity: 20,
color: '#ffffff',
get getColor() {
return hexToRGB(this.color, this.opacity / 100)
}
},
ellipseStroke: {
opacity: 20,
color: '#ffffff',
get getColor() {
return hexToRGB(this.color, this.opacity / 100)
}
},
}