@ifc-lite/geometry 7.7.0 → 7.9.0

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.
Files changed (88) hide show
  1. package/README.md +54 -0
  2. package/dist/byte-streaming-prepass-result.d.ts +11 -0
  3. package/dist/byte-streaming-prepass-result.d.ts.map +1 -1
  4. package/dist/domain-export-call.d.ts.map +1 -1
  5. package/dist/domain-export-call.js +8 -1
  6. package/dist/domain-export-call.js.map +1 -1
  7. package/dist/export-errors.d.ts +7 -0
  8. package/dist/export-errors.d.ts.map +1 -1
  9. package/dist/export-errors.js +12 -0
  10. package/dist/export-errors.js.map +1 -1
  11. package/dist/geometry-parallel-options.d.ts +15 -0
  12. package/dist/geometry-parallel-options.d.ts.map +1 -1
  13. package/dist/geometry-parallel.d.ts +2 -47
  14. package/dist/geometry-parallel.d.ts.map +1 -1
  15. package/dist/geometry-parallel.js +59 -157
  16. package/dist/geometry-parallel.js.map +1 -1
  17. package/dist/geometry-worker-pool.d.ts +72 -0
  18. package/dist/geometry-worker-pool.d.ts.map +1 -0
  19. package/dist/geometry-worker-pool.js +176 -0
  20. package/dist/geometry-worker-pool.js.map +1 -0
  21. package/dist/geometry.worker.d.ts.map +1 -1
  22. package/dist/geometry.worker.js +19 -25
  23. package/dist/geometry.worker.js.map +1 -1
  24. package/dist/hung-job-recovery.d.ts +26 -2
  25. package/dist/hung-job-recovery.d.ts.map +1 -1
  26. package/dist/hung-job-recovery.js +42 -7
  27. package/dist/hung-job-recovery.js.map +1 -1
  28. package/dist/ifc-lite-bridge.d.ts +13 -2
  29. package/dist/ifc-lite-bridge.d.ts.map +1 -1
  30. package/dist/ifc-lite-bridge.js +27 -26
  31. package/dist/ifc-lite-bridge.js.map +1 -1
  32. package/dist/in-call-heartbeat.d.ts +20 -0
  33. package/dist/in-call-heartbeat.d.ts.map +1 -0
  34. package/dist/in-call-heartbeat.js +39 -0
  35. package/dist/in-call-heartbeat.js.map +1 -0
  36. package/dist/index.d.ts +21 -8
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +27 -28
  39. package/dist/index.js.map +1 -1
  40. package/dist/landxml-terrain-export.d.ts +41 -0
  41. package/dist/landxml-terrain-export.d.ts.map +1 -0
  42. package/dist/landxml-terrain-export.js +14 -0
  43. package/dist/landxml-terrain-export.js.map +1 -0
  44. package/dist/main-engine-init.d.ts +5 -0
  45. package/dist/main-engine-init.d.ts.map +1 -0
  46. package/dist/main-engine-init.js +42 -0
  47. package/dist/main-engine-init.js.map +1 -0
  48. package/dist/perf-flags.d.ts +55 -0
  49. package/dist/perf-flags.d.ts.map +1 -0
  50. package/dist/perf-flags.js +66 -0
  51. package/dist/perf-flags.js.map +1 -0
  52. package/dist/prepass-routing.d.ts +53 -0
  53. package/dist/prepass-routing.d.ts.map +1 -0
  54. package/dist/prepass-routing.js +100 -0
  55. package/dist/prepass-routing.js.map +1 -0
  56. package/dist/scan-proposals.d.ts +132 -0
  57. package/dist/scan-proposals.d.ts.map +1 -0
  58. package/dist/scan-proposals.js +12 -0
  59. package/dist/scan-proposals.js.map +1 -0
  60. package/dist/scan-segmentation.d.ts +205 -0
  61. package/dist/scan-segmentation.d.ts.map +1 -0
  62. package/dist/scan-segmentation.js +17 -0
  63. package/dist/scan-segmentation.js.map +1 -0
  64. package/dist/warm-pool.d.ts +27 -0
  65. package/dist/warm-pool.d.ts.map +1 -0
  66. package/dist/warm-pool.js +48 -0
  67. package/dist/warm-pool.js.map +1 -0
  68. package/dist/wasm-shared-module.d.ts +17 -19
  69. package/dist/wasm-shared-module.d.ts.map +1 -1
  70. package/dist/wasm-shared-module.js +90 -77
  71. package/dist/wasm-shared-module.js.map +1 -1
  72. package/dist/wasm-streaming-guard.d.ts +2 -0
  73. package/dist/wasm-streaming-guard.d.ts.map +1 -0
  74. package/dist/wasm-streaming-guard.js +22 -0
  75. package/dist/wasm-streaming-guard.js.map +1 -0
  76. package/dist/worker-count.d.ts +10 -0
  77. package/dist/worker-count.d.ts.map +1 -1
  78. package/dist/worker-count.js +19 -0
  79. package/dist/worker-count.js.map +1 -1
  80. package/dist/worker-trace.d.ts +16 -0
  81. package/dist/worker-trace.d.ts.map +1 -0
  82. package/dist/worker-trace.js +39 -0
  83. package/dist/worker-trace.js.map +1 -0
  84. package/dist/world-frame.d.ts +24 -0
  85. package/dist/world-frame.d.ts.map +1 -1
  86. package/dist/world-frame.js +34 -0
  87. package/dist/world-frame.js.map +1 -1
  88. package/package.json +18 -7
