@gridspace/raster-path 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/build/app.js +363 -39
- package/build/index.html +39 -1
- package/build/raster-path.js +13 -13
- package/build/style.css +65 -0
- package/build/webgpu-worker.js +475 -686
- package/package.json +6 -2
- package/scripts/build-shaders.js +1 -1
- package/src/index.js +13 -13
- package/src/shaders/{radial-raster-v2.wgsl → radial-raster.wgsl} +8 -2
- package/src/test/batch-divisor-benchmark.cjs +286 -0
- package/src/test/lathe-cylinder-2-debug.cjs +334 -0
- package/src/test/lathe-cylinder-2-test.cjs +157 -0
- package/src/test/lathe-cylinder-test.cjs +198 -0
- package/src/test/work-estimation-profile.cjs +406 -0
- package/src/test/workload-calculator-demo.cjs +113 -0
- package/src/test/workload-calibration.cjs +310 -0
- package/src/web/app.js +363 -39
- package/src/web/index.html +39 -1
- package/src/web/style.css +65 -0
- package/src/web/webgpu-worker.js +470 -687
- package/src/workload-calculator.js +318 -0
package/src/web/index.html
CHANGED
|
@@ -8,7 +8,45 @@
|
|
|
8
8
|
</head>
|
|
9
9
|
<body>
|
|
10
10
|
<div id="container">
|
|
11
|
-
<!--
|
|
11
|
+
<!-- Left Panel - Model Manipulation -->
|
|
12
|
+
<div class="model-controls">
|
|
13
|
+
<div class="section">
|
|
14
|
+
<h3>Model Rotation</h3>
|
|
15
|
+
<div class="rotation-controls">
|
|
16
|
+
<div class="rotation-row">
|
|
17
|
+
<span class="rotation-label">X:</span>
|
|
18
|
+
<button class="rotate-btn" data-axis="x" data-dir="-1">-90°</button>
|
|
19
|
+
<button class="rotate-btn" data-axis="x" data-dir="1">+90°</button>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="rotation-row">
|
|
22
|
+
<span class="rotation-label">Y:</span>
|
|
23
|
+
<button class="rotate-btn" data-axis="y" data-dir="-1">-90°</button>
|
|
24
|
+
<button class="rotate-btn" data-axis="y" data-dir="1">+90°</button>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="rotation-row">
|
|
27
|
+
<span class="rotation-label">Z:</span>
|
|
28
|
+
<button class="rotate-btn" data-axis="z" data-dir="-1">-90°</button>
|
|
29
|
+
<button class="rotate-btn" data-axis="z" data-dir="1">+90°</button>
|
|
30
|
+
</div>
|
|
31
|
+
<button id="reset-rotation" class="btn btn-small">Reset</button>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="section">
|
|
36
|
+
<h3>Tool Size</h3>
|
|
37
|
+
<select id="tool-size">
|
|
38
|
+
<option value="1.0">1.0mm</option>
|
|
39
|
+
<option value="2.0">2.0mm</option>
|
|
40
|
+
<option value="2.5" selected>2.5mm</option>
|
|
41
|
+
<option value="3.0">3.0mm</option>
|
|
42
|
+
<option value="4.0">4.0mm</option>
|
|
43
|
+
<option value="5.0">5.0mm</option>
|
|
44
|
+
</select>
|
|
45
|
+
<div id="tool-size-status" class="status">No tool loaded</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<!-- Right Panel - Controls -->
|
|
12
50
|
<div class="controls">
|
|
13
51
|
<div class="section">
|
|
14
52
|
<h3>Mode</h3>
|
package/src/web/style.css
CHANGED
|
@@ -23,10 +23,26 @@ body {
|
|
|
23
23
|
height: 100%;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
.model-controls {
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 20px;
|
|
29
|
+
left: 20px;
|
|
30
|
+
background: rgba(0, 0, 0, 0.85);
|
|
31
|
+
backdrop-filter: blur(10px);
|
|
32
|
+
border: 1px solid #333;
|
|
33
|
+
border-radius: 8px;
|
|
34
|
+
padding: 20px;
|
|
35
|
+
min-width: 200px;
|
|
36
|
+
max-width: 240px;
|
|
37
|
+
z-index: 100;
|
|
38
|
+
}
|
|
39
|
+
|
|
26
40
|
.controls {
|
|
27
41
|
position: absolute;
|
|
28
42
|
top: 20px;
|
|
29
43
|
right: 20px;
|
|
44
|
+
bottom: 20px;
|
|
45
|
+
overflow-y: auto;
|
|
30
46
|
background: rgba(0, 0, 0, 0.85);
|
|
31
47
|
backdrop-filter: blur(10px);
|
|
32
48
|
border: 1px solid #333;
|
|
@@ -156,3 +172,52 @@ input[type="checkbox"] {
|
|
|
156
172
|
.hide {
|
|
157
173
|
display: none;
|
|
158
174
|
}
|
|
175
|
+
|
|
176
|
+
/* Rotation controls */
|
|
177
|
+
.rotation-controls {
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
gap: 8px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.rotation-row {
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
gap: 6px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.rotation-label {
|
|
190
|
+
font-size: 13px;
|
|
191
|
+
font-weight: 600;
|
|
192
|
+
min-width: 18px;
|
|
193
|
+
color: #00ffff;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.rotate-btn {
|
|
197
|
+
flex: 1;
|
|
198
|
+
padding: 6px 10px;
|
|
199
|
+
font-size: 11px;
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
background: rgba(0, 255, 255, 0.08);
|
|
202
|
+
border: 1px solid #00ffff;
|
|
203
|
+
border-radius: 4px;
|
|
204
|
+
color: #00ffff;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
transition: all 0.2s ease;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.rotate-btn:hover {
|
|
210
|
+
background: rgba(0, 255, 255, 0.15);
|
|
211
|
+
box-shadow: 0 0 6px rgba(0, 255, 255, 0.2);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.rotate-btn:active {
|
|
215
|
+
background: rgba(0, 255, 255, 0.25);
|
|
216
|
+
transform: scale(0.98);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.btn-small {
|
|
220
|
+
padding: 6px 10px;
|
|
221
|
+
font-size: 11px;
|
|
222
|
+
margin-top: 4px;
|
|
223
|
+
}
|