-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdata.js
More file actions
34 lines (30 loc) · 685 Bytes
/
data.js
File metadata and controls
34 lines (30 loc) · 685 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
let width = window.innerWidth,
height = window.innerHeight;
var canvas = document.getElementById('canvas-bg');
canvas.width = width;
canvas.height = height;
var ctx = canvas.getContext('2d');
let points = [];
// points[i] = {
// x,
// y,
// closest: {x,y},
// circle,
// koef
// }
let colors = [];
let target = {
x: width / 2,
y: height / 2
};
// You can change this variables
const density = 12;
let palette = [
"30, 86, 49", // #1E5631
"164, 222, 2", // #A4DE02
"118, 186, 27", // #76BA1B
"76, 154, 42", // #4C9A2A
"172, 223, 135", // #ACDF87
"104, 187, 89" // #68BB59
];
const circle_size = 7;