This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (58 loc) · 1.53 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>Canvas</title>
<link rel="stylesheet" href="./css/style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
</head>
<body>
<canvas id="particles"></canvas>
<script>
const options = {
canvas: {
//width: 100, //positive number
//height: 100, //positive number
color: {r:0,g:0,b:0}, //{r,g,b}
trailing: .7, //number(0-1)
spaceDensity: .005, //number(0-1)
borders: {
top: true, //bool
left: true, //bool
bottom: true, //bool
right: true //bool
},
gravity: {
x: 0, //number
y: 0 //number
}
},
cursor: {
size: 0, //positive number
//captureRadius: 150, //positive number
gravity: .3, //positive number
//linesRadius: 100, //positive number
},
gravityPoints: {
size: 3, //positive number
//captureRadius: 150, //positive number
gravity: .3, //positive number
linesRadius: 100, //positive number
},
particles: {
count: 100, //positive number
size: 1, //positive number
speed: {
start: 2,
max: 2,
min: 2
},
color: 'random', //{r,g,b,a} or 'random'
opacity: 1, //number(0-1)
linesRadius: 0, //positive number
elasticity: 1 //number(0-1)
}
}
</script>
<script src="./js/script.js"></script>
</body>
</html>