-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
135 lines (135 loc) · 5.22 KB
/
index.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!--DOCTYPE html-->
<!--
Unfortunately, Blockly expects quirks mode.
But that's obnoxious.
IE might be more compatible in standards mode?
Main Blockly problem I've seen is an extra pixel between block categories and
block lists in the toolbox.
Can I fix this?
-->
<html>
<head>
<title>Blockly TurtleBot!</title>
<link rel="stylesheet" href="blockly-turtlebot.css"/>
<script src="../blockly/blockly_compressed.js"></script>
<script src="../blockly/en_compressed.js"></script>
<script src="../blockly/javascript_compressed.js"></script>
<script src="../roslibjs/include/EventEmitter2/eventemitter2.js"></script>
<script src="../roslibjs/build/roslib.js"></script>
<!--
This isn't needed until/unless I get point clouds.
<script src="../three.js/build/three.min.js"></script>
-->
<script src="blockly-turtlebot.min.js"></script>
</head>
<body>
<div id="app">
<div>
<!-- Use tabindex to make display focusable. -->
<img id="display" width="320" height="240" crossorigin tabindex="0"/>
</div>
<div id="controls">
<label><input id="pause" type="checkbox"/> Pause</label>
<label><input id="ai" type="checkbox"/> AI Control</label>
<input id="update" type="button" value="Update"/>
</div>
<div id="console"></div>
</div>
<div id="blockly">
<xml id="toolbox" style="display: none">
<category name="Agent">
<block type="agent_drive">
<value name="AMOUNT"><block type="math_number">
<title name="NUM">0.2</title>
</block></value>
</block>
<block type="agent_turn">
<value name="AMOUNT"><block type="math_number">
<title name="NUM">30</title>
</block></value>
</block>
<block type="agent_colorAt"></block>
</category>
<!--
We don't actually need colors at present.
Vision from "agent_color" is distinct r, g, and b.
-->
<!--category name="Color">
<block type="colour_picker"></block>
<block type="colour_rgb"></block>
<block type="colour_blend"></block>
<block type="colour_random"></block>
</category-->
<!--
Flow is usually called "Control" in Blockly, but for agent control,
"control" is an overloaded term.
-->
<category name="Flow">
<block type="controls_if"></block>
<block type="controls_whileUntil"></block>
<block type="controls_repeat"></block>
<block type="controls_for"></block>
<block type="controls_forEach"></block>
<block type="controls_flow_statements"></block>
</category>
<category name="Lists">
<block type="lists_create_empty"></block>
<block type="lists_create_with"></block>
<block type="lists_repeat"></block>
<block type="lists_length"></block>
<block type="lists_isEmpty"></block>
<block type="lists_indexOf"></block>
<block type="lists_getIndex"></block>
<block type="lists_setIndex"></block>
<block type="lists_getSublist"></block>
</category>
<category name="Logic">
<block type="logic_boolean"></block>
<block type="logic_compare"></block>
<block type="logic_negate"></block>
<block type="logic_operation"></block>
<block type="logic_ternary"></block>
<block type="logic_null"></block>
</category>
<category name="Math">
<block type="math_number"></block>
<block type="math_constant"></block>
<block type="math_arithmetic"></block>
<block type="math_round"></block>
<block type="math_single"></block>
<block type="math_trig"></block>
<block type="math_modulo"></block>
<block type="math_constrain"></block>
<block type="math_number_property"></block>
<block type="math_on_list"></block>
<block type="math_random_float"></block>
<block type="math_random_int"></block>
<block type="math_change"></block>
</category>
<category name="Procedures" custom="PROCEDURE"></category>
<category name="Text">
<block type="text"></block>
<block type="text_print"></block>
<block type="text_prompt"></block>
<block type="text_changeCase"></block>
<block type="text_charAt"></block>
<block type="text_getSubstring"></block>
<block type="text_isEmpty"></block>
<block type="text_indexOf"></block>
<block type="text_join"></block>
<block type="text_length"></block>
<block type="text_trim"></block>
<block type="text_append"></block>
</category>
<category name="Variables" custom="VARIABLE"></category>
</xml>
</div>
<div id="files">
<input id="file-chooser" type="file"/>
<a href="#" id="open">Open</a>
<a href="#" id="import">Import</a>
<a href="#" id="export" download="TurtleBot Block.blockly">Export</a>
<a href="#" id="save" download="TurtleBot.blockly">Save</a>
</div>
</body>
</html>