Initial wasm simulator checkpoint
This commit is contained in:
91
web/index.html
Normal file
91
web/index.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>CNC WASM Simulator</title>
|
||||
<link rel="stylesheet" href="/styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<main class="cnc-shell">
|
||||
<section class="top-bar">
|
||||
<div class="brand">CNC SIM</div>
|
||||
<div class="status-strip">
|
||||
<span id="wasmState" class="status alarm">WASM OFFLINE</span>
|
||||
<span id="modeState" class="status">MEM</span>
|
||||
<span id="unitState" class="status">MM</span>
|
||||
<span id="programState" class="status">RESET</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="machine-panel">
|
||||
<aside class="left-panel">
|
||||
<div class="dro">
|
||||
<div class="dro-row"><span>X</span><output id="axisX">0.000</output></div>
|
||||
<div class="dro-row"><span>Y</span><output id="axisY">0.000</output></div>
|
||||
<div class="dro-row"><span>Z</span><output id="axisZ">0.000</output></div>
|
||||
<div class="dro-row"><span>A</span><output id="axisA">0.000</output></div>
|
||||
<div class="dro-row"><span>B</span><output id="axisB">0.000</output></div>
|
||||
<div class="dro-row"><span>C</span><output id="axisC">0.000</output></div>
|
||||
</div>
|
||||
|
||||
<div class="meters">
|
||||
<label>FEED <input id="feedOverride" type="range" min="0" max="150" value="100" /></label>
|
||||
<label>SPINDLE <input id="spindleOverride" type="range" min="0" max="150" value="100" /></label>
|
||||
</div>
|
||||
|
||||
<div class="keypad">
|
||||
<button data-mode="edit">EDIT</button>
|
||||
<button data-mode="mem">MEM</button>
|
||||
<button data-mode="mdi">MDI</button>
|
||||
<button data-mode="jog">JOG</button>
|
||||
<button id="resetBtn">RESET</button>
|
||||
<button id="parseBtn" class="cycle">CYCLE START</button>
|
||||
<button id="holdBtn">FEED HOLD</button>
|
||||
<button id="stopBtn" class="stop">STOP</button>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<section class="center-panel">
|
||||
<canvas id="toolpathCanvas" width="1200" height="760"></canvas>
|
||||
<div class="soft-keys">
|
||||
<button>POS</button>
|
||||
<button>PROG</button>
|
||||
<button>OFFSET</button>
|
||||
<button>TOOL</button>
|
||||
<button>GRAPH</button>
|
||||
<button>ALARM</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<aside class="right-panel">
|
||||
<div class="program-header">
|
||||
<span>O0001</span>
|
||||
<label class="backend-select">
|
||||
<span>BACKEND</span>
|
||||
<select id="backendSelect">
|
||||
<option value="smoke">SMOKE</option>
|
||||
<option value="linuxcnc-rs274">LINUXCNC</option>
|
||||
</select>
|
||||
</label>
|
||||
<span id="lineCount">0 LINES</span>
|
||||
</div>
|
||||
<textarea id="programInput" spellcheck="false">G21 G90 G17
|
||||
T1 M6
|
||||
S8000 M3
|
||||
G0 X0 Y0 Z5
|
||||
F600
|
||||
G1 Z-1
|
||||
G1 X40 Y0
|
||||
G3 X40 Y40 I0 J20
|
||||
G1 X0 Y40
|
||||
G1 X0 Y0
|
||||
M30</textarea>
|
||||
<div id="alarmList" class="alarm-list"></div>
|
||||
</aside>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<script type="module" src="/src/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user