-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
43 lines (43 loc) · 897 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<title>d3 Particle Demo</title>
<style type="text/css">
body {
background: white;
}
.controls {
position: fixed;
bottom: 0;
z-index: 100;
padding-bottom: 20px;
}
#stage {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
</style>
<script src="jquery.js"></script>
<script src="d3.v2.js"></script>
<script src="load-image.js"></script>
<script src="particle.js"></script>
<script>
$(function() {
var stage = new Stage('#stage');
$('#file-input').on('change', stage.loadImage.bind(stage));
$('#explode').click(function() {
stage.explode()
});
});
</script>
</head>
<body>
<div class="controls">
<input type="file" id="file-input"><input type="button" id="explode" value="explode" />
</div>
<div id="stage"></div>
</body>
</html>