-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
329 lines (281 loc) · 14.5 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<!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">
<meta name="google-site-verification" content="hPlCYMCm_AK8Qa7GmHKeNjKDENMYKF351Kcgu-dl9a8">
<!-- You can technically make a whole computer! -->
<meta name="description" content="An online Logic Simulator. Create virtual circuits with this advanced online logic simulator. Including integrated circuits, clock, gates, ram, seven segment display, and much more. You can inspect the components to see how they are built up, or create your own!">
<meta name="keywords" content="Logic, Simulator, Open Source, Simulation, JavaScript, Virtual, Circuits, Online, Advanced, Integrated Circuits, Toggle, Button, Clock, Seven Segment Display, Decoder, RAM, Gates, AND, OR, NOR, NOT, XOR, Transistor, Inspect, Custom Components, Component, Latch, Light Switch, Electronic, Material, Easy, Free, No Ads">
<meta name="author" content="Kristoffer Vassbø">
<title>Logic Simulator</title>
<!-- favicons -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#2c8dbc">
<meta name="msapplication-TileColor" content="#2c8dbc">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="assets/css/components.css">
<link href='https://fonts.googleapis.com/css?family=Architects%20Daughter' rel='stylesheet'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body class="noselect"> <!-- TODO: noselect body ???? -->
<div id="top">
<div id="main_title"><a href="#" class="lang_title">Logic Simulator</a></div>
<div id="toolbar" class="noselect">
<!-- <i class="material-icons" title="Create new [ctrl+n]">insert_drive_file</i> -->
<i class="material-icons lang_save key_save" title="Save to local storage [ctrl+s]">save</i>
<i class="material-icons lang_export key_export" title="Export selected tab(s) [ctrl+e]">cloud_download</i> <!-- TODO: change tab/tabs -->
<i class="material-icons lang_file key_file" title="Open file [ctrl+o]">folder_open</i>
<!-- <i class="material-icons" title="Print [ctrl+p]">print</i> -->
<span class="seperator"></span>
<i class="material-icons lang_undo key_undo" title="Undo [ctrl+z]" disabled>undo</i>
<i class="material-icons lang_redo key_redo" title="Redo [ctrl+y]" disabled>redo</i>
<span class="seperator"></span>
<!-- context menu -->
<!-- <i class="material-icons" title="Cut [ctrl+x]" disabled>cut</i>
<i class="material-icons" title="Copy [ctrl+c]" disabled>copy</i>
<i class="material-icons" title="Paste [ctrl+v]" disabled>paste</i> -->
<!-- <i class="material-icons" title="Select all [ctrl+a]" disabled>select_all</i> -->
<!-- <span class="seperator"></span> -->
<i class="material-icons lang_delete key_delete" title="Delete selected [delete]" disabled>delete</i>
<i class="material-icons lang_duplicate key_duplicate" title="Duplicate selected [ctrl+d]" disabled>filter_none</i>
<i class="material-icons lang_rotate_right key_rotate_right" title="Rotate selected right (90°) [ctrl+r]" disabled>rotate_right</i>
<i class="material-icons lang_rotate_left key_rotate_left" title="Rotate selected left (-90°) [ctrl+shift+r]" disabled>rotate_left</i>
<!-- this is always on and will create for the whole tab if nothing is selected! VVV -->
<i class="material-icons lang_circuit key_circuit" title="Create integrated circuit (by selection) [ctrl+i]">post_add</i> <!-- receipt -->
<span class="seperator"></span>
<i class="material-icons lang_thruth_table key_thruth_table" title="Generate truth table [ctrl+g]">receipt</i>
<i class="material-icons lang_clocks" title="View clocks">access_time</i> <!-- timers -->
<!-- <i class="material-icons" title="Component stats" disabled>memory</i> -->
<!-- <span class="seperator"></span>
<i class="material-icons" title="Debugger">bug_report</i> -->
<!-- widgets, memory, style, tune, category, layers, apps -->
<!-- <i class="material-icons right" style="right:96px;" title="Modes [ctrl+?]">storage</i> -->
<!-- <i class="material-icons right" style="right:96px;" title="Modes [ctrl+?]">widgets</i> --> <!-- TBA, WIP -->
<!-- <i class="material-icons right" style="right:96px;" title="Modes [ctrl+?]">memory</i> -->
<!-- <i class="material-icons right" style="right:96px;" title="Modes [ctrl+?]">style</i> -->
<!-- <i class="material-icons right" style="right:96px;" title="Modes [ctrl+?]">tune</i> -->
<!-- <i class="material-icons right" style="right:96px;" title="Modes [ctrl+?]">category</i> -->
<!-- <i class="material-icons right" style="right:96px;" title="Modes [ctrl+?]">layers</i> -->
<!-- <i class="material-icons right" style="right:96px;" title="Modes [ctrl+?]">apps</i> -->
<i class="material-icons right lang_settings key_settings" style="right:52px;" title="Settings [ctrl+?]">settings_gear</i>
<i class="material-icons right lang_about" title="About">info</i>
</div>
<!-- pause simulation -->
<!-- save (export) -->
</div>
<div id="drawer"></div>
<div id="dragger"></div>
<div id="tabber">
<i class="material-icons right tabber lang_add_tab" title="Add tab">add</i>
<div class="scroller" style="overflow-x:auto;overflow-y:hidden;max-width:calc(100vw - 250px - 44px);display:flex;">
<div class="tab active" id="tab#0">
<span>main</span>
<div id="close"><i class="material-icons tabber lang_close" title="Close">close</i></div>
</div>
<!-- <div class="tab">
<span>and | Inspect*</span>
<div id="close"><i class="material-icons tabber" title="Close">close</i></div>
</div> -->
</div>
</div>
<!-- loading feedback -->
<div class="feedback hidden">
</div>
<!-- debug -->
<div class="results hidden" style="position: fixed;top: 43px;left: 260px;z-index:20;pointer-events:none;">
<div>
Click Pos: (<span class="clickPosX">null</span>,
<span class="clickPosY">null</span>)
</div>
<div>
Move Pos: (<span class="moveClickPosX">null</span>,
<span class="moveClickPosY">null</span>)
</div>
<div>
Dragging: <span class="draggingIndicator">no</span>
</div>
<div>
Zoom: <span class="zoomIndicator">100%</span>
</div>
</div>
<!-- <div style="top:40px;left:250px;"> -->
<div id="main#0" class="main" style="zoom:1;">
<div class="selectionBox" class="hidden"></div>
<!-- <div> -->
<div class="SVGdiv">
<!-- <svg class="lineSVG">Sorry, your browser does not support inline SVG.</svg> -->
</div>
<!-- </div> -->
<!-- <svg height="210" width="500">
<line x1="0" y1="0" x2="200" y2="200" style="stroke:rgb(255,0,0);stroke-width:2" />
Sorry, your browser does not support inline SVG.
</svg> -->
</div>
<!-- </div> -->
<div class="map_overlay">
<div class="map_outline"></div>
</div>
<!-- bottom right actions -->
<div id="bottomActions">
<!-- TODO: show zoom level -->
<!-- TODO: pause / start / reset? simulation / (Advance Simulation One Step) -->
<!-- <i class="material-icons" title="Pause simulation" disabled>pause</i> -->
<div id="toolbar" class="noselect">
<i class="material-icons lang_retreat_sim" title="Retreat Simulation One Step" disabled>fast_rewind</i>
<i class="material-icons lang_reset" title="Reset Simulation">stop</i>
<i class="material-icons lang_pause" title="Pause Simulation">pause</i>
<i class="material-icons lang_advance_sim" title="Advance Simulation One Step" disabled>fast_forward</i>
<span class="seperator"></span>
<i class="material-icons lang_home" title="Reset view">home</i>
<i class="material-icons lang_zoom_out" title="Zoom out">remove</i>
<input id="zoomSlider" type="range" min="20" max="300" step="2" value="100">
<i class="material-icons lang_zoom_in" title="Zoom in">add</i>
<p id="zoomValue">100%</p>
<!-- TODO: fullscreen ????? - hide everything except main, tab_bar, minimap & bottom toolbar? -->
<!-- <i class="material-icons" title="Fullscreen mode">fullscreen</i> -->
</div>
</div>
<!-- right timers menu -->
<div id="timers" class="right_menu hidden">
<h2 style="padding:0 30px;" class="lang_no_clocks">No clocks active</h2>
</div>
<!-- dark -->
<div id="dark" class="hidden"></div>
<!-- modes -->
<!-- Logic mode, electric mode, game mode (MakeItTrue), minecraft -->
<div id="modes" class="card hidden" style="height:75vh;">
<div id="close"><i class="material-icons lang_close" title="Close">close</i></div>
<h1 class="lang_modes">Modes</h1>
<div style="overflow-y: auto;max-height: 68vh;">
<div class="modes_card">
<span class="lang_mode_standard">Standard</span>
<img class="lang_circuit_board" src="assets/img/circuit_board.jpg" alt="Circuit Board">
</div>
<div class="modes_card">
<span class="lang_mode_electric">Electric</span>
<img class="lang_electricity" src="assets/img/electricity.jpg" alt="Electricity" style="object-position: bottom;">
</div>
<div class="modes_card">
<span class="lang_mode_redstone">Redstone</span>
<img class="lang_redstone" src="assets/img/redstone.jpg" alt="Redstone Class" style="object-position: 0 -70px;">
</div>
<div class="modes_card">
<span class="lang_mode_game">Game</span>
<img class="lang_circuit_board" src="assets/img/game.jpeg" alt="Circuit Board">
</div>
</div>
</div>
<!-- settings -->
<div id="settings" class="card hidden">
<div id="close"><i class="material-icons lang_close" title="Close">close</i></div>
<h1 class="lang_settings_title">General</h1>
<table style="width:100%;">
<tbody>
<tr>
<td><p><span class="lang_theme">Theme</span>:</p></td>
<td><div id="theme" class="multiselect">
<div class="theme_light settings active lan_light">Light</div>
<!-- <div class="theme_light settings active">Light #2</div> -->
<div class="theme_dark settings lang_dark">Dark</div>
<div class="theme_night settings lang_night">Night</div>
<div class="theme_neon settings lang_neon">Neon</div>
</div></td>
</tr>
<tr>
<td><p><span class="lang_line_type">Line Type</span>:</p></td>
<td><div id="line_type" class="multiselect">
<div class="lined settings active lang_lined">Lined</div>
<div class="curved settings lang_curved">Curved</div>
<div class="straight settings lang_straight">Straight</div>
</div></td>
</tr>
<tr>
<td><p><span class="lang_background">Background</span>:</p></td>
<td><div id="background" class="multiselect">
<div class="dotted settings active lang_bg_dotted">Dotted</div>
<div class="lines settings lang_lines">Lines</div>
<div class="blank settings lang_blank">Blank</div>
</div></td>
</tr>
<tr>
<td><p><span class="lang_language">Language</span>:</p></td>
<td><div id="language" class="custom-select" style="width:220px;">
<select>
<option class="lang_en" value="en">English</option>
<option class="lang_de" value="de">German</option> <!-- country codes... -->
<option class="lang_no" value="no">Norwegian</option>
</select>
</div></td>
</tr>
</tbody>
</table>
</div>
<!-- documentation -->
<div id="documentationCard" class="card hidden">
<div id="close"><i class="material-icons lang_close" title="Close">close</i></div>
<h1>Element</h1> <!-- ... -->
<p style="margin-top:10px;">
</p>
</div>
<!-- about -->
<div id="info" class="card hidden">
<div id="close"><i class="material-icons lang_close" title="Close">close</i></div>
<h1 class="lang_about_title">About</h1>
<p style="margin-top:10px;">
<span class="lang_title">Logic Simulator</span> <em>beta 0.6</em> - <span class="lang_created_by">created by</span> <strong>Kristoffer Vassbø</strong><br>
<a href="https://github.com/Vassbo/logic" target="_blank" class="lang_source_code">Source Code</a><br>
<span class="lang_support_me">Support me on Patreon</span> - comming...<br><br>
<span class="lang_request">Do you have a Bug Report or Feature Request or something else?</span><br>
<span class="lang_issue">Open an <a href="https://github.com/Vassbo/logic/issues" target="_blank">issue on Github</a>, contact me on <a href="mailto:kristoffervassbo@gmail.com">Email</a> or social media</span> - comming...
<!-- TODO: custom <a> style -->
<br><br>
<h4><span class="lang_keyboard_title">Keyboard shortcuts</span>:</h4>
<span id="shortcuts">
<p><span>ctrl</span> + <span>S</span> - Save</p> <!-- TODO: auto generate... -->
<p><span style="width:76px">space</span> - Pause/Play</p> <!-- style="width:200px" -->
</span>
</p>
</div>
<!-- loading... -->
<div id="loading" class="card hidden"> <!-- TODO: style -->
<span></span>
<br><br>
<button class="lang_cancel">Cancel</button> <!-- wip lang -->
</div>
<!-- TODO: WIP context menus -->
<div id="contextMenu" class="menu">
<ul class="menu-options">
<!-- <li class="menu-option">Save</li>
<li class="menu-option">Settings</li>
<li class="menu-option">Info</li> -->
</ul>
</div>
<script src="assets/js/script.js"></script>
<script src="assets/js/lang.js"></script>
<script src="assets/js/zoom.js"></script>
<script src="assets/js/components.js"></script>
<script src="assets/js/load.js"></script>
<script src="assets/js/context.js"></script>
</body>
</html>
<!-- Drag & drop
Click & drag (see bloons name)
(no settings, just click or drag)
middle mouse button = move !!!
drag = select && ctrl/alt/shift? + drag = move
OR
drag = move && ctrl + drag = select
choose theme... (retro, realistic, material, light, dark, ...)
(Elenergi, aut, computer, logic)
smart logic simulator - Google / Google Play
logic simulator online:
- https://logic.ly/demo
- https://circuitverse.org/simulator
https://www.logiccircuit.org/display.html
-->