-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
114 lines (92 loc) · 3.19 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
<!DOCTYPE html>
<html lang = "en">
<head>
<meta charset="UTF-8">
<title>FSS</title>
<script type = "module" src = "src/canvas.js"></script>
<script type = "module" src = "src/elements.js"></script>
<script type = "module" src = "src/lib/geometry.js"></script>
<script type = "module" src = "src/input.js"></script>
<script type = "module" src = "src/lib/graph.js"></script>
<script type = "module" src = "src/renderer.js"></script>
<script type = "module" src = "src/simulate.js"></script>
<script type = "module" src = "src/api.js"></script>
<script type="module" src="src/canvasManager.js"></script>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body style="font-family: Tahoma, Geneva, sans-serif">
<header>
<h1 class="content">Finite State Machine Builder</h1>
</header>
<div style="max-width:1300px;margin-left:auto;margin-right:auto;">
<canvas id = "canvas" tabindex="1" width="2000" height="1000" oncontextmenu="return false;">
This browser does not support HTML5 canvas
</canvas>
<table id="io_table">
<tr>
<th> Input </th>
<th>Status </th>
</tr>
</table>
</div>
<div id="branches">
<button style="display: none;" id="branch-all">All</button>
</div>
<br>
<div class="content">
<button id="stp_btn">Step</button>
<button id="run_btn">Run</button>
<button id="draw_btn">Draw Table</button>
<button id="clear_btn">Clear</button>
<button id="reset_btn">Reset Simulation</button>
</div>
<br>
<fieldset id="input_box">
<legend>Input String:</legend>
<input type="text" id="string_input"/>
<button id="submit_btn"> Submit </button>
</fieldset>
<label for="string_input" style="visibility:hidden;">
Input a new string to test the FSM against
</label>
<br>
<table id="t_table" style="margin-left:auto; margin-right:auto;margin-bottom: 5px;">
</table>
<div class="content" id="saves">
<span id="save0">
<button id="save_btn" >Save</button>
<button id="load_btn">Load</button>
</span>
</div>
<!-- menu for new arrows -->
<div id="arrow_menu" class="arrow_menu">
<input id="if_" type="text" name="">
<!-- Output used for models of computation like PDAs or TMs -->
<!-- <input id="out" type="text" name=""> -->
</div>
<label for="if_" style="visibility:hidden;">Input for FSM branches</label>
<br>
<div class="content">
<label visiblity="false" for="toggle_dark">Toggle dark mode</label>
<input id="toggle_dark" type="checkbox"/>
</div>
<hr>
<div class="content">
<p>Instructions:</p>
</div>
<div class="content">
<ul style="list-style-type:none;">
<li>Double-click to add a new state</li>
<li>Left-click & drag to move a state/connection</li>
<li>Shift + left-click to add a connection between states</li>
<li>Right click to delete a state</li>
</ul>
<ul style="list-style-type:none;">
<li>Enter a string as input for the FSM</li>
<li>A string can be submitted multiple times</li>
<li>Press step to simulate the FSM against the input</li>
<li>Reset will reset the simulation</li>
</ul>
</div>
</body>
</html>