-
Notifications
You must be signed in to change notification settings - Fork 1
/
gardenNoAuth.html
111 lines (99 loc) · 3.67 KB
/
gardenNoAuth.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE HTML>
<html>
<!--
This code was taken from
https://www.html5canvastutorials.com/advanced/html5-canvas-blooming-flowers-effect/
-->
<head>
<meta charset="UTF-8">
<title>WorldViews Flower Garden</title>
<style type="text/css">
body {
margin: 0;
overflow: hidden;
height: 100vh;
background-color: rgb(241, 239, 230);
}
.buttons {
padding: 10px 10px;
}
.stats {
height: 30px;
}
.webView {
width: 100%;
height: 500px;
}
.projectView {
padding: 10px;
width: 100%;
xheight: 500px;
}
.instagramView {
width: 240px;
height: 240px;
}
.rightPanel {
height: 640px;
overflow-y: auto;
overflow-x: hidden;
}
#flowerCanvas {
width: 100%;
height: 93%;
background: -webkit-radial-gradient(left bottom, circle farthest-corner, #e1fd3e, #174709);
background: -moz-radial-gradient(left bottom, circle farthest-corner, #e1fd3e, #174709);
background: -ms-radial-gradient(left bottom, circle farthest-corner, #e1fd3e, #174709);
background: -o-radial-gradient(left bottom, circle farthest-corner, #e1fd3e, #174709);
background: radial-gradient(farthest-corner circle at left bottom, #e1fd3e, #174709);
}
</style>
<body>
<div id="gardenDiv" style="width: 100%; height: 100%">
<div style="width: 50%; height: 100%; float: left; background: green;">
<canvas id="flowerCanvas"></canvas>
<div id="controls">
<span id="buttons" class="buttons">
<button id="save">save</button>
</span>
<span id="canvasStat" class="stats">stats</span>
</div>
</div>
<div style="margin-left: 50%; xheight: 100%; " class="rightPanel">
<div id="projectView" class="projectView" style="width: 100%; xheight: 100%">
</div>
<div id="instagramView" class="instagramView" style="width: 100%; height: 100%">
</div>
</div>
<script src="js/libs/jquery-3.1.0.min.js"></script>
<script src="js/libs/sprintf.js"></script>
<script src="js/CanvasTool.js"></script>
<script src="js/GardenTool.js"></script>
<script src="js/Flower.js"></script>
<script src="js/util.js"></script>
<script src="js/libs/jquery.instagramFeed.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.15.5/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.15.5/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.15.5/firebase-database.js"></script>
<script>
var garden;
var gtool;
$(document).ready(function () {
//garden = new FlowerGarden();
gtool = new GardenTool("flowerCanvas", { numStartupFlowers: 0, maxNumFlowers: 200 });
//gtool.addFlowers(2);
//gtool.startWildFlowers(4);
gtool.start();
gtool.setView(0, 0, 800);
//gtool.loadGardenFile();
var gardenName = getParameterByName("garden");
if (gardenName) {
var gardenURL = sprintf("gardens/%s.json", gardenName)
gtool.loadGardenFile(gardenURL);
}
else {
gtool.loadFromFirebase();
}
});
</script>
</body>