-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
170 lines (145 loc) · 5.39 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Minecraft CA</title>
</head>
<body>
<div id="game-wrapper">
<div id="canvas-wrapper">
<div id="debug-panel" style="display: none;">Debug</div>
<div id="block-state-debug" class="hide"></div>
<div id="selection" class="hide"></div>
<div id="block-selection-wrapper" class="">
<div id="block-selection-panel-heading">Inventory</div>
<div id="block-selection-panel"></div>
</div>
<div id="inventory-wrapper" class="">
<div id="inventory-panel"></div>
</div>
<div id="guide-button">?</div>
<div id="guide-panel" class="hide">
<h1>Minecraft Cellular Automaton in Typescript</h1>
<p>
This project aims to recreate minecraft redstone as a cellular
automaton, coded in Typescript. To close this guide click the
<code>?</code> at the top right of the screen.
</p>
<p>
This project is still highly experimental. When the version
increases, the guide will reappear, settings reset and worlds lost.
</p>
<p>Current Build: <code id="build-details">...</code></p>
<h2>Mouse</h2>
<ul>
<li>
Pan around the world map by <code>click + drag mouse</code>.
</li>
<li>
Scale the world map using the mouse
<code>ctrl + scroll wheel</code>.
</li>
<li>
Switch between items in the inventory with the mouse
<code>scroll wheel</code>.
</li>
<li>
<code>Left click</code> will place a block if the location is air,
if the block is interactable it will interact with the block,
otherwise it will pick the block. Block interaction includes
cycling the delay of a redstone repeater or toggling a lever.
</li>
<li><code>Ctrl + right click</code> will delete a block.</li>
<li><code>Ctrl + left click</code> will pick the block.</li>
<li>
<code>Right click</code> will display the live block state in a
text panel. Clicking on an air block will close the text panel
</li>
<li>
Select an area of blocks using
<code>ctrl + click + drag mouse</code>. The selection can be
pasted at the mouse position using <code>ctrl + v</code> or
downloaded via command.
</li>
<li>
Delete an area of blocks using
<code>ctrl + shift + click + drag mouse</code>.
</li>
</ul>
<h2>Keys</h2>
<ul>
<li>
Press <code>e</code> to log a block to the (browser) console.
</li>
<li>
Press <code>a</code> to toggle the visibility of the inventory
search panel.
</li>
<li>
Press <code>z</code> to toggle between viewing ticks or subticks.
</li>
<li>Press <code>x</code> to step a tick.</li>
<li>Press <code>c</code> to set the tick speed back to default.</li>
<li>
Press <code>v</code> to set the tick speed to as fast as possible.
</li>
</ul>
<h2>Commands</h2>
<p>Use the command terminal to run commands including:</p>
<ul>
<li>Set update and render speeds</li>
<li>Load, delete and download worlds</li>
<li>List and pick blocks</li>
<li>Toggle debug and command window visibility</li>
</ul>
<p>
The command terminal is located on the bottom left corner of the
screen. To open the terminal click on it or press <code>/</code>.
</p>
<ul>
<li>
Press <code>tab</code> to switch between command suggestions
</li>
<li>
Press <code>up</code> to switch between commands in your history
</li>
</ul>
<p>
<strong
>Use the <code>/world clear</code> and
<code>/world load ?</code> commands to load the latest demo
world!</strong
>
</p>
<h2>Code</h2>
<p>
View the source code on GitHub.
</p>
<a
href="https://github.com/jackrekirby/minecraft-ca-ts"
target="_blank"
>https://github.com/jackrekirby/minecraft-ca-ts</a
>
</div>
<div id="command-wrapper">
<div id="command-list-wrapper" style="display: none;">
<div id="command-list-heading"></div>
<div id="command-list"></div>
</div>
<input
type="text"
id="command-line"
spellcheck="false"
value=""
placeholder="/command"
/>
</div>
<canvas id="canvas" width="612" height="512"></canvas>
</div>
</div>
<script src="./dist/bundle.js"></script>
</body>
</html>