-
Notifications
You must be signed in to change notification settings - Fork 1
/
flowerEdit.html
62 lines (56 loc) · 1.83 KB
/
flowerEdit.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
<!DOCTYPE HTML>
<html>
<!--
This code was taken from
https://www.html5canvastutorials.com/advanced/html5-canvas-blooming-flowers-effect/
-->
<head>
<meta charset="UTF-8">
<title>Flowers Editor</title>
<style type="text/css">
body {
margin: 0;
overflow: hidden;
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>
<!--
<canvas id="flowerCanvas" width=300 height=300 style="border-style: solid; border-width: 2px"></canvas>
<canvas id="canvas" width=300 height=300 style="border-style: solid; border-width: 2px"></canvas>
-->
<canvas id="flowerCanvas" style = "width: 100%; xheight: 600"></canvas>
<div id="canvasStat"></div>
<!--
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
-->
<script src="js/libs/jquery-3.1.0.min.js"></script>
<script src="js/libs/sprintf.js"></script>
<script src="js/libs/dat.gui.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>
var garden;
var gtool;
var editor;
async function setup() {
console.log("setup");
//garden = new FlowerGarden();
gtool = new GardenTool("flowerCanvas");
gtool.start();
gtool.setView(0, 0, 800);
var f = await gtool.addFlower();
editor = new FlowerEditor(gtool, f);
}
$(document).ready(() => {
console.log("document now ready...");
setup();
});
</script>
</body>