-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.html
63 lines (63 loc) · 1.98 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv=X-UA-Compatible content="IE=edge">
<title>听指令的小方块</title>
<link rel="stylesheet" href="boxbot.css">
</head>
<body>
<article class="boxbot clearfix">
<table class="boxbot-map"></table>
<article class="boxbot-box boxbot-bot">
<img src="bot.png" alt="bot">
</article>
<article class="boxbot-controls">
<article class="boxbot-buttons clearfix">
<select title="时间间隔" id="resolution">
<option value="30">30x30</option>
<option value="20" selected>20x20</option>
</select>
<select title="时间间隔" id="duration">
<option value="500">慢速</option>
<option value="250" selected>常速</option>
<option value="100">快速</option>
<option value="0">极速</option>
</select>
<button id="run" type="button">运行</button>
<button id="reset" type="button">重置</button>
<button id="random" type="button">随机修墙</button>
<input type="file" id="image" title="选择图片文件">
</article>
<article class="boxbot-commander">
<div class="commander-lines-wrapper">
<div class="commander-lines">
<div class="commander-lines-item">1</div>
</div>
</div>
<textarea title="命令编辑器" class="commander-editor" spellcheck="false">mov bot 2
tun lef
go
tun bac
tra bot 4
mov rig 6
biud
mov bot
mov rig
tun lef
bru #2980b9
mov to 9,6</textarea>
</article>
</article>
</article>
<p class="note"><em>注:选择图片文件后,程序会读取图片并生成绘图命令,接着运行命令,机器人将一步一步地把图形画出来!</em></p>
<script src="promise.js"></script>
<script src="boxbot-bot.js"></script>
<script src="boxbot-map.js"></script>
<script src="boxbot-finder.js"></script>
<script src="boxbot-editor.js"></script>
<script src="boxbot.js"></script>
<script src="image-reader.js"></script>
<script src="app.js"></script>
</body>
</html>