-
Notifications
You must be signed in to change notification settings - Fork 3
/
fallblatt.html
52 lines (49 loc) · 1.69 KB
/
fallblatt.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="css/fallblatt.css" type="text/css" rel="stylesheet">
<script src="src/jquery-3.5.1.min.js"></script>
<script src="src/fallblatt.js"></script>
<style type="text/css">
body, html {
padding: 0;
margin: 0;
background-color: #303030;
overflow: hidden;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div style="width:100%;height:100%">
<div id="splitFlapCanvas"></div>
</div>
<script type="text/javascript">
$(function() {
function rotate(canvas) {
for (var i=0; i<=canvas.flapsX; i++) {
for (var j=0; j<=canvas.flapsY; j++) {
$("#splitFlapCanvas").fallBlatt("display", {
pos: [i,j],
content: $.fn.fallBlatt.defaults.flapCharset.chars[
Math.floor(Math.random() * $.fn.fallBlatt.defaults.flapCharset.chars.length)
]
});
}
}
}
var canvas = $("#splitFlapCanvas").fallBlatt({
flapSpacingExtraWidth: 10,
flapSpacingExtraHeight: 10,
flapScale: 2
});
rotate(canvas);
setInterval(function() {
rotate(canvas);
}, 9000);
});
</script>
</body>
</html>