-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.html
99 lines (75 loc) · 3.71 KB
/
main.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
<!--
/*
Pathgen.html
Joshua Teitlebaum 4/8/2014
outputs JSON, takes in JSON for path representations
*/
-->
<html>
<head>
<script src="js/raphael-min.js"></script>
<script src="js/knockout-3.1.0.js"></script>
<link rel="stylesheet" type="text/css" href="jsoneditor/jsoneditor-min.css">
<script type="text/javascript" src="jsoneditor/jsoneditor-min.js"></script>
<link rel="stylesheet" type="text/css" href="css/pathgen.css">
<link rel="stylesheet" href="jquery-ui-1.10.4/themes/base/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="jsoneditor/jsoneditor-min.css">
<script src="jquery-ui-1.10.4/jquery-1.10.2.js"></script>
<script src="jquery-ui-1.10.4/ui/jquery-ui.js"></script>
<script src="js/simplifygeometry-0.0.1.js"></script>
<script src="js/lzma_worker.js"></script>
<script src="js/pathgen.js"></script>
<script src="js/jquery.growl.js" type="text/javascript"></script>
<link href="css/jquery.growl.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main" class="main">
</div>
</div>
<div id="outereditor" class="inputarea">
<div id="jsoneditor" width="100%" height="100%"> </div>
</div>
<div id="bottombar" class="bottombar">
<form>
<div id="delbutton" class="delbutton" onclick="pathgen.delClicked();">del</div>
def. rotation: <input data-bind="value: defaultrotation" id="defaultrotation" type="text" maxlength="4" size="4" ></input>
def. time: <input data-bind="value: defaulttime" id="defaulttime" type="text" maxlength="4" size="4" ></input>
pathname: <input data-bind="value: pathName" id="pathname" type="text" maxlength="25" size="15" value="" ></input>
<br>
screenwidth: <input data-bind="value: screenwidth" id="screenwidth" type="text" maxlength="4" size="4" ></input>
screenheight: <input data-bind="value: screenheight" id="screenheight" type="text" maxlength="4" size="4" ></input>
<div id="outputjson" class="outputjson">out</div>
- <div id="inputjson" class="inputjson">in</div>
<br/>
bg: <input data-bind="value: bgimg" id="bgimg" type="text" size="30" ></input>
<select data-bind="options: paths, value:selectedpath" id="pathnames" maxlength="25">
</select>
<label for="editmodes">mode:</label><select data-bind="options: editmodes, value:selectededitmode" id="editmodes" maxlength="25">
</select>
<label for="elapsedtime">elapsed:</label> <label data-bind="text:elapsedtime" id="elapsedtime" ></label>
</form>
</div>
<script>
var dataurl = getParameterByName("dataURL");
var modality = getParameterByName("modality");
pathgen = new PathGen("main");
if(modality == "player")
{
document.getElementById('bottombar').style.display="none";
document.getElementById('outereditor').style.display="none";
document.getElementById('jsoneditor').style.display="none";
pathgen.initialize("main",null,null,null);
}
else
{
pathgen.initialize("main","bottombar","outereditor","jsoneditor");
}
if(dataurl != null && dataurl.length > 0)
{
pathgen.loadFromURL(dataurl);
}
document.getElementById('outputjson').addEventListener('click', function(){pathgen.onOutputJSON()}, false);
document.getElementById('inputjson').addEventListener('click', function(){pathgen.onInputJSON()} ,false);
</script>
</body>
</html>