-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
111 lines (111 loc) · 3.9 KB
/
index.html
File metadata and controls
111 lines (111 loc) · 3.9 KB
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 lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Behavior Trees</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.cyan-amber.min.css" />
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
<script defer src="https://d3js.org/d3.v5.min.js"></script>
<script defer src="btree.js"></script>
<script defer src="btreeviz.js"></script>
<style>
body { height: 98vh; }
main { height: 100%; }
.mdl-layout__drawer.is-visible { width: 350px; }
.mdl-navigation__link {
padding-left: 30px !important;
padding-right: 20px !important;
}
.tree-action {
display: flex !important;
align-items: center;
justify-content: space-between;
}
.mdl-button--fab.tree-action--mini-fab {
height: 30px;
width: 30px;
min-width: 30px;
font-size: 20px;
margin: 0px 4px;
}
.tree-help-button { margin-right: 12px; }
.tree-action--success { background: #4FC04F; }
.tree-action--failure { background: #F59A9A; }
.tree-action--running { background: #59ABF0; }
.tree-error__text {
color: red;
font-size: 24px;
}
.tree-error__container {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.tree-help {
position: absolute;
z-index: 100;
margin-top: 20px;
right: 50px;
}
.tree-help__action { font-weight: bold; }
</style>
</head>
<body onload="main('main')">
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Behavior Tree</span>
<!-- Add spacer, to align any items to the right -->
<div class="mdl-layout-spacer"></div>
<div>
<button id="tree-help__button"
class="mdl-button
mdl-js-button
mdl-button--fab
mdl-button--mini-fab
mdl-js-ripple-effect
tree-help-button
mdl-button--accent">
?
</button>
<div id="tree-help__card" class="tree-help mdl-card mdl-shadow--2dp" style="visibility: hidden">
<div class="mdl-card__title">
<h2 class="mdl-card__title-text">Tree Manipulation</h2>
</div>
<div class="mdl-card__supporting-text">
<ul>
<li><span class="tree-help__action">Move</span>: Left Mouse Button</li>
<li><span class="tree-help__action">Zoom</span>: Mouse Wheel</li>
<li><span class="tree-help__action">Stretch Horizontal</span>: Shift + Wheel</li>
<li><span class="tree-help__action">Stretch Vertical</span>: Shift + Alt + Wheel</li>
</ul>
</div>
</div>
</div>
<input type="file" id="treeFileInput" style="display:none" accept="*.tree" class="visually-hidden">
<button id="treeFileSelect"
class="mdl-button
mdl-js-button
mdl-button--raised
mdl-js-ripple-effect
mdl-button--accent">
Load Tree
</button>
</div>
</header>
<div class="mdl-layout__drawer tree-drawer">
<span class="mdl-layout-title">Conditions</span>
<nav id="tree-conditions" class="mdl-navigation">
</nav>
<span class="mdl-layout-title">Actions</span>
<nav id="tree-actions" class="mdl-navigation">
</nav>
</div>
<main class="mdl-layout__content"></main>
</div>
</body>
</html>