-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (53 loc) · 2.15 KB
/
index.html
File metadata and controls
62 lines (53 loc) · 2.15 KB
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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Zodiac | 0.1.1</title>
<style>
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
background: #111;
overflow: hidden;
}
#zodiac {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<canvas id="zodiac"></canvas>
<div style="position: fixed; top: 0; left: 0;">
<button onClick="window.zodiac.play();">play</button>
<button onClick="window.zodiac.pause();">pause</button>
</div>
<script src="../zodiac.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
window.zodiac = new Zodiac('zodiac', // HTMLCanvasElement or id
{ //// OPTIONS
directionX: 0, // -1:left;0:random;1:right
directionY: -1, // -1:up;0:random;1:down
velocityX: [.1, .2], // [minX,maxX]
velocityY: [.5, 1], // [minY,maxY]
bounceX: true, // bounce at left and right edge
bounceY: false, // bounce at top and bottom edge
parallax: .5, // float [0-1...]; 0: no paralax
pivot: 0, // float [0-1...]; pivot level for parallax;
density: 10000, // px^2 per node
dotRadius: 5, // px value or [minR,maxR]
backgroundColor: 'rgb(9,9,9)', // default transparent; use alpha value for motion blur and ghosting
dotColor: 'rgba(99,99,99,.3)',
linkColor: 'rgb(99,99,99)',
linkDistance: 50,
linkWidth: 2
});
console.log("%c Zodiac [0.1.1] ", "color:#42b983;background-color:#333;font-weight:bold;font-size:20px;");
console.log(zodiac);
}, false);
</script>
</body>
</html>