@@ -1,26 +1,23 @@
1
1
  /**
2
- * Compile (or join the in-flight compile of) the engine binary for `explicitUrl`
3
- * — or the default resolution when omitted.
4
- *
5
- * Resolves to `null` — the caller then leaves the consumer on its own `init()` —
6
- * when the URL can't be resolved or compilation fails, so non-Vite consumers and
7
- * offline/edge failures degrade to the previous behaviour rather than breaking.
2
+ * Compile or join the engine binary. The pool's optional contract stays null on
3
+ * failure; the memo itself preserves rejection for the main loader's retry.
8
4
  */
9
5
  export declare function compileSharedWasmModule(explicitUrl?: string): Promise<WebAssembly.Module | null>;
6
+ /** Modern public init options; deliberately not a package-root export. */
7
+ type SharedWasmInitOptions = {
8
+ module_or_path: WebAssembly.Module | Promise<WebAssembly.Module>;
9
+ };
10
10
  /**
11
- * The compiled module for `explicitUrl` **only if a compile was already started**
12
- * for it — otherwise `null`, without starting one.
13
- *
14
- * This is the "join, don't initiate" accessor for consumers that have their own
15
- * working init path (`IfcLiteBridge.init()`): when a prewarm or a parallel load
16
- * has already fetched the binary, reuse it; when nothing has, do exactly what
17
- * this consumer did before rather than speculatively pulling 1.3 MB on a path
18
- * that may not need it.
11
+ * Prepare main init without starting a bundled fetch. Generated public init
12
+ * returns an already initialized engine BEFORE reading module_or_path. A cold
13
+ * loader reads this getter and starts/joins the strict memo inside its retry.
19
14
  *
20
- * Awaits an in-flight compile rather than racing it with a second fetch — the
21
- * bytes are the same and already on the wire.
15
+ * Raw sibling URLs do not prove the installed npm asset location. Only join an
16
+ * existing optional memo there, then give the loader concrete options or no
17
+ * options. Promise<undefined> would bypass the loader's default URL selection.
18
+ * The second URL constructor uses a parameter so bundlers leave it untouched.
22
19
  */
23
- export declare function getStartedSharedWasmModule(explicitUrl?: string): Promise<WebAssembly.Module | null> | null;
20
+ export declare function prepareSharedWasmInit(resolvedUrl?: string | URL | null, moduleUrl?: string): Promise<SharedWasmInitOptions | undefined>;
24
21
  /**
25
22
  * Start the shared fetch+compile BEFORE a file is opened, so the binary is
26
23
  * already downloaded and compiled by the time a load wants it.
@@ -30,7 +27,7 @@ export declare function getStartedSharedWasmModule(explicitUrl?: string): Promis
30
27
  * slow link the whole download sits in front of first geometry (measured 2.5 s
31
28
  * on a ~4 Mbit connection, for a 225 KB model).
32
29
  *
33
- * Fire-and-forget by design: a prewarm failure must never surface to the user or
30
+ * Fire-and-forget by design (the returned promise never rejects): a prewarm failure must never surface to the user or
34
31
  * poison the load path. `compileSharedWasmModule` already evicts a failed URL so
35
32
  * the real load retries, and every consumer falls back to its own `init()` when
36
33
  * no shared module is available. Callers decide *when* to call this (idle,
@@ -41,5 +38,6 @@ export declare function getStartedSharedWasmModule(explicitUrl?: string): Promis
41
38
  * Vite/webpack consumers (the viewer included) pass none and share the default
42
39
  * resolution, which is the intended usage.
43
40
  */
