BlueGit

timfa timdraw

Files

timdraw / static / index.html

index.html

727c7433 History
index.html 8.7 KiB Download Raw
1<!DOCTYPE html>
2<html lang="nl">
3
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <title>Timdraw</title>
8 <link rel="stylesheet" href="/static/style.css">
9</head>
10
11<body>
12 <header>
13 <div class="brand">
14 <strong>Timdraw</strong>
15 <button id="machine-name" type="button" class="machine-name">
16 <span id="lamp" class="lamp"></span>
17 Bachin TA4
18 </button>
19 <a id="local-url" href="http://127.0.0.1:8765/">127.0.0.1:8765</a>
20 </div>
21 <p id="toast" class="toast" hidden></p>
22 <div class="header-actions">
23 <button id="btn-fit" type="button">Passend</button>
24 <label class="check"><input id="show-travel" type="checkbox"> Verplaatsingen</label>
25 </div>
26 </header>
27 <div class="layout">
28 <aside class="panel left">
29 <section>
30 <h2>Tekening</h2>
31 <div class="row">
32 <button id="btn-import" type="button" class="primary">Importeer SVG</button>
33 <input id="file" type="file" accept=".svg,image/svg+xml" hidden>
34 </div>
35 <label class="field">Voorbeeld uit Bachin
36 <select id="demos">
37 <option value="">—</option>
38 </select>
39 </label>
40 </section>
41 <section>
42 <h2>Tekst</h2>
43 <textarea id="new-text" rows="3" placeholder="Tekst op één lijn per regel"></textarea>
44 <div class="split">
45 <label class="field">Font
46 <select id="new-font">
47 <option value="futural">Sans</option>
48 <option value="rowmans">Romein</option>
49 <option value="scripts">Handschrift</option>
50 </select>
51 </label>
52 <label class="field">Hoogte mm
53 <input id="new-size" type="number" min="2" max="80" step="0.5" value="12">
54 </label>
55 </div>
56 <button id="btn-text" type="button">Plaats tekst</button>
57 </section>
58 <section>
59 <h2>Objecten</h2>
60 <ul id="layers"></ul>
61 <div class="row wrap">
62 <button id="btn-copy" type="button">Kopieer</button>
63 <button id="btn-paste" type="button">Plak</button>
64 <button id="btn-dup" type="button">Dupliceer</button>
65 <button id="btn-delete" type="button">Wis</button>
66 <button id="btn-back" type="button">Achter</button>
67 <button id="btn-front" type="button">Voor</button>
68 </div>
69 <p class="hint">Slepen verplaatst. Hoeken schalen. Het handvat boven het kader draait. Delete wist, Ctrl+C /
70 Ctrl+V kopieert.</p>
71 </section>
72 </aside>
73 <main>
74 <canvas id="page"></canvas>
75 </main>
76 <aside class="panel right">
77 <section>
78 <h2 id="prop-title">Eigenschappen</h2>
79 <div id="text-props" hidden>
80 <label class="field">Tekst
81 <textarea id="prop-text" rows="3"></textarea>
82 </label>
83 <div class="split">
84 <label class="field">Font
85 <select id="prop-font">
86 <option value="futural">Sans</option>
87 <option value="rowmans">Romein</option>
88 <option value="scripts">Handschrift</option>
89 </select>
90 </label>
91 <label class="field">Hoogte mm
92 <input id="prop-size" type="number" min="2" max="80" step="0.5">
93 </label>
94 </div>
95 </div>
96 <div class="modes">
97 <label class="check"><input id="prop-line" type="checkbox" checked> Lijn</label>
98 <label class="check"><input id="prop-fill" type="checkbox"> Vulling</label>
99 </div>
100 <p class="hint">Lijn tekent de paden zelf. Vulling zet er een arcering in. Allebei aan tekent de contour en de
101 arcering.</p>
102 <div class="split">
103 <label class="field">Hoek °
104 <input id="prop-angle" type="number" min="-180" max="180" step="1" value="45">
105 </label>
106 <label class="field">Lijnafstand mm
107 <input id="prop-spacing" type="number" min="0.3" max="30" step="0.1" value="2">
108 </label>
109 </div>
110 <label class="field">Vulpercentage
111 <input id="prop-percent" type="number" min="2" max="100" step="1" value="20">
112 </label>
113 <label class="check"><input id="prop-cross" type="checkbox"> Crosshatch</label>
114 <label class="check"><input id="prop-gray" type="checkbox"> Grijswaarden</label>
115 <div id="gray-props">
116 <label class="field">Tredes
117 <input id="prop-steps" type="number" min="2" max="16" step="1" value="5">
118 </label>
119 <div class="split">
120 <label class="field">Donker mm
121 <input id="prop-dark" type="number" min="0.3" max="20" step="0.1" value="0.8">
122 </label>
123 <label class="field">Licht mm
124 <input id="prop-light" type="number" min="0.4" max="40" step="0.1" value="4">
125 </label>
126 </div>
127 <p class="hint">Donkerder wordt krapper gearceerd. Lichter krijgt meer afstand. Bijna-wit slaat Timdraw over.
128 </p>
129 </div>
130 <p id="defaults-hint" class="hint">Zonder selectie gelden deze waarden voor het volgende import- of tekstobject.
131 </p>
132 </section>
133 <section>
134 <h2>Machine</h2>
135 <p id="machine-error" class="error" hidden></p>
136 <p id="position" class="mono">X — &nbsp; Y — &nbsp; Z —</p>
137 <div class="jog">
138 <button type="button" data-x="0" data-y="1">↑</button>
139 <div class="jog-mid">
140 <button type="button" data-x="-1" data-y="0">←</button>
141 <select id="jog-step">
142 <option value="1">1 mm</option>
143 <option value="10" selected>10 mm</option>
144 <option value="50">50 mm</option>
145 </select>
146 <button type="button" data-x="1" data-y="0">→</button>
147 </div>
148 <button type="button" data-x="0" data-y="-1">↓</button>
149 </div>
150 <div class="row wrap">
151 <button id="btn-pen-up" type="button">Pen omhoog</button>
152 <button id="btn-pen-down" type="button">Pen omlaag</button>
153 <button id="btn-unlock" type="button">Ontgrendel</button>
154 <button id="btn-home" type="button">Home</button>
155 <button id="btn-release" type="button">Assen los</button>
156 </div>
157 <div class="split">
158 <label class="field">Tekensnelheid
159 <input id="draw-speed" type="number" min="50" max="6000" step="50" value="3000">
160 </label>
161 <label class="field">Verplaatsing
162 <input id="travel-speed" type="number" min="50" max="6000" step="50" value="5000">
163 </label>
164 </div>
165 <div class="split">
166 <label class="field">Pen omhoog Z
167 <input id="pen-up" type="number" min="0" max="12" step="0.1" value="0">
168 </label>
169 <label class="field">Pen omlaag Z
170 <input id="pen-down" type="number" min="0" max="12" step="0.1" value="5">
171 </label>
172 </div>
173 <label class="field">Pauze na pen ms
174 <input id="dwell" type="number" min="0" max="2000" step="10" value="120">
175 </label>
176 <label class="field">Nulpunt
177 <select id="origin">
178 <option value="top-left" selected>Linksboven</option>
179 <option value="bottom-left">Linksonder</option>
180 </select>
181 </label>
182 <label class="check"><input id="return-home" type="checkbox" checked> Terug naar nulpunt</label>
183 <label class="check"><input id="allow-outside" type="checkbox"> Toch buiten A4 sturen</label>
184 <p id="stats" class="hint"></p>
185 <div class="progress">
186 <div id="bar"></div>
187 </div>
188 <div class="row">
189 <button id="btn-plot" type="button" class="primary">Teken</button>
190 <button id="btn-pause" type="button">Pauze</button>
191 <button id="btn-stop" type="button">Stop</button>
192 <button id="btn-trace" type="button">Voorbeeld</button>
193 </div>
194 <p class="hint">Na homing ligt het nulpunt linksboven. X loopt naar rechts tot 200 mm. Y omhoog is positief,
195 dus het blad loopt naar beneden tot −297 mm. Pen omhoog is Z 0, pen omlaag Z 5. Verplaatsingen gaan met G1,
196 zodat de snelheid echt geldt.
197 </p>
198 </section>
199 </aside>
200 </div>
201 <dialog id="connect-modal" class="connect-modal">
202 <h2>Machine</h2>
203 <p id="machine-state">Niet verbonden</p>
204 <p id="firmware" class="hint"></p>
205 <div class="split">
206 <label class="field">Poort
207 <select id="port"></select>
208 </label>
209 <button id="btn-connect" type="button" class="primary">Verbinden</button>
210 </div>
211 <div class="row">
212 <button id="connect-close" type="button">Sluiten</button>
213 </div>
214 </dialog>
215 <script src="/static/app.js"></script>
216</body>
217
218</html>