BlueGit

timfa timdraw

Files

timdraw / static / index.html

index.html

index.html 8.2 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 <div class="plot-actions">
22 <button id="btn-plot" type="button" class="primary">Teken</button>
23 <button id="btn-pause" type="button">Pauze</button>
24 <button id="btn-trace" type="button">Voorbeeld</button>
25 <button id="btn-stop" type="button">Stop</button>
26 </div>
27 <div class="header-actions">
28 <p id="toast" class="toast" hidden></p>
29 <button id="btn-fit" type="button">Passend</button>
30 <label class="check"><input id="show-travel" type="checkbox"> Verplaatsingen</label>
31 </div>
32 </header>
33 <div class="layout">
34 <aside class="panel left">
35 <section>
36 <h2>Tekening</h2>
37 <div class="row wrap">
38 <button id="btn-import" type="button" class="primary">Importeer SVG</button>
39 <button id="btn-open" type="button">Open</button>
40 <button id="btn-save" type="button">Opslaan</button>
41 <input id="file" type="file" accept=".svg,image/svg+xml" hidden>
42 <input id="open-file" type="file" accept=".tdrw,application/json" hidden>
43 </div>
44 <label class="field">Voorbeeld uit Bachin
45 <select id="demos">
46 <option value="">—</option>
47 </select>
48 </label>
49 </section>
50 <section>
51 <h2>Tekst</h2>
52 <textarea id="new-text" rows="3" placeholder="Tekst op één lijn per regel"></textarea>
53 <div class="split">
54 <label class="field">Font
55 <select id="new-font">
56 <option value="futural">Sans</option>
57 <option value="rowmans">Romein</option>
58 <option value="scripts">Handschrift</option>
59 </select>
60 </label>
61 <label class="field">Hoogte mm
62 <input id="new-size" type="number" min="2" max="80" step="0.5" value="12">
63 </label>
64 </div>
65 <button id="btn-text" type="button">Plaats tekst</button>
66 </section>
67 <section>
68 <h2>Objecten</h2>
69 <ul id="layers"></ul>
70 <div class="row wrap">
71 <button id="btn-copy" type="button">Kopieer</button>
72 <button id="btn-paste" type="button">Plak</button>
73 <button id="btn-dup" type="button">Dupliceer</button>
74 <button id="btn-delete" type="button">Wis</button>
75 <button id="btn-back" type="button">Achter</button>
76 <button id="btn-front" type="button">Voor</button>
77 </div>
78 <label class="check"><input id="per-object" type="checkbox"> Objecten individueel tekenen</label>
79 <p class="hint">Slepen verplaatst. Hoeken schalen. Het handvat boven het kader draait. Delete wist, Ctrl+C /
80 Ctrl+V kopieert.</p>
81 </section>
82 </aside>
83 <main>
84 <canvas id="page"></canvas>
85 </main>
86 <aside class="panel right">
87 <section>
88 <h2 id="prop-title">Eigenschappen</h2>
89 <div id="text-props" hidden>
90 <label class="field">Tekst
91 <textarea id="prop-text" rows="3"></textarea>
92 </label>
93 <div class="split">
94 <label class="field">Font
95 <select id="prop-font">
96 <option value="futural">Sans</option>
97 <option value="rowmans">Romein</option>
98 <option value="scripts">Handschrift</option>
99 </select>
100 </label>
101 <label class="field">Hoogte mm
102 <input id="prop-size" type="number" min="2" max="80" step="0.5">
103 </label>
104 </div>
105 </div>
106 <div class="modes">
107 <label class="check"><input id="prop-line" type="checkbox" checked> Lijn</label>
108 <label class="check"><input id="prop-fill" type="checkbox"> Vulling</label>
109 </div>
110 <div class="split">
111 <label class="field">Hoek °
112 <input id="prop-angle" type="number" min="-180" max="180" step="1" value="45">
113 </label>
114 <label class="field">Lijnafstand mm
115 <input id="prop-spacing" type="number" min="0.3" max="30" step="0.1" value="2">
116 </label>
117 </div>
118 <label class="field">Vulpercentage
119 <input id="prop-percent" type="number" min="2" max="100" step="1" value="20">
120 </label>
121 <label class="check"><input id="prop-cross" type="checkbox"> Crosshatch</label>
122 <label class="check"><input id="prop-gray" type="checkbox"> Grijswaarden</label>
123 <div id="gray-props">
124 <label class="field">Tredes
125 <input id="prop-steps" type="number" min="2" max="16" step="1" value="5">
126 </label>
127 <div class="split">
128 <label class="field">Donker mm
129 <input id="prop-dark" type="number" min="0.3" max="20" step="0.1" value="0.8">
130 </label>
131 <label class="field">Licht mm
132 <input id="prop-light" type="number" min="0.4" max="40" step="0.1" value="4">
133 </label>
134 </div>
135 <p class="hint">Donkerder wordt krapper gearceerd. Lichter krijgt meer afstand. Bijna-wit slaat Timdraw over.
136 </p>
137 </div>
138 </section>
139 <section>
140 <h2>Machine</h2>
141 <p id="machine-error" class="error" hidden></p>
142 <p id="position" class="mono">X — &nbsp; Y — &nbsp; Z —</p>
143 <div class="jog">
144 <button type="button" data-x="0" data-y="1">↑</button>
145 <div class="jog-mid">
146 <button type="button" data-x="-1" data-y="0">←</button>
147 <select id="jog-step">
148 <option value="1">1 mm</option>
149 <option value="10" selected>10 mm</option>
150 <option value="50">50 mm</option>
151 </select>
152 <button type="button" data-x="1" data-y="0">→</button>
153 </div>
154 <button type="button" data-x="0" data-y="-1">↓</button>
155 </div>
156 <div class="row wrap">
157 <button id="btn-pen-up" type="button">Pen omhoog</button>
158 <button id="btn-pen-down" type="button">Pen omlaag</button>
159 <button id="btn-unlock" type="button">Ontgrendel</button>
160 <button id="btn-home" type="button">Home</button>
161 <button id="btn-release" type="button">Assen los</button>
162 </div>
163 <p id="stats" class="hint"></p>
164 <div class="progress">
165 <div id="bar"></div>
166 </div>
167 </section>
168 </aside>
169 </div>
170 <dialog id="connect-modal" class="connect-modal">
171 <h2>Machine</h2>
172 <p id="machine-state">Niet verbonden</p>
173 <p id="firmware" class="hint"></p>
174 <div class="split">
175 <label class="field">Poort
176 <select id="port"></select>
177 </label>
178 <button id="btn-connect" type="button" class="primary">Verbinden</button>
179 </div>
180 <div class="split">
181 <label class="field">Tekensnelheid
182 <input id="draw-speed" type="number" min="50" max="6000" step="50" value="3000">
183 </label>
184 <label class="field">Verplaatsing
185 <input id="travel-speed" type="number" min="50" max="6000" step="50" value="5000">
186 </label>
187 </div>
188 <div class="split">
189 <label class="field">Pen omhoog Z
190 <input id="pen-up" type="number" min="0" max="12" step="0.1" value="0">
191 </label>
192 <label class="field">Pen omlaag Z
193 <input id="pen-down" type="number" min="0" max="12" step="0.1" value="5">
194 </label>
195 </div>
196 <label class="field">Pauze na pen ms
197 <input id="dwell" type="number" min="0" max="2000" step="10" value="120">
198 </label>
199 <label class="field">Nulpunt
200 <select id="origin">
201 <option value="top-left" selected>Linksboven</option>
202 <option value="bottom-left">Linksonder</option>
203 </select>
204 </label>
205 <div class="row">
206 <button id="connect-close" type="button">Sluiten</button>
207 </div>
208 </dialog>
209 <script src="/static/app.js"></script>
210</body>
211
212</html>