44
- export declare function prewarmSharedWasmModule(wasmUrl?: string): void;
41
+ export declare function prewarmSharedWasmModule(wasmUrl?: string): Promise<boolean>;
42
+ export {};
45
43
  //# sourceMappingURL=wasm-shared-module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wasm-shared-module.d.ts","sourceRoot":"","sources":["../src/wasm-shared-module.ts"],"names":[],"mappings":"AAoDA;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,CAgDpC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI,CAK3C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAM9D"}
1
+ {"version":3,"file":"wasm-shared-module.d.ts","sourceRoot":"","sources":["../src/wasm-shared-module.ts"],"names":[],"mappings":"AA6GA;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,CAIhG;AAED,0EAA0E;AAC1E,KAAK,qBAAqB,GAAG;IAC3B,cAAc,EAAE,WAAW,CAAC,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;CAClE,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,GAAE,MAAM,GAAG,GAAG,GAAG,IAAuB,EACnD,SAAS,GAAE,MAAwB,GAClC,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAa5C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAS1E"}
@@ -17,8 +17,9 @@
17
17
  *
18
18
  * Keeping the memo here — rather than private to the worker pool — means the
19
19
  * second path can reuse whatever the first already compiled, so the binary is
20
- * fetched at most once per URL per realm no matter which path runs first. That
21
- * matters most when the two overlap: a prewarm started at page load and a small
20
+ * shared on pool-first and bundled main-init-first loads. Unbundled main init
21
+ * keeps wasm-bindgen's own asset resolution. Sharing matters most when
22
+ * the two overlap: a prewarm started at page load and a small
22
23
  * file opened seconds later would otherwise be two concurrent downloads of the
23
24
  * same 1.3 MB (browsers are not required to coalesce in-flight requests for the
24
25
  * same URL), on exactly the slow connections the prewarm exists to help.
@@ -48,88 +49,97 @@ function resolveWasmUrl(explicitUrl) {
48
49
  return null;
49
50
  }
50
51
  }
