@omrips/viewstl 0.0.0-stage → 2.0.0-rc.1
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/LICENSE +21 -0
- package/README.md +162 -2
- package/THIRD-PARTY-NOTICES.txt +1129 -0
- package/build/v2/README.md +11 -0
- package/build/v2/THIRD-PARTY-NOTICES.txt +1129 -0
- package/build/v2/cad/occt-import-js.js +8 -0
- package/build/v2/cad/occt-import-js.source.txt +57 -0
- package/build/v2/cad/occt-import-js.wasm +0 -0
- package/build/v2/cad/prepare-cad.source.txt +112 -0
- package/build/v2/chunks/archive-VGS4J4Z7.js +1 -0
- package/build/v2/chunks/cad-VY42CMP4.js +1 -0
- package/build/v2/chunks/chunk-JH3H3JWA.js +1 -0
- package/build/v2/chunks/chunk-JS56KC3I.js +1 -0
- package/build/v2/chunks/chunk-R3HNTB5A.js +38 -0
- package/build/v2/chunks/chunk-U33KANV7.js +1 -0
- package/build/v2/chunks/chunk-ZMK3UZZE.js +1 -0
- package/build/v2/chunks/chunk-ZSV4PTIA.js +1 -0
- package/build/v2/chunks/export-7OP4ZGGJ.js +29 -0
- package/build/v2/chunks/export-cad-QPBT756V.js +13 -0
- package/build/v2/chunks/export-zip-EDCWH5PX.js +1 -0
- package/build/v2/chunks/print-check-2PU7CSL3.js +1 -0
- package/build/v2/chunks/scene-export-KQBS7VRJ.js +1 -0
- package/build/v2/chunks/scene-reader-APUJOPUR.js +1 -0
- package/build/v2/stl_viewer.min.js +51 -0
- package/build/v2/viewstl.cjs +5445 -0
- package/build/v2/viewstl.d.cts +446 -0
- package/build/v2/viewstl.d.ts +446 -0
- package/build/v2/viewstl.js +5426 -0
- package/build/v2/viewstl.min.js +51 -0
- package/build/v2/viewstl.worker.js +1 -0
- package/docs/v2-compatibility.md +204 -0
- package/docs/v2-usage.md +723 -0
- package/docs/v2-verification.md +423 -0
- package/legacy/README.md +43 -0
- package/package.json +73 -4
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
# ViewSTL v2 verification
|
|
2
|
+
|
|
3
|
+
This file records dated checks. Older sections describe the alpha at the time
|
|
4
|
+
of each check; release-candidate results are recorded separately below.
|
|
5
|
+
|
|
6
|
+
## npm release candidate 2.0.0-rc.1 — 2026-10-19
|
|
7
|
+
|
|
8
|
+
Prepared the first public npm package as `@omrips/viewstl`, with the release
|
|
9
|
+
candidate on the `next` tag. The package version and `StlViewer.version` agree.
|
|
10
|
+
The GitHub legacy paths and all archived legacy files remain unchanged.
|
|
11
|
+
|
|
12
|
+
Validation against the packed tarball installed into a clean consumer:
|
|
13
|
+
|
|
14
|
+
- 112 Node tests pass, with strict TypeScript source-consumer checks.
|
|
15
|
+
- ESM imports and CommonJS requires work without a browser DOM. Both installed
|
|
16
|
+
package TypeScript entry points pass strict NodeNext checks.
|
|
17
|
+
- All 35 installed files match the release source by SHA-256. The allowlist
|
|
18
|
+
includes the viewer, module worker, lazy chunks, CAD glue/WASM, declarations,
|
|
19
|
+
documentation and license/source notices. No credentials, test data, local
|
|
20
|
+
server scripts, node_modules or legacy runtime files are packaged.
|
|
21
|
+
- Production builds succeed with Vite 8.3.4 and Webpack 5.112.0. Both follow the
|
|
22
|
+
documented complete-static-directory copy and explicit `worker_url` setup.
|
|
23
|
+
- 11 browser checks pass in each of four consumers: Vite, Webpack, direct ESM
|
|
24
|
+
and classic script (44 total). These use the installed distribution and real
|
|
25
|
+
WebGL 2/module workers for local binary STL, STL/OBJ/3MF/STEP/IGES exports and
|
|
26
|
+
reimports, print checks, PNG export, VSB save/load and VSJ export.
|
|
27
|
+
- Browser: desktop Codex in-app Chromium 155.0.0.0 on Windows, without device
|
|
28
|
+
emulation. The local pages use a same-origin CSP without JavaScript eval;
|
|
29
|
+
WebAssembly compilation is allowed. Parser/CAD assets are self-hosted.
|
|
30
|
+
- The legacy guard verifies unchanged tracked legacy files and all 14 archived
|
|
31
|
+
snapshot hashes.
|
|
32
|
+
|
|
33
|
+
Reproduction scripts, build fixtures, tarball inventory, terminal results,
|
|
34
|
+
browser output and screenshots are retained locally in the ignored
|
|
35
|
+
`test-results/npm-2.0.0-rc.1/` folder. Firefox, Safari, physical touch/mobile
|
|
36
|
+
devices and broader real-world large-CAD workloads remain unverified; this
|
|
37
|
+
release is a candidate, not a claim that those checks have passed. The optional
|
|
38
|
+
bundler `worker_factory` variant was not exercised by this release check.
|
|
39
|
+
|
|
40
|
+
## URL drops in the optional app controller — 2026-10-02
|
|
41
|
+
|
|
42
|
+
`mountViewstlApp` routes dropped HTTP/HTTPS links through its configured relay and
|
|
43
|
+
existing URL import queue. Six new unit cases bring the plugin suite to 93 passing
|
|
44
|
+
tests; strict types and all 14 legacy integrity checks pass. The site's full
|
|
45
|
+
96-assertion browser harness and 15 app lifecycle checks pass with this build.
|
|
46
|
+
|
|
47
|
+
Desktop headless Edge 154.0.4258.48 passes 15 local and 16 live URL-drop checks:
|
|
48
|
+
URI/plain-text/Firefox payloads, signed query preservation, deduplication, local
|
|
49
|
+
file precedence, untouched input behavior, unsupported schemes, failure recovery,
|
|
50
|
+
cancellation and an actual anchor drag. Firefox data is emulated; Firefox/Safari
|
|
51
|
+
and physical devices were not tested. Live preview also fetched and parsed a
|
|
52
|
+
real public STEP URL through Go. Other deterministic URL-drop response fixtures
|
|
53
|
+
are explicitly mocked in the browser runner. These changes and the preceding
|
|
54
|
+
export API build ship on preview in release `20261002-8f91150b7782`; export controls
|
|
55
|
+
are still not wired to the site. The legacy site was not changed.
|
|
56
|
+
|
|
57
|
+
## Plugin mesh exports — 2026-10-02
|
|
58
|
+
|
|
59
|
+
The local v2 build adds `export_models` and `download_models` for binary STL,
|
|
60
|
+
OBJ/MTL, 3MF, STEP/STP and IGES/IGS. These are plugin-only changes; the website
|
|
61
|
+
and deployed preview assets have not been synchronized or changed for this work.
|
|
62
|
+
All writers are JavaScript worker modules; CAD export does not use the Go relay
|
|
63
|
+
or download a new CAD engine. The native WebGL2 renderer and legacy APIs remain.
|
|
64
|
+
|
|
65
|
+
Validation:
|
|
66
|
+
|
|
67
|
+
- 87 Node tests pass, including 14 export cases. The strict TypeScript consumer
|
|
68
|
+
check passes. All 14 archived legacy files verify unchanged.
|
|
69
|
+
- Open CASCADE independently reads generated STEP and IGES: open triangle
|
|
70
|
+
surfaces, multiple models, nonuniform scale, rotation, translation, millimeter
|
|
71
|
+
and inch units. Triangle counts, bounds and area match the expected mesh.
|
|
72
|
+
Checking area exposed IGES numeric tokens crossing padded parameter records;
|
|
73
|
+
writers now wrap at parameter boundaries and the regression covers this.
|
|
74
|
+
- Official 3MF Core/Materials XSD appendix validation passes with lxml. The
|
|
75
|
+
validation helper uses a stricter one-million occurrence cap because libxml2
|
|
76
|
+
2.11 rejects the published `2147483647` value, and trims the leading space in
|
|
77
|
+
the Materials appendix's `type=" ST_Numbers"`. No geometry/schema rules are
|
|
78
|
+
relaxed. ZIP/XML tests also verify object separation, shared vertices, units,
|
|
79
|
+
per-vertex color gradients, safe names and material references.
|
|
80
|
+
- Headless desktop Edge **154.0.4258.48** passes all 9 export browser scenarios
|
|
81
|
+
and all 15 existing browser compatibility scenarios. The export page uses a
|
|
82
|
+
same-origin CSP without JavaScript eval. Tests cover real workers, all-format
|
|
83
|
+
reimport, preserved live buffers, selected export, OBJ ZIP, a real browser
|
|
84
|
+
download, running/queued cancellation, callback exceptions, scene cleanup,
|
|
85
|
+
memory rejection and subsequent recovery. No unexpected page/WebGL errors.
|
|
86
|
+
- Export/reimport requests were same-origin GETs; the actual download used a
|
|
87
|
+
local Blob. No file upload or external endpoint request occurred. Edge's
|
|
88
|
+
internal `edge://` downloads-panel resources are excluded from web traffic.
|
|
89
|
+
- A **1,000,000-triangle binary STL** produced **50,000,084 bytes** in **1,277 ms**
|
|
90
|
+
with **75 animation frames** during export. This is one synthetic local desktop
|
|
91
|
+
observation, not a performance guarantee or a measured process-memory peak.
|
|
92
|
+
|
|
93
|
+
Evidence: `test-results/exports/browser.json`, `browser.png`, `compatibility.txt`,
|
|
94
|
+
`assembly-mm.step`, `assembly-inch.step`, `assembly-mm.iges`, `assembly-inch.iges`
|
|
95
|
+
and `colored-scene.3mf`. These generated files are ignored by Git. Reproduce the
|
|
96
|
+
browser checks with a local plugin server and `scripts/check-export-browser.mjs`
|
|
97
|
+
(Playwright module supplied by `VIEWSTL_PLAYWRIGHT`, URL by `VIEWSTL_QA_URL`).
|
|
98
|
+
|
|
99
|
+
The optional `scripts/check-export-3mf-schema.py` reads the following downloaded
|
|
100
|
+
source files from `test-results/exports` and validates the generated 3MF fixture:
|
|
101
|
+
|
|
102
|
+
- `3mf-core-spec.txt`: https://raw.githubusercontent.com/3MFConsortium/spec_core/master/3MF%20Core%20Specification.md
|
|
103
|
+
- `3mf-materials-spec.txt`: https://raw.githubusercontent.com/3MFConsortium/spec_materials/master/3MF%20Materials%20Extension.md
|
|
104
|
+
- `xml.xsd`: https://www.w3.org/2001/xml.xsd
|
|
105
|
+
|
|
106
|
+
Limits: STEP/IGES contain planar mesh surfaces, not recovered analytic CAD solids
|
|
107
|
+
or feature history. No F3D is implemented. 3MF performs edge/winding/volume checks,
|
|
108
|
+
not full solid repair or self-intersection testing. Physical phones/tablets,
|
|
109
|
+
Safari/Firefox, commercial CAD applications and large STEP/IGES export workloads
|
|
110
|
+
have not been validated in this change. Export options and omissions are listed
|
|
111
|
+
in [usage](v2-usage.md#local-mesh-export).
|
|
112
|
+
|
|
113
|
+
## STEP/IGES addition — 2026-10-01
|
|
114
|
+
|
|
115
|
+
The local build adds STEP/STP and IGES/IGS with lazy, self-hosted WASM in
|
|
116
|
+
disposable workers. The 54 plugin tests and TypeScript checks pass. Six CAD
|
|
117
|
+
tests also pass under Node's `--disallow-code-generation-from-strings` flag:
|
|
118
|
+
format aliases, unit conversion, assembly geometry/colors, malformed input,
|
|
119
|
+
recovery, index validation, input/output budgets and rejection of an allocation
|
|
120
|
+
beyond a 32 MiB configured WASM heap. The 14 archived legacy files verify unchanged.
|
|
121
|
+
|
|
122
|
+
The website's 16 unit tests and its complete browser harness pass in local
|
|
123
|
+
headless Edge 154.0.4258.37. Additional browser checks verify no CAD downloads
|
|
124
|
+
for the empty page or STL, cancellation during the reader download, subsequent
|
|
125
|
+
CAD recovery and GET-only same-origin asset requests without file uploads.
|
|
126
|
+
The browser harness exercises all four aliases, mm dimensions, colors, malformed
|
|
127
|
+
CAD recovery and multiple CAD files, alongside existing STL/OBJ/3MF and view tests.
|
|
128
|
+
|
|
129
|
+
These are desktop automated checks, with a 390px emulated viewport for layout.
|
|
130
|
+
Physical mobile devices, Safari/Firefox and large real-world CAD assemblies have
|
|
131
|
+
not been validated. No new browser-memory or large-CAD performance claim is made.
|
|
132
|
+
After explicit deployment authorization, the synchronized site and viewer were
|
|
133
|
+
deployed as preview release `20261001-f40c6b922ea5`. All 22 public file hashes
|
|
134
|
+
matched. Live headless Edge verified all four CAD aliases, correct mm dimensions,
|
|
135
|
+
assembly positions/colors, malformed-file recovery and existing STL/OBJ/3MF
|
|
136
|
+
loading. Observed network requests were same-origin GETs with no uploaded file
|
|
137
|
+
data. The WASM response used `application/wasm` and gzip; no CSP/page errors were
|
|
138
|
+
reported. Deployment evidence is in the website workspace's
|
|
139
|
+
`results/deploy-20261001-f40c6b922ea5/`. DNS and the legacy site were unchanged.
|
|
140
|
+
|
|
141
|
+
Checked on 2026-09-30, version `2.0.0-alpha.1`, on Windows in the
|
|
142
|
+
Codex in-app Chromium browser. These results describe this development
|
|
143
|
+
release, not a claim of complete compatibility with every legacy integration.
|
|
144
|
+
|
|
145
|
+
## Completed checks
|
|
146
|
+
|
|
147
|
+
Update 2026-10-01, additional views: the Node suite now has 43 passing cases.
|
|
148
|
+
All 15 existing browser compatibility checks passed, plus 11 new appearance
|
|
149
|
+
checks in `tests/v2/appearance-browser.html`. Those validate actual PNG pixels
|
|
150
|
+
for mesh lines, studio shading, X-ray transparency, feature edges, wireframe,
|
|
151
|
+
front/back orientation colors, half-model clipping and reversed clipping;
|
|
152
|
+
all section axes/endpoints; independent smooth shading; VSJ/VSB persistence;
|
|
153
|
+
graphics context restoration; and repeated switching/resource cleanup.
|
|
154
|
+
Node cases cover section-aware picking, edge angles, budget rejection, worker
|
|
155
|
+
failure and stale view completion. Strict consumer types and all 14 archived
|
|
156
|
+
legacy hashes passed. The site passed 31 browser checks and 2 policy checks.
|
|
157
|
+
Responsive controls were inspected at 320 × 740 and 390 × 844, with no
|
|
158
|
+
horizontal overflow; these are desktop viewport simulations, not real touch
|
|
159
|
+
hardware tests. Live preview loading, smooth/edge derivation, Studio and
|
|
160
|
+
section controls passed with no browser warnings/errors. The new appearance
|
|
161
|
+
tests use small fixtures; no additional large-model stress test was run.
|
|
162
|
+
|
|
163
|
+
Update 2026-10-01: chunked local binary STL parsing, optional memory-budget checks,
|
|
164
|
+
OBJ line iteration and GPU-allocation failure cleanup were added. The 36-test
|
|
165
|
+
Node suite passed, followed by the additional GPU fault-injection test (37 total
|
|
166
|
+
cases). TypeScript and legacy preservation checks passed. All 15 browser cases
|
|
167
|
+
below passed again; the separate preview site passed 22 browser and 2 policy
|
|
168
|
+
checks. A 300,758,484-byte binary STL with 6,015,168 triangles rendered locally
|
|
169
|
+
and on preview.viewstl.com, exceeding the old byte and triangle limits. Its
|
|
170
|
+
wireframe request was rejected by the configured memory budget before map
|
|
171
|
+
allocation. The file stayed on the client. This is one desktop test, not a
|
|
172
|
+
guarantee for every model/device; large OBJ/3MF and low-memory mobile stress
|
|
173
|
+
tests remain outstanding. Existing package-tarball checks below are from the
|
|
174
|
+
September verification; no new npm publication occurred.
|
|
175
|
+
|
|
176
|
+
| Check | Result |
|
|
177
|
+
| --- | --- |
|
|
178
|
+
| Node automated tests | 30 passed, 0 failed |
|
|
179
|
+
| Real browser integration checks | 15 passed, 0 failed; no unexpected callback errors |
|
|
180
|
+
| TypeScript strict consumer checks | ESM and CommonJS package declarations checked |
|
|
181
|
+
| Local npm tarball installation | ESM/CJS constructors, worker/browser exports and types resolve |
|
|
182
|
+
| Legacy preservation | Original tracked source/build/dependencies unchanged; 14 local snapshot hashes match |
|
|
183
|
+
| Responsive demo | Single-column layout at 390 × 844; no horizontal document overflow |
|
|
184
|
+
| Local file picker | Keyboard-accessible picker loads a real cube STL; dimensions 2 × 2 × 2, 12 triangles |
|
|
185
|
+
| Direct manipulation | Mouse drag visibly rotates the loaded model; grid keyboard control and wireframe/smooth selection checked |
|
|
186
|
+
|
|
187
|
+
Automated coverage includes ASCII/binary STL, three color conventions,
|
|
188
|
+
invalid/truncated/non-finite data, OBJ indices, bounds/area/volume,
|
|
189
|
+
nonuniform scaling, matrix/picking calculations, transfer detachment,
|
|
190
|
+
worker limits/cancellation/timeouts, ZIP integrity/expansion limits,
|
|
191
|
+
real saved VSB archives, 3MF transforms/colors/relationships and invalid
|
|
192
|
+
XML/component cycles.
|
|
193
|
+
|
|
194
|
+
Browser coverage exercises classic-script and module entry points, actual
|
|
195
|
+
module workers, callback order, IDs including zero, idle rendering,
|
|
196
|
+
appearance/transforms/units, picking, disabled controls, animation,
|
|
197
|
+
VSJ relative URLs, multiple models, VSB round trips, 3MF/OBJ loading,
|
|
198
|
+
PNG capture, legacy API comparisons, the optional real Three.js mesh
|
|
199
|
+
bridge, cancellation with ID reuse, clean/dispose, context restoration,
|
|
200
|
+
and a visible initialization failure when WebGL2 is unavailable.
|
|
201
|
+
|
|
202
|
+
The legacy comparison deliberately records one corrected bug: model
|
|
203
|
+
dimensions now change after scaling. The legacy plugin returned stale
|
|
204
|
+
dimensions while already reporting scaled area and volume.
|
|
205
|
+
|
|
206
|
+
## Performance observation
|
|
207
|
+
|
|
208
|
+
A generated **1,000,000-triangle binary STL (50.0 MB)** loaded through the
|
|
209
|
+
worker and reached the first rendered frames in **273 ms** in one desktop
|
|
210
|
+
run. WebGL reported no error. It used two tracked geometry buffers; after
|
|
211
|
+
`clean()`, there were **zero tracked GPU buffers and zero active workers**.
|
|
212
|
+
|
|
213
|
+
The input was an in-memory File generated before timing. This does not
|
|
214
|
+
measure network download, physical disk latency, peak memory, cold-browser
|
|
215
|
+
startup, or mobile performance. It is a reproducible smoke benchmark, not
|
|
216
|
+
a cross-device promise. Run it from `/tests/v2/browser.html`.
|
|
217
|
+
|
|
218
|
+
## Build sizes
|
|
219
|
+
|
|
220
|
+
Sizes measured with Node gzip defaults; servers must enable compression
|
|
221
|
+
to achieve compressed transfer sizes. Decimal kB below.
|
|
222
|
+
|
|
223
|
+
| Asset | Raw | Gzip |
|
|
224
|
+
| --- | ---: | ---: |
|
|
225
|
+
| Classic minified viewer | 43.3 kB | 14.9 kB |
|
|
226
|
+
| Module worker | 4.6 kB | 2.1 kB |
|
|
227
|
+
| Shared worker geometry chunk | 3.8 kB | 1.9 kB |
|
|
228
|
+
| Lazy archive/XML chunk | 47.2 kB | 16.4 kB |
|
|
229
|
+
| Readable ESM viewer, alternative to classic | 69.0 kB | 18.5 kB |
|
|
230
|
+
|
|
231
|
+
The classic viewer plus initial STL worker code totals 51.6 kB raw /
|
|
232
|
+
18.9 kB gzip. Archive/XML support loads only for archive operations.
|
|
233
|
+
The rendering/STL core includes no third-party runtime library.
|
|
234
|
+
|
|
235
|
+
## Reproduction and remaining validation
|
|
236
|
+
|
|
237
|
+
```sh
|
|
238
|
+
pnpm install --frozen-lockfile
|
|
239
|
+
pnpm build
|
|
240
|
+
pnpm test
|
|
241
|
+
pnpm check:types
|
|
242
|
+
pnpm check:legacy
|
|
243
|
+
pnpm start
|
|
244
|
+
pnpm pack
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
The local tarball was installed into an isolated consumer directory with
|
|
248
|
+
scripts disabled, then its ESM import, CommonJS require, asset exports and
|
|
249
|
+
strict TypeScript consumers were checked. No npm package was published.
|
|
250
|
+
The package remains `private: true`; `@omrips/viewstl` is a provisional name.
|
|
251
|
+
|
|
252
|
+
Before a stable release or production replacement, test Firefox, Safari,
|
|
253
|
+
real touch/mobile hardware, high-DPI devices, representative large customer
|
|
254
|
+
models, peak memory, Vite/Webpack integration, and production-site callers.
|
|
255
|
+
The legacy site's direct Three.js internals need migration. The supported
|
|
256
|
+
3MF/OBJ subsets and transparency limits are described in [usage](v2-usage.md).
|
|
257
|
+
|
|
258
|
+
Raw local browser results and the test tarball are in the ignored
|
|
259
|
+
`test-results/` directory. No production files, DNS, server configuration,
|
|
260
|
+
GitHub branch or npm registry entry were changed by this implementation.
|
|
261
|
+
|
|
262
|
+
## Scene/grid verification — 2026-10-01
|
|
263
|
+
|
|
264
|
+
47 Node tests passed, including aggregate scene memory accounting, serialized
|
|
265
|
+
budgeted parsing, reservation cleanup on allocation/dispatch failures and
|
|
266
|
+
multi-model derived-work guards. Strict TypeScript and 14-file legacy checks passed.
|
|
267
|
+
The Chromium browser passed 15 compatibility, 11 appearance and 8 new scene cases.
|
|
268
|
+
The scene cases exercise original coordinates, tint/restore without GPU buffer
|
|
269
|
+
reallocation, grid coverage beyond model bounds after pan/zoom, opaque depth
|
|
270
|
+
occlusion, PNG background color, finite-grid compatibility, infinite-grid VSB
|
|
271
|
+
round trip, context restoration/cleanup, aggregate budget rejection/recovery and
|
|
272
|
+
cancellation of derived work on model removal. Real mobile GPUs, Safari and Firefox
|
|
273
|
+
remain untested for these additions. The preview site was updated separately;
|
|
274
|
+
legacy files and npm publishing remain unchanged.
|
|
275
|
+
|
|
276
|
+
## Editing frame and picking — 2026-10-01
|
|
277
|
+
|
|
278
|
+
48 Node tests, strict TypeScript checking and the 14-file legacy integrity check
|
|
279
|
+
passed. Chromium passed 15 compatibility, 11 appearance and 11 scene browser
|
|
280
|
+
cases. Additional scene coverage verifies editing-frame pixels, clean PNG exports,
|
|
281
|
+
frame-buffer reuse during transforms, selection switching and cleanup, recovery
|
|
282
|
+
after graphics-context loss, and nearest visible surface picking after transforms.
|
|
283
|
+
Real mobile GPU, Safari and Firefox coverage remains outstanding.
|
|
284
|
+
|
|
285
|
+
## Plugin-owned app controller — 2026-10-02
|
|
286
|
+
|
|
287
|
+
The website's application logic and four policy/transform helper modules now
|
|
288
|
+
compile into `viewstl.js`. The ESM, CommonJS and classic-script builds expose
|
|
289
|
+
`mountViewstlApp`; low-level `StlViewer` behavior is preserved. The suite now
|
|
290
|
+
contains 70 Node tests, including the 16 tests moved from the site. All pass,
|
|
291
|
+
along with strict TypeScript and the 14-file legacy integrity check.
|
|
292
|
+
|
|
293
|
+
Automated Edge 154.0.4258.48 passed the site's 96 browser assertions and 15
|
|
294
|
+
additional controller checks: lazy mounting, optional samples, duplicate-mount
|
|
295
|
+
rejection, public file loading, detached state, cancellation, disposal during
|
|
296
|
+
an active parser job, worker/canvas/listener cleanup, idempotent disposal,
|
|
297
|
+
refusing calls after disposal, late-read isolation during remounting, separate
|
|
298
|
+
embedded roots, radio groups and drop targets. CAD lazy loading, cancellation,
|
|
299
|
+
recovery and a 390px viewport were also rechecked. No new real-mobile, Safari
|
|
300
|
+
or Firefox coverage is claimed.
|
|
301
|
+
|
|
302
|
+
Preview release `20261002-79c817751172` passed all 18 asset hashes and live
|
|
303
|
+
HTTPS checks for STL, OBJ, 3MF and all four CAD aliases, malformed CAD recovery,
|
|
304
|
+
millimetre dimensions and assembly colors. Observed requests were same-origin
|
|
305
|
+
GETs without bodies; no CSP/page errors occurred. Evidence is in the sibling
|
|
306
|
+
website workspace under `results/plugin-app-refactor/` and
|
|
307
|
+
`results/deploy-20261002-79c817751172/`. No npm publication or GitHub push.
|
|
308
|
+
|
|
309
|
+
## Optional Save dialog — 2026-10-08
|
|
310
|
+
|
|
311
|
+
The app controller binds an optional complete save-* control group. All behavior
|
|
312
|
+
is packaged in viewstl.js and delegates to the existing download_models API;
|
|
313
|
+
low-level writers are unchanged. The host supplies explanatory markup/styles.
|
|
314
|
+
|
|
315
|
+
93 Node tests, strict types and all 14 legacy integrity hashes pass. Desktop
|
|
316
|
+
headless Edge 154.0.4258.62 passed 42 local and 42 deployed HTTPS Save checks:
|
|
317
|
+
actual STL/OBJ/3MF/STEP/IGES downloads and reimports, OBJ ZIP materials, translated
|
|
318
|
+
selected/all geometry, cancellation with actual stalled export workers, resource
|
|
319
|
+
cleanup, validation-error recovery, PNG regression and keyboard focus. 320/390px
|
|
320
|
+
layout and touch taps are emulation, not physical mobile tests. Twenty-four app
|
|
321
|
+
lifecycle checks cover export cancellation on clear/remove/dispose, independent
|
|
322
|
+
prefixed dialogs, optional-control omission and fail-fast incomplete groups.
|
|
323
|
+
Fifteen URL-drop regression checks also passed. No large-file performance claim
|
|
324
|
+
or Safari/Firefox coverage is added by these UI tests.
|
|
325
|
+
|
|
326
|
+
Preview release 20261008-580a812896b6 passed all 24 public file hashes. Observed
|
|
327
|
+
Save-test requests were same-origin GETs without uploads. Evidence and the
|
|
328
|
+
reproducible browser runners are in the sibling website workspace under
|
|
329
|
+
results/save-local, results/save-lifecycle, results/save-url-regression and
|
|
330
|
+
results/deploy-20261008-580a812896b6. No npm publication or GitHub push.
|
|
331
|
+
|
|
332
|
+
## Scene saving — 2026-10-08
|
|
333
|
+
|
|
334
|
+
Release 20261008-625337233d51 exposes VSB/VSJ whole-scene saving in the preview.
|
|
335
|
+
The five regular mesh formats save only the selected model, per the owner's
|
|
336
|
+
clarification. New export_scene/download_scene Promise APIs use get_vsj manifests
|
|
337
|
+
and the existing VSB/STL archive layout, with worker-based VSB encoding,
|
|
338
|
+
cancellation, progress, memory admission and output limits. Legacy scene getters
|
|
339
|
+
and download methods retain their contracts.
|
|
340
|
+
|
|
341
|
+
96 Node tests, strict types and all 14 legacy integrity hashes pass. Edge
|
|
342
|
+
154.0.4258.62 passed 26 scene checks locally and live, including downloaded VSB
|
|
343
|
+
round trips, VSJ round trips with explicitly supplied referenced fixture files,
|
|
344
|
+
scene settings, source names, cancellation, memory/output/count limits and
|
|
345
|
+
callback errors. 42 mesh/PNG/UI regression checks passed locally and live;
|
|
346
|
+
24 app lifecycle checks include cancellation of VSB workers on clear/remove/
|
|
347
|
+
dispose. Same-origin GET-only network evidence shows no export uploads. Narrow
|
|
348
|
+
and touch checks use emulation, not physical devices. Site scene reopening is
|
|
349
|
+
not implemented; round trips explicitly use the plugin's public scene loaders.
|
|
350
|
+
Evidence: sibling website results/scene-save-local, scene-save-mesh-regression,
|
|
351
|
+
scene-save-lifecycle and deploy-20261008-625337233d51. All 26 public hashes match.
|
|
352
|
+
|
|
353
|
+
## Scene opening — 2026-10-08
|
|
354
|
+
|
|
355
|
+
Preview release `20261008-2bc0de3fc7ab` opens VSB/VSJ through the plugin-owned file,
|
|
356
|
+
drop and URL flows. The new `import_scene` API validates manifests/archives, stages
|
|
357
|
+
models until success, remaps IDs, resolves local companions or relayed public URL
|
|
358
|
+
references, and restores scene settings and editable model placement. Errors and
|
|
359
|
+
cancellation preserve the existing scene. Legacy scene loaders are unchanged.
|
|
360
|
+
|
|
361
|
+
100 Node tests, strict types and all 14 legacy integrity hashes pass. Desktop
|
|
362
|
+
headless Edge 154.0.4258.62 passed 25 local and 27 live scene-opening checks,
|
|
363
|
+
including saved and legacy VSB files, local VSJ companions, editing/reset/re-saving,
|
|
364
|
+
missing files, malformed second-model rollback, cancellation during reading and
|
|
365
|
+
between models, recovery, URL routing and redirected VSJ base directories.
|
|
366
|
+
Live checks include real public VSJ/STL and VSB downloads through the deployed
|
|
367
|
+
Go relay; other remote fixtures are explicitly intercepted. Captured browser
|
|
368
|
+
traffic remains same-origin; local scene files and companions are not uploaded.
|
|
369
|
+
42 mesh/PNG/save, 24 lifecycle and 15 URL-drop regression checks pass locally.
|
|
370
|
+
Narrow layout is emulated; physical mobile hardware, Safari and Firefox remain
|
|
371
|
+
unverified. These fixture tests do not establish large-scene peak memory or speed.
|
|
372
|
+
|
|
373
|
+
The relay's 12 top-level Go tests pass, including both scene formats and final
|
|
374
|
+
redirect-base metadata without query secrets. All 27 public asset hashes match.
|
|
375
|
+
Nginx and relay service configuration hashes remain unchanged. Evidence is in the
|
|
376
|
+
sibling website's `results/scene-open-local`, `scene-open-save-regression`,
|
|
377
|
+
`scene-open-lifecycle`, `scene-open-url-regression` and
|
|
378
|
+
`deploy-20261008-2bc0de3fc7ab/live-open`. No npm publication or GitHub push.
|
|
379
|
+
|
|
380
|
+
## Print checks — 2026-10-17
|
|
381
|
+
|
|
382
|
+
112 Node tests, strict TypeScript and 14 legacy integrity hashes pass. The new
|
|
383
|
+
fixtures cover open meshes, duplicates, degeneracy, winding, vertex-only contacts,
|
|
384
|
+
disconnected solids, nested cavities, intersecting shells, coplanar overlap,
|
|
385
|
+
near-coplanar neighbors, small gaps, large translations, nonuniform scale, units,
|
|
386
|
+
FDM estimates, time limits, memory rejection and bounded diagnostic samples.
|
|
387
|
+
A 100,000-triangle curved fixture exposed a false coplanar-neighbor intersection;
|
|
388
|
+
the shared-edge predicate was corrected and the case retained as a regression.
|
|
389
|
+
|
|
390
|
+
Desktop headless Edge 155.0.4283.45 passes 27 print integration checks locally:
|
|
391
|
+
lazy loading, basic/detailed coverage, cache isolation, native highlights,
|
|
392
|
+
unchanged geometry/colors/PNG, stale reports, 390px layout, keyboard closing/focus,
|
|
393
|
+
selected/all scope, cancellation/recovery, callback errors, memory accounting,
|
|
394
|
+
removal/disposal, optional host controls and touch-emulated interaction. Additional
|
|
395
|
+
regressions pass: 42 save/PNG, 25 scene-opening and 24 app-lifecycle checks. No
|
|
396
|
+
physical mobile devices, Firefox or Safari were tested. Browser traffic captured
|
|
397
|
+
by the print runner is same-origin GET; no analysis uploads occur.
|
|
398
|
+
|
|
399
|
+
The browser's 100,000-triangle closed torus completed detailed checks in about
|
|
400
|
+
4.6 seconds with 279 animation frames and a maximum observed frame gap of 16.8 ms
|
|
401
|
+
in the initial recorded run. Results vary by run/device. The Node benchmark
|
|
402
|
+
`scripts/check-print-performance.mjs` measured about 0.6 s for 10,240 triangles
|
|
403
|
+
and 5.4 s for 100,000 triangles. Sampled JS heap reached about 164 MB on the larger
|
|
404
|
+
run; this is not a measurement of total/peak browser or GPU memory. Memory/time
|
|
405
|
+
limits deliberately reject or mark incomplete larger/ambiguous workloads.
|
|
406
|
+
|
|
407
|
+
Evidence: plugin `test-results/print-node.txt`, `print-performance.json`; sibling
|
|
408
|
+
website `results/print-local`, `print-save-regression`, `print-scene-regression`
|
|
409
|
+
and `print-lifecycle`. Reproduce browser checks with `site/qa/run-print-browser.mjs`.
|
|
410
|
+
|
|
411
|
+
Preview release `20261017-b0d9d98b838b` also passed all 27 print checks over
|
|
412
|
+
public HTTPS and all 29 public file hashes. Live evidence is in the sibling
|
|
413
|
+
website's `results/deploy-20261017-b0d9d98b838b/live-print`. The relay binary and
|
|
414
|
+
service/Nginx configuration hashes are unchanged; no npm publication or GitHub push.
|
|
415
|
+
|
|
416
|
+
The persistent-panel follow-up release `20261017-5b21747c4c8f` passes 39 browser
|
|
417
|
+
checks locally and over public HTTPS. Added coverage includes canvas focus,
|
|
418
|
+
appearance controls, other dialogs, repeat launch, narrow-screen toolbar access,
|
|
419
|
+
selection changes, loading/cancellation, adding/removing/clearing models and
|
|
420
|
+
explicit close from an empty scene. The panel remains open throughout unrelated
|
|
421
|
+
activity while stale reports and active jobs are handled safely. All 112 Node
|
|
422
|
+
tests, strict types and 14 legacy hashes pass again. Evidence: sibling website
|
|
423
|
+
`results/print-persistent/` and `results/deploy-20261017-5b21747c4c8f/`.
|
package/legacy/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Preserved legacy versions
|
|
2
|
+
|
|
3
|
+
The existing `src/`, top-level `build/` files, and `dependencies/` remain
|
|
4
|
+
the GitHub legacy implementation. Keep their existing download paths.
|
|
5
|
+
New v2 output belongs under `build/v2/`.
|
|
6
|
+
|
|
7
|
+
## GitHub baseline
|
|
8
|
+
|
|
9
|
+
- Repository: https://github.com/omrips/viewstl
|
|
10
|
+
- Original default branch: `master`
|
|
11
|
+
- Baseline commit: `fbb7f5c3894862778c3a6c5d2630573e2496d01f`
|
|
12
|
+
- Local preservation tag: `legacy-before-v2-2026-09-30`
|
|
13
|
+
- Latest published release when inspected: `v1.13`
|
|
14
|
+
|
|
15
|
+
The baseline commit includes changes after the `v1.13` tag. Do not treat the
|
|
16
|
+
release tag and the current legacy branch as identical. The preservation
|
|
17
|
+
tag and development branch are local until explicitly pushed to GitHub.
|
|
18
|
+
|
|
19
|
+
## Local website snapshot
|
|
20
|
+
|
|
21
|
+
[`local-1.14-2026-09-30/`](local-1.14-2026-09-30/) contains 14 files copied
|
|
22
|
+
without modification from the legacy website checkout. Its unminified
|
|
23
|
+
`plugin/stl_viewer.js` identifies itself as version 1.14. The
|
|
24
|
+
[`manifest.json`](local-1.14-2026-09-30/manifest.json) records every copied
|
|
25
|
+
file's original relative path, byte length and SHA-256 digest.
|
|
26
|
+
|
|
27
|
+
This is an archival snapshot, not a newly built or certified v1.14 release.
|
|
28
|
+
The source and minified files have not been verified as corresponding
|
|
29
|
+
builds. `TrackballControls.js` was absent from that checkout's `plugin/`
|
|
30
|
+
directory and has not been substituted from another version. The GitHub
|
|
31
|
+
legacy build separately contains its own TrackballControls dependency.
|
|
32
|
+
|
|
33
|
+
The local source differs from GitHub in click coordinate handling, updating
|
|
34
|
+
disabled controls, its material choice and loading unminified worker files.
|
|
35
|
+
These differences must be assessed when defining compatibility tests; they
|
|
36
|
+
must not be lost through an automatic overwrite from GitHub.
|
|
37
|
+
|
|
38
|
+
The `general/` files are the original JSZip and JSZipUtils copies, preserved
|
|
39
|
+
for historical reference. They are not dependencies of the new STL core.
|
|
40
|
+
Keep the original license notices in all archived files.
|
|
41
|
+
|
|
42
|
+
This snapshot does not establish which exact files the production server
|
|
43
|
+
currently serves. No server or production files were changed to create it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omrips/viewstl",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2.0.0-rc.1",
|
|
4
|
+
"description": "Local-first STL, OBJ, 3MF, STEP and IGES viewer with native WebGL2 and transferable worker geometry",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://www.viewstl.com/plugin/",
|
|
8
|
+
"bugs": "https://github.com/omrips/viewstl/issues",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"viewstl",
|
|
11
|
+
"webgl2",
|
|
12
|
+
"3d-viewer",
|
|
13
|
+
"stl",
|
|
14
|
+
"obj",
|
|
15
|
+
"3mf",
|
|
16
|
+
"step",
|
|
17
|
+
"iges"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public",
|
|
21
|
+
"tag": "next",
|
|
22
|
+
"registry": "https://registry.npmjs.org/"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/omrips/viewstl.git"
|
|
27
|
+
},
|
|
28
|
+
"main": "./build/v2/viewstl.cjs",
|
|
29
|
+
"module": "./build/v2/viewstl.js",
|
|
30
|
+
"types": "./build/v2/viewstl.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"import": {
|
|
34
|
+
"types": "./build/v2/viewstl.d.ts",
|
|
35
|
+
"default": "./build/v2/viewstl.js"
|
|
36
|
+
},
|
|
37
|
+
"require": {
|
|
38
|
+
"types": "./build/v2/viewstl.d.cts",
|
|
39
|
+
"default": "./build/v2/viewstl.cjs"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"./worker": "./build/v2/viewstl.worker.js",
|
|
43
|
+
"./browser": "./build/v2/stl_viewer.min.js",
|
|
44
|
+
"./assets/*": "./build/v2/*",
|
|
45
|
+
"./package.json": "./package.json"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"build/v2",
|
|
49
|
+
"LICENSE",
|
|
50
|
+
"docs/v2-usage.md",
|
|
51
|
+
"docs/v2-compatibility.md",
|
|
52
|
+
"docs/v2-verification.md",
|
|
53
|
+
"legacy/README.md",
|
|
54
|
+
"THIRD-PARTY-NOTICES.txt"
|
|
55
|
+
],
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "node scripts/build-v2.mjs",
|
|
58
|
+
"test": "node --test tests/v2/*.test.mjs",
|
|
59
|
+
"check:legacy": "node scripts/check-legacy.mjs",
|
|
60
|
+
"check:types": "tsc --noEmit --strict --module NodeNext --moduleResolution NodeNext --target ES2022 --lib ES2022,DOM tests/v2/types.ts",
|
|
61
|
+
"prepack": "node scripts/build-v2.mjs && node scripts/check-legacy.mjs",
|
|
62
|
+
"start": "node scripts/serve-v2.mjs"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"esbuild": "0.28.2",
|
|
66
|
+
"fflate": "0.8.3",
|
|
67
|
+
"occt-import-js": "0.0.23",
|
|
68
|
+
"prettier": "3.9.9",
|
|
69
|
+
"saxes": "6.0.0",
|
|
70
|
+
"typescript": "5.9.3"
|
|
71
|
+
},
|
|
72
|
+
"engines": {
|
|
73
|
+
"node": ">=20"
|
|
74
|
+
}
|
|
75
|
+
}
|