-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtestcritters.html
executable file
·37 lines (26 loc) · 1.18 KB
/
testcritters.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
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Making Critters</title>
</head>
<script src="lib/jquery-2.0.3.min.js" type="text/javascript"></script>
<script src="lib/raphael.js" type="text/javascript"></script>
<script src="ecosystem.js" type="text/javascript"></script>
<svg id="svg1"></svg>
<svg id="svg2"></svg><br>
<svg id="svg3"></svg>
<svg id="svg4"></svg><br>
<svg id="svg5"></svg>
<svg id="svg6"></svg><br>
<svg id="svg7"></svg>
<script>
var scale = 0.5;
Ecosystem.draw("tree", {"tar1":true, "tar2":true, "prop1":1, "prop2":1}, "svg1", scale)
Ecosystem.draw("tree", {"tar1":true, "tar2":true, "prop1":1, "prop2":0}, "svg2", scale)//normal
Ecosystem.draw("tree", {"tar1":true, "tar2":true, "prop1":0, "prop2":1}, "svg3", scale)
//when prop2 = 1, it gets weird
Ecosystem.draw("tree", {"tar1":true, "tar2":true, "prop1":0, "prop2":0}, "svg4", scale)//normal
Ecosystem.draw("tree", {"tar1":true, "tar2":true, "prop1":0.5, "prop2":0}, "svg5", scale)
Ecosystem.draw("tree", {"tar1":true, "tar2":true, "prop1":0, "prop2":0.5}, "svg6", scale)
Ecosystem.draw("tree", {"tar1":true, "tar2":true, "prop1":0.5, "prop2":0}, "svg7", scale)
</script>
</html>