51
- /**
52
- * Compile (or join the in-flight compile of) the engine binary for `explicitUrl`
53
- * — or the default resolution when omitted.
54
- *
55
- * Resolves to `null` — the caller then leaves the consumer on its own `init()` —
56
- * when the URL can't be resolved or compilation fails, so non-Vite consumers and
57
- * offline/edge failures degrade to the previous behaviour rather than breaking.
58
- */
59
- export async function compileSharedWasmModule(explicitUrl) {
60
- if (typeof WebAssembly === 'undefined')
61
- return null;
62
- const url = resolveWasmUrl(explicitUrl);
63
- if (!url)
64
- return null;
65
- const cacheKey = url instanceof URL ? url.href : url;
66
- const cached = sharedWasmModulePromises.get(cacheKey);
52
+ // Match wasm-bindgen's public loader: a successful ordinary response with the
53
+ // wrong MIME type may use its bytes; transport/validation failures retain their
54
+ // original rejection. In particular, invalid application/wasm is not retried.
55
+ function permitsMimeFallback(response) {
56
+ return response.ok
57
+ && ['basic', 'cors', 'default'].includes(response.type)
58
+ && response.headers.get('Content-Type') !== 'application/wasm';
59
+ }
60
+ function acquireModule(url) {
61
+ const key = url instanceof URL ? url.href : url;
62
+ const cached = sharedWasmModulePromises.get(key);
67
63
  if (cached)
68
64
  return cached;
69
- const p = (async () => {
70
- try {
71
- if (typeof WebAssembly.compileStreaming === 'function') {
72
- try {
73
- // Compile WHILE the binary downloads (one streaming fetch + compile
74
- // for every consumer).
75
- return await WebAssembly.compileStreaming(fetch(url));
76
- }
77
- catch (err) {
78
- // Some static hosts serve `.wasm` with the wrong MIME type, which
79
- // rejects compileStreaming — fall through to the buffer path.
80
- //
81
- // Worth a line even though the fallback works: the streaming fetch is
82
- // already spent, so the buffer path downloads the ~1.3 MB binary a
83
- // SECOND time, and nothing else reports that. Once per URL per realm
84
- // (this runs inside the single-flight memo).
85
- console.warn('[stream] wasm compileStreaming rejected; refetching for the buffer path:', err);
86
- }
65
+ const promise = (async () => {
66
+ const response = await fetch(url);
67
+ if (typeof WebAssembly.compileStreaming !== 'function') {
68
+ // Preserve the optional helper's HTTP refusal even when its streaming API
69
+ // is absent. Main init must not accept bytes a present public streaming
70
+ // loader would reject. This is stricter than glue with both APIs absent.
71
+ if (!response.ok)
72
+ throw new TypeError('WebAssembly HTTP status code is not ok');
73
+ if (!['basic', 'cors', 'default'].includes(response.type)) {
74
+ throw new TypeError('WebAssembly response type is not supported');
87
75
  }
88
- const resp = await fetch(url);
89
- if (!resp.ok)
90
- return null;
91
- return await WebAssembly.compile(await resp.arrayBuffer());
76
+ return WebAssembly.compile(await response.arrayBuffer());
77
+ }
78
+ // Like generated init, permitted MIME rejection leaves the original body
79
+ // available for arrayBuffer. Do not tee/clone or fetch the binary again.
80
+ try {
81
+ return await WebAssembly.compileStreaming(response);
92
82
  }
93
- catch (err) {
94
- console.warn('[stream] shared wasm compile failed; consumers will self-init:', err);
95
- return null;
83
+ catch (error) {
84
+ if (!permitsMimeFallback(response))
85
+ throw error;
86
+ console.warn('[stream] wasm compileStreaming rejected MIME; using the same response bytes:', error);
87
+ return WebAssembly.compile(await response.arrayBuffer());
96
88
  }
97
- })();
98
- sharedWasmModulePromises.set(cacheKey, p);
99
- const result = await p;
100
- // Don't cache a failure — evict ONLY this URL's entry so the next load retries
101
- // (a transient fetch error shouldn't permanently disable the shared-module fast
102
- // path for the session), while other URLs' successful modules stay cached.
103
- //
104
- // Evict only if THIS promise is still the installed one. A failed compile can
105
- // have several awaiters; the first to resume evicts and a retry may install a
106
- // fresh promise before the rest resume. Without the identity check those late
107
- // awaiters would delete the *replacement*, breaking single-flight and letting
108
- // a second compile of the same binary start.
109
- if (result === null && sharedWasmModulePromises.get(cacheKey) === p) {
110
- sharedWasmModulePromises.delete(cacheKey);
111
- }
112
- return result;
89
+ })().catch((error) => {
90
+ // Evict the owner, not a replacement installed by a later load. All joining
91
+ // callers see the original rejection; the bridge's retry can start anew.
92
+ if (sharedWasmModulePromises.get(key) === promise)
93
+ sharedWasmModulePromises.delete(key);
94
+ throw error;
95
+ });
96
+ sharedWasmModulePromises.set(key, promise);
97
+ return promise;
98
+ }
99
+ const warnedFailures = new WeakSet();
100
+ function optionalModule(promise) {
101
+ return promise.catch((error) => {
102
+ if (!warnedFailures.has(promise)) {
103
+ warnedFailures.add(promise);
104
+ console.warn('[stream] shared wasm compile failed; consumers will self-init:', error);
105
+ }
106
+ return null;
107
+ });
113
108
  }
114
109
  /**
115
- * The compiled module for `explicitUrl` **only if a compile was already started**
116
- * for it — otherwise `null`, without starting one.
117
- *
118
- * This is the "join, don't initiate" accessor for consumers that have their own
119
- * working init path (`IfcLiteBridge.init()`): when a prewarm or a parallel load
120
- * has already fetched the binary, reuse it; when nothing has, do exactly what
121
- * this consumer did before rather than speculatively pulling 1.3 MB on a path
122
- * that may not need it.
123
- *
124
- * Awaits an in-flight compile rather than racing it with a second fetch — the
125
- * bytes are the same and already on the wire.
110
+ * Compile or join the engine binary. The pool's optional contract stays null on
111
+ * failure; the memo itself preserves rejection for the main loader's retry.
126
112
  */
127
- export function getStartedSharedWasmModule(explicitUrl) {
113
+ export function compileSharedWasmModule(explicitUrl) {
114
+ if (typeof WebAssembly === 'undefined')
115
+ return Promise.resolve(null);
128
116
  const url = resolveWasmUrl(explicitUrl);
129
- if (!url)
130
- return null;
131
- const cacheKey = url instanceof URL ? url.href : url;
132
- return sharedWasmModulePromises.get(cacheKey) ?? null;
117
+ return url ? optionalModule(acquireModule(url)) : Promise.resolve(null);
118
+ }
119
+ /**
120
+ * Prepare main init without starting a bundled fetch. Generated public init
121
+ * returns an already initialized engine BEFORE reading module_or_path. A cold
122
+ * loader reads this getter and starts/joins the strict memo inside its retry.
123
+ *
124
+ * Raw sibling URLs do not prove the installed npm asset location. Only join an
125
+ * existing optional memo there, then give the loader concrete options or no
126
+ * options. Promise<undefined> would bypass the loader's default URL selection.
127
+ * The second URL constructor uses a parameter so bundlers leave it untouched.
128
+ */
129
+ export async function prepareSharedWasmInit(resolvedUrl = resolveWasmUrl(), moduleUrl = import.meta.url) {
130
+ if (!resolvedUrl || typeof WebAssembly === 'undefined')
131
+ return undefined;
132
+ const cacheKey = resolvedUrl instanceof URL ? resolvedUrl.href : resolvedUrl;
133
+ const resolved = new URL(cacheKey, moduleUrl);
134
+ const unbundled = new URL('../../wasm/pkg/ifc-lite_bg.wasm', moduleUrl);
135
+ if (resolved.href === unbundled.href || !['http:', 'https:'].includes(resolved.protocol)) {
136
+ const cached = sharedWasmModulePromises.get(cacheKey);
137
+ const module = cached ? await optionalModule(cached) : null;
138
+ return module ? { module_or_path: module } : undefined;
139
+ }
140
+ return {
141
+ get module_or_path() { return acquireModule(cacheKey); },
142
+ };
133
143
  }
134
144
  /**
135
145
  * Start the shared fetch+compile BEFORE a file is opened, so the binary is
@@ -140,7 +150,7 @@ export function getStartedSharedWasmModule(explicitUrl) {
140
150
  * slow link the whole download sits in front of first geometry (measured 2.5 s
141
151
  * on a ~4 Mbit connection, for a 225 KB model).
142
152
  *
143
- * Fire-and-forget by design: a prewarm failure must never surface to the user or
153
+ * Fire-and-forget by design (the returned promise never rejects): a prewarm failure must never surface to the user or
144
154
  * poison the load path. `compileSharedWasmModule` already evicts a failed URL so
145
155
  * the real load retries, and every consumer falls back to its own `init()` when
146
156
  * no shared module is available. Callers decide *when* to call this (idle,
@@ -152,10 +162,13 @@ export function getStartedSharedWasmModule(explicitUrl) {
152
162
  * resolution, which is the intended usage.
153
163
  */
154
164
  export function prewarmSharedWasmModule(wasmUrl) {
155
- void compileSharedWasmModule(wasmUrl).catch((err) => {
165
+ // Resolves whether a module compiled (the viewer's `viewer_boot` field
166
+ // event times it, #6961); callers that only prewarm can ignore it.
167
+ return compileSharedWasmModule(wasmUrl).then((module) => module !== null, (err) => {
156
168
  // Unreachable in practice — compileSharedWasmModule swallows its own
157
169
  // failures and resolves null — but never let a prewarm reject unhandled.
158
170
  console.warn('[stream] wasm prewarm failed; load path will retry:', err);
171
+ return false;
159
172
  });
160
173
  }
161
174
  //# sourceMappingURL=wasm-shared-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wasm-shared-module.js","sourceRoot":"","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AAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;QAChF,qEAAqE;QACrE,yEAAyE;QACzE,OAAO,CAAC,IAAI,CAAC,qDAAqD,EAAE,GAAG,CAAC,CAAC;QACzE,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function acquireWasmStreamingOperation(operation: string): () => void;
2
+ //# sourceMappingURL=wasm-streaming-guard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wasm-streaming-guard.d.ts","sourceRoot":"","sources":["../src/wasm-streaming-guard.ts"],"names":[],"mappings":"AAWA,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,IAAI,CAa3E"}
@@ -0,0 +1,22 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ /**
5
+ * One WASM streaming operation at a time per GeometryProcessor module: the
6
+ * streaming entry points share engine state, so a second stream must not start
7
+ * while the first is still running.
8
+ */
9
+ let activeWasmStreamingOperation = null;
10
+ export function acquireWasmStreamingOperation(operation) {
11
+ if (activeWasmStreamingOperation) {
12
+ throw new Error(`GeometryProcessor ${operation} cannot start while ${activeWasmStreamingOperation} is still running. ` +
13
+ 'Wait for the active stream to finish, or cancel it before starting another geometry operation.');
14
+ }
15
+ activeWasmStreamingOperation = operation;
16
+ return () => {
17
+ if (activeWasmStreamingOperation === operation) {
18
+ activeWasmStreamingOperation = null;
19
+ }
20
+ };
21
+ }
22
+ //# sourceMappingURL=wasm-streaming-guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wasm-streaming-guard.js","sourceRoot":"","sources":["../src/wasm-streaming-guard.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;GAIG;AACH,IAAI,4BAA4B,GAAkB,IAAI,CAAC;AAEvD,MAAM,UAAU,6BAA6B,CAAC,SAAiB;IAC7D,IAAI,4BAA4B,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb,qBAAqB,SAAS,uBAAuB,4BAA4B,qBAAqB;YACtG,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,4BAA4B,GAAG,SAAS,CAAC;IACzC,OAAO,GAAG,EAAE;QACV,IAAI,4BAA4B,KAAK,SAAS,EAAE,CAAC;YAC/C,4BAA4B,GAAG,IAAI,CAAC;QACtC,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -58,4 +58,14 @@ export declare function computeWorkerCount(inputs: WorkerCountInputs): WorkerCou
58
58
  * Convenience wrapper that returns just the integer count.
59
59
  */
60
60
  export declare function pickWorkerCount(inputs: WorkerCountInputs): number;
61
+ /**
62
+ * The worker count a parallel load of `fileSizeMB` uses on this host: the
63
+ * browser's cores and memory, and a file-size proxy for the job count (the
64
+ * memory cap keeps an over-estimate harmless and still bounds an explicit
65
+ * `workerCountOverride`, so the A/B knob cannot OOM the tab). Shared by the
66
+ * load and by the warm pool's prewarm (#7036) so both plan the same count.
67
+ */
68
+ export declare function planLoadWorkerCount(fileSizeMB: number, workerCountOverride?: number): WorkerCountResult & {
69
+ cores: number;
70
+ };
61
71
  //# sourceMappingURL=worker-count.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker-count.d.ts","sourceRoot":"","sources":["../src/worker-count.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,iBAAiB;IAChC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;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BAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAW3H"}
@@ -163,4 +163,23 @@ export function computeWorkerCount(inputs) {
163
163
  export function pickWorkerCount(inputs) {
164
164
  return computeWorkerCount(inputs).count;
165
165
  }
166
+ /**
167
+ * The worker count a parallel load of `fileSizeMB` uses on this host: the
168
+ * browser's cores and memory, and a file-size proxy for the job count (the
169
+ * memory cap keeps an over-estimate harmless and still bounds an explicit
170
+ * `workerCountOverride`, so the A/B knob cannot OOM the tab). Shared by the
171
+ * load and by the warm pool's prewarm (#7036) so both plan the same count.
172
+ */
173
+ export function planLoadWorkerCount(fileSizeMB, workerCountOverride) {
174
+ const nav = typeof navigator !== 'undefined' ? navigator : undefined;
175
+ const cores = nav?.hardwareConcurrency ?? 2;
176
+ const result = computeWorkerCount({
177
+ fileSizeMB,
178
+ cores,
179
+ deviceMemoryGB: nav?.deviceMemory ?? 8,
180
+ totalJobs: Math.max(1, Math.ceil(fileSizeMB * 100)),
181
+ workerCountOverride,
182
+ });
183
+ return { ...result, cores };
184
+ }
166
185
  //# sourceMappingURL=worker-count.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker-count.js","sourceRoot":"","sources":["../src/worker-count.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAuD/D;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAyB;IAC1D,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAClD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACpD,8DAA8D;IAC9D,yEAAyE;IACzE,qEAAqE;IACrE,kEAAkE;IAClE,mEAAmE;IACnE,MAAM,gBAAgB,GA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GAAG,EAAE,mBAAmB,IAAI,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,kBAAkB,CAAC;QAChC,UAAU;QACV,KAAK;QACL,cAAc,EAAE,GAAG,EAAE,YAAY,IAAI,CAAC;QACtC,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC;QACnD,mBAAmB;KACpB,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,16 @@
1
+ export { countCopy, meterTypedArrayArgs } from '@ifc-lite/load-trace';
2
+ /**
3
+ * Worker-side load-trace spans (#6956): which geometry-worker requests become
4
+ * a span when the pool enabled tracing (`enableWorkerTrace` in
5
+ * geometry-parallel.ts). Each span is the whole serialised handler, posted back
6
+ * as soon as it settles; untraced loads pass straight through.
7
+ */
8
+ export declare const traceGeometryWorkerMessage: import("@ifc-lite/load-trace").WorkerTraceHost;
9
+ /**
10
+ * Post a pre-pass event. The host terminates the pre-pass worker as soon as it
11
+ * receives the final `complete` event, before this worker's handler returns,
12
+ * so the completed scan span and counters are flushed ahead of that message
13
+ * (#6993). Merely draining finished spans loses the still-running handler.
14
+ */
15
+ export declare function postPrepassEvent(event: unknown): void;
16
+ //# sourceMappingURL=worker-trace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-trace.d.ts","sourceRoot":"","sources":["../src/worker-trace.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,gDAcrC,CAAC;AAEH;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAGrD"}
@@ -0,0 +1,39 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ import { createWorkerTraceHost } from '@ifc-lite/load-trace';
5
+ // #6957: the worker's counter helpers, re-exported so geometry.worker.ts keeps one load-trace import.
6
+ export { countCopy, meterTypedArrayArgs } from '@ifc-lite/load-trace';
7
+ /**
8
+ * Worker-side load-trace spans (#6956): which geometry-worker requests become
9
+ * a span when the pool enabled tracing (`enableWorkerTrace` in
10
+ * geometry-parallel.ts). Each span is the whole serialised handler, posted back
11
+ * as soon as it settles; untraced loads pass straight through.
12
+ */
13
+ export const traceGeometryWorkerMessage = createWorkerTraceHost({
14
+ spanNames: {
15
+ init: 'worker.init',
16
+ 'scan-shard': 'shard.scan',
17
+ 'prepass-streaming': 'prepass.scan',
18
+ 'prepass-streaming-sharded': 'prepass.scan',
19
+ 'resolve-styles-shard': 'styles.shard',
20
+ 'finalize-styles': 'styles.finalize',
21
+ 'stream-chunk': 'geometry.firstChunk',
22
+ },
23
+ // Only the first chunk: one span per slice would cost a message per batch.
24
+ onceTypes: ['stream-chunk'],
25
+ post: (message) => self.postMessage(message),
26
+ endpoint: () => self,
27
+ });
28
+ /**
29
+ * Post a pre-pass event. The host terminates the pre-pass worker as soon as it
30
+ * receives the final `complete` event, before this worker's handler returns,
31
+ * so the completed scan span and counters are flushed ahead of that message
32
+ * (#6993). Merely draining finished spans loses the still-running handler.
33
+ */
34
+ export function postPrepassEvent(event) {
35
+ if (event?.type === 'complete')
36
+ traceGeometryWorkerMessage.flush('prepass.scan');
37
+ self.postMessage({ type: 'prepass-stream', event });
38
+ }
39
+ //# sourceMappingURL=worker-trace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-trace.js","sourceRoot":"","sources":["../src/worker-trace.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,sGAAsG;AACtG,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,CAAC;IAC9D,SAAS,EAAE;QACT,IAAI,EAAE,aAAa;QACnB,YAAY,EAAE,YAAY;QAC1B,mBAAmB,EAAE,cAAc;QACnC,2BAA2B,EAAE,cAAc;QAC3C,sBAAsB,EAAE,cAAc;QACtC,iBAAiB,EAAE,iBAAiB;QACpC,cAAc,EAAE,qBAAqB;KACtC;IACD,2EAA2E;IAC3E,SAAS,EAAE,CAAC,cAAc,CAAC;IAC3B,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAE,IAA0B,CAAC,WAAW,CAAC,OAAO,CAAC;IACnE,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAyB;CAC1C,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,IAAK,KAAmC,EAAE,IAAI,KAAK,UAAU;QAAE,0BAA0B,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;IAC/G,IAA0B,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC;AAC7E,CAAC"}
@@ -40,6 +40,30 @@ export declare function totalYupOffset(info?: RenderFrameInfo | null): Vec3;
40
40
  * that was not shifted.
41
41
  */
42
42
  export declare function renderFrameWorldOffset(info?: RenderFrameInfo | null): Vec3;
43
+ /**
44
+ * The restore a writer needs to put render-frame meshes back in IFC world,
45
+ * as the column-major 4x4 the Rust exporters take (`MeshFrame::world_matrix`,
46
+ * #7734): `world = M * baked` with `baked` in IFC Z-up (the axes the matrix
47
+ * acts in, so the GLB root can carry it) and f64. A render-frame offset is a
48
+ * pure translation, so only the last column varies. `undefined` for a model
49
+ * that was not shifted: there is nothing to restore, and `undefined` is how
50
+ * `exportGlbFromMeshes` is told so.
51
+ */
52
+ export declare function renderFrameWorldMatrix(info?: RenderFrameInfo | null): number[] | undefined;
53
+ /**
54
+ * [`renderFrameWorldMatrix`] for vertices that are still in the render
55
+ * frame's own Y-up axes (a Parquet or IFC5 table of the viewer's meshes):
56
+ * `world = M * [x, y, z, 1]`, `M` column-major, IFC Z-up metres. It is the
57
+ * same restore with the Y-up to Z-up basis folded in, so a reader needs no
58
+ * axis convention to use it. Always 16 numbers (the basis is not identity).
59
+ */
60
+ export declare function renderFrameYupToWorldMatrix(info?: RenderFrameInfo | null): number[];
61
+ /**
62
+ * The wire tag (`mesh_coordinate_space`, the Rust `MeshCoordinateSpace`) of a
63
+ * render frame: `model_rtc` when it is shifted, `raw_ifc` when not. The
64
+ * viewer's meshes carry no site rotation, so `site_local` never applies here.
65
+ */
66
+ export declare function renderFrameCoordinateSpace(info?: RenderFrameInfo | null): 'model_rtc' | 'raw_ifc';
43
67
  /** A loaded model as far as the federation frame rule is concerned. */
44
68
  export interface FrameCandidate {
45
69
  /** Load order; the earliest-loaded anchored model owns the shared frame. */
@@ -1 +1 @@
1
- {"version":3,"file":"world-frame.d.ts","sourceRoot":"","sources":["../src/world-frame.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAIlE,gFAAgF;AAChF,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACpC,aAAa,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACvC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAE3D;AAED,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAE3D;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,eAAe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cAAc,GAAG,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAExF;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,IAAI,GAAG,SAAS,CAWhG"}
@@ -36,6 +36,40 @@ export function renderFrameWorldOffset(info) {
36
36
  const offset = viewerToIfcAxes(totalYupOffset(info));
37
37
  return { x: offset.x + 0, y: offset.y + 0, z: offset.z + 0 };
38
38
  }
39
+ /**
40
+ * The restore a writer needs to put render-frame meshes back in IFC world,
41
+ * as the column-major 4x4 the Rust exporters take (`MeshFrame::world_matrix`,
42
+ * #7734): `world = M * baked` with `baked` in IFC Z-up (the axes the matrix
43
+ * acts in, so the GLB root can carry it) and f64. A render-frame offset is a
44
+ * pure translation, so only the last column varies. `undefined` for a model
45
+ * that was not shifted: there is nothing to restore, and `undefined` is how
46
+ * `exportGlbFromMeshes` is told so.
47
+ */
48
+ export function renderFrameWorldMatrix(info) {
49
+ const o = renderFrameWorldOffset(info);
50
+ if (o.x === 0 && o.y === 0 && o.z === 0)
51
+ return undefined;
52
+ return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, o.x, o.y, o.z, 1];
53
+ }
54
+ /**
55
+ * [`renderFrameWorldMatrix`] for vertices that are still in the render
56
+ * frame's own Y-up axes (a Parquet or IFC5 table of the viewer's meshes):
57
+ * `world = M * [x, y, z, 1]`, `M` column-major, IFC Z-up metres. It is the
58
+ * same restore with the Y-up to Z-up basis folded in, so a reader needs no
59
+ * axis convention to use it. Always 16 numbers (the basis is not identity).
60
+ */
61
+ export function renderFrameYupToWorldMatrix(info) {
62
+ const o = renderFrameWorldOffset(info);
63
+ return [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, o.x, o.y, o.z, 1];
64
+ }
65
+ /**
66
+ * The wire tag (`mesh_coordinate_space`, the Rust `MeshCoordinateSpace`) of a
67
+ * render frame: `model_rtc` when it is shifted, `raw_ifc` when not. The
68
+ * viewer's meshes carry no site rotation, so `site_local` never applies here.
69
+ */
70
+ export function renderFrameCoordinateSpace(info) {
71
+ return renderFrameWorldMatrix(info) ? 'model_rtc' : 'raw_ifc';
72
+ }
39
73
  /**
40
74
  * The `CoordinateInfo` whose frame a set of loaded models is drawn in.
41
75
  *
@@ -1 +1 @@
1
- {"version":3,"file":"world-frame.js","sourceRoot":"","sources":["../src/world-frame.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAsB/D,MAAM,IAAI,GAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAQxC;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,KAAqB;IACnD,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;AACpD,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,eAAe,CAAC,KAAqB;IACnD,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAA6B;IAC1D,MAAM,KAAK,GAAG,IAAI,EAAE,WAAW,IAAI,IAAI,CAAC;IACxC,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,EAAE,aAAa,IAAI,IAAI,CAAC,CAAC;IAC5D,OAAO;QACL,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;QACrB,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;QACrB,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;KACtB,CAAC;AACJ,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