-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (38 loc) · 1.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
* {margin: 0; padding: 0;}
</style>
</head>
<body>
<div id="img" style="height: 600px;"></div>
<script src="static/main.js"></script>
<script>
var bm;
window.onload = function () {
var bubbleManager;
bm = bubbleManager = new BubbleManager({
element: document.getElementById("img"),
backgroundImage: "url(static/img/0.jpg)",
tick: 50,
minSpeed: 10,
maxSpeed: 30,
bubbleFrom: Direct.BOTTOM,
minRadius: 8,
maxRadius: 20,
distance: 200,
numBubble: 200,
color: function() {
var colors = ["#ffffff22", "#bf000022", "#0dc50022", "#1d4eb422", "#d1579f22"],
i = Math.floor(Math.random() * colors.length);
return parseHexColor(colors[i]);
}
});
bubbleManager.startLoop();
};
</script>
</body>
</html>