-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathindex.html
More file actions
32 lines (31 loc) · 905 Bytes
/
index.html
File metadata and controls
32 lines (31 loc) · 905 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Particles</title>
</head>
<body>
<!-- 背景div -->
<div id="mydiv" style="width: 500px;height:500px;"></div>
<script type="text/javascript">
window.onload = function() {
//配置
var config = {
vx: 4, //小球x轴速度,正为右,负为左
vy: 4, //小球y轴速度
height: 2, //小球高宽,其实为正方形,所以不宜太大
width: 2,
count: 100, //点个数
color: "121, 162, 185", //点颜色
stroke: "130,255,255", //线条颜色
dist: 6000, //点吸附距离
e_dist: 20000, //鼠标吸附加速距离
max_conn: 10 //点到点最大连接数
}
//调用
CanvasParticle(config);
}
</script>
<script type="text/javascript" src="canvas-particle.js"></script>
</body>
</html>