@vertexvis/viewer 1.0.0-testing.2 → 1.0.0-testing.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/dist/cjs/{config-CBFIZ5gy.js → config-C1xbl3Qa.js} +3 -3
- package/dist/cjs/{config-CBFIZ5gy.js.map → config-C1xbl3Qa.js.map} +1 -1
- package/dist/cjs/{entities-CAphDi6v.js → entities-D6AUMclh.js} +4 -4
- package/dist/cjs/{entities-CAphDi6v.js.map → entities-D6AUMclh.js.map} +1 -1
- package/dist/cjs/{geometry_pb-DW53co_-.js → geometry_pb-Ctp-Gcjm.js} +3 -3
- package/dist/cjs/{geometry_pb-DW53co_-.js.map → geometry_pb-Ctp-Gcjm.js.map} +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/{queries-uJfbbPWV.js → queries-CZmukyhu.js} +4 -4
- package/dist/cjs/{queries-uJfbbPWV.js.map → queries-CZmukyhu.js.map} +1 -1
- package/dist/cjs/{regl-component-CF41rUUv.js → regl-component-DOa8eHGy.js} +3 -3
- package/dist/cjs/{regl-component-CF41rUUv.js.map → regl-component-DOa8eHGy.js.map} +1 -1
- package/dist/cjs/{representation_pb-u7t5FI12.js → representation_pb-BrMsFavQ.js} +3 -3
- package/dist/cjs/{representation_pb-u7t5FI12.js.map → representation_pb-BrMsFavQ.js.map} +1 -1
- package/dist/cjs/{streamAttributes-BX291dI6.js → streamAttributes-DQm8yx7F.js} +6 -4
- package/dist/cjs/streamAttributes-DQm8yx7F.js.map +1 -0
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-hit-result-indicator.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer.cjs.entry.js +27 -7
- package/dist/cjs/vertex-viewer.cjs.entry.js.map +1 -1
- package/dist/collection/lib/meters.js +15 -1
- package/dist/collection/lib/meters.js.map +1 -1
- package/dist/collection/lib/storage.js +8 -2
- package/dist/collection/lib/storage.js.map +1 -1
- package/dist/collection/workers/png-decoder-pool.js +4 -2
- package/dist/collection/workers/png-decoder-pool.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BhgrvpJL.js → p-BLSuslo8.js} +2 -2
- package/dist/components/{p-D7rQku5u.js → p-Bmj32MLp.js} +2 -2
- package/dist/components/{p-MYlndA6B.js → p-Bo49wgwt.js} +2 -2
- package/dist/components/{p-BjcO9U8D.js → p-BvOB1WAv.js} +2 -2
- package/dist/components/{p-DSeOWYJ_.js → p-BygjJ1WP.js} +2 -2
- package/dist/components/{p-CJuOe1O1.js → p-CGpWfqFr.js} +2 -2
- package/dist/components/{p-uwvTj3Cw.js → p-CHQ7ZKZd.js} +2 -2
- package/dist/components/{p-Lx4iaHhY.js → p-CYhNWr6k.js} +2 -2
- package/dist/components/{p-JSB7V_jW.js → p-DLV-gg65.js} +2 -2
- package/dist/components/{p-JSB7V_jW.js.map → p-DLV-gg65.js.map} +1 -1
- package/dist/components/{p-DyPaZtSF.js → p-gFMW2KYT.js} +2 -2
- package/dist/components/vertex-scene-tree-table-cell.js +1 -1
- package/dist/components/vertex-scene-tree.js +1 -1
- package/dist/components/vertex-viewer-dom-renderer.js +1 -1
- package/dist/components/vertex-viewer-hit-result-indicator.js +1 -1
- package/dist/components/vertex-viewer-measurement-details.js +1 -1
- package/dist/components/vertex-viewer-measurement-distance.js +1 -1
- package/dist/components/vertex-viewer-measurement-overlays.js +1 -1
- package/dist/components/vertex-viewer-measurement-precise.js +1 -1
- package/dist/components/vertex-viewer-measurement-precise.js.map +1 -1
- package/dist/components/vertex-viewer-pin-group.js +1 -1
- package/dist/components/vertex-viewer-pin-tool.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js.map +1 -1
- package/dist/components/vertex-viewer-view-cube.js +1 -1
- package/dist/components/vertex-viewer.js +1 -1
- package/dist/components/vertex-viewer.js.map +1 -1
- package/dist/esm/{config-_vT0BdS-.js → config-BrYuY-7v.js} +3 -3
- package/dist/esm/{config-_vT0BdS-.js.map → config-BrYuY-7v.js.map} +1 -1
- package/dist/esm/{entities-8QCEsVRy.js → entities-DxpPFj9w.js} +4 -4
- package/dist/esm/{entities-8QCEsVRy.js.map → entities-DxpPFj9w.js.map} +1 -1
- package/dist/esm/{geometry_pb-Dj0yGTFi.js → geometry_pb-BLGp5Nq8.js} +3 -3
- package/dist/esm/{geometry_pb-Dj0yGTFi.js.map → geometry_pb-BLGp5Nq8.js.map} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.mjs +5 -5
- package/dist/esm/{queries-W4aeN1vv.js → queries-Coo1RH5H.js} +4 -4
- package/dist/esm/{queries-W4aeN1vv.js.map → queries-Coo1RH5H.js.map} +1 -1
- package/dist/esm/{regl-component-Rio5LpoO.js → regl-component-B30675op.js} +3 -3
- package/dist/esm/{regl-component-Rio5LpoO.js.map → regl-component-B30675op.js.map} +1 -1
- package/dist/esm/{representation_pb-CCDsiQtg.js → representation_pb-DYkJtHQo.js} +3 -3
- package/dist/esm/{representation_pb-CCDsiQtg.js.map → representation_pb-DYkJtHQo.js.map} +1 -1
- package/dist/esm/{streamAttributes-DhQVsxJf.js → streamAttributes-Cfp9UX5m.js} +6 -4
- package/dist/esm/streamAttributes-Cfp9UX5m.js.map +1 -0
- package/dist/esm/vertex-scene-tree-table-cell.entry.js +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +2 -2
- package/dist/esm/vertex-viewer-dom-element_2.entry.js +1 -1
- package/dist/esm/vertex-viewer-hit-result-indicator.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-details.entry.js +1 -1
- package/dist/esm/vertex-viewer-measurement-distance.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +2 -2
- package/dist/esm/vertex-viewer-measurement-precise.entry.js +4 -4
- package/dist/esm/vertex-viewer-pin-group.entry.js +3 -3
- package/dist/esm/vertex-viewer-transform-widget.entry.js +2 -2
- package/dist/esm/vertex-viewer-view-cube.entry.js +1 -1
- package/dist/esm/vertex-viewer.entry.js +27 -7
- package/dist/esm/vertex-viewer.entry.js.map +1 -1
- package/dist/viewer/index.esm.js +1 -1
- package/dist/viewer/{p-baec8489.entry.js → p-0287e1ba.entry.js} +2 -2
- package/dist/viewer/{p-2bd6cd13.entry.js → p-380e0112.entry.js} +2 -2
- package/dist/viewer/{p-101825c2.entry.js → p-40d90c6e.entry.js} +2 -2
- package/dist/viewer/{p-317da1b6.entry.js → p-6a546084.entry.js} +2 -2
- package/dist/viewer/p-7189eb18.entry.js +5 -0
- package/dist/viewer/p-7189eb18.entry.js.map +1 -0
- package/dist/viewer/{p-807aa9d0.entry.js → p-72fa9fba.entry.js} +2 -2
- package/dist/viewer/{p-0bf39fff.entry.js → p-81391d86.entry.js} +2 -2
- package/dist/viewer/{p-5VxzXVFc.js → p-B7mOY-Vi.js} +2 -2
- package/dist/viewer/{p-5VxzXVFc.js.map → p-B7mOY-Vi.js.map} +1 -1
- package/dist/viewer/{p-B9AGwrOP.js → p-CVRW2Plt.js} +2 -2
- package/dist/viewer/{p-B9AGwrOP.js.map → p-CVRW2Plt.js.map} +1 -1
- package/dist/viewer/{p-C0bm56qJ.js → p-CrcoZmKt.js} +2 -2
- package/dist/viewer/p-CrcoZmKt.js.map +1 -0
- package/dist/viewer/{p-BNiP3SE7.js → p-DKKHW33X.js} +2 -2
- package/dist/viewer/{p-BNiP3SE7.js.map → p-DKKHW33X.js.map} +1 -1
- package/dist/viewer/p-F9YPK1I7.js +5 -0
- package/dist/viewer/{p-DOMCeSTr.js.map → p-F9YPK1I7.js.map} +1 -1
- package/dist/viewer/p-Nk8SgPHE.js +5 -0
- package/dist/viewer/{p-CrwKMz5f.js.map → p-Nk8SgPHE.js.map} +1 -1
- package/dist/viewer/{p-BoFi-Uyu.js → p-_19YlCN5.js} +2 -2
- package/dist/viewer/{p-BoFi-Uyu.js.map → p-_19YlCN5.js.map} +1 -1
- package/dist/viewer/{p-dd2f92e3.entry.js → p-c7eb05ec.entry.js} +2 -2
- package/dist/viewer/{p-fade0dba.entry.js → p-c9d71f1e.entry.js} +2 -2
- package/dist/viewer/{p-49b9bba2.entry.js → p-d50b2449.entry.js} +2 -2
- package/dist/viewer/{p-0fa89933.entry.js → p-e80260d3.entry.js} +2 -2
- package/dist/viewer/{p-71c08a04.entry.js → p-fc082185.entry.js} +2 -2
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +8 -7
- package/dist/cjs/streamAttributes-BX291dI6.js.map +0 -1
- package/dist/esm/streamAttributes-DhQVsxJf.js.map +0 -1
- package/dist/viewer/p-C0bm56qJ.js.map +0 -1
- package/dist/viewer/p-CrwKMz5f.js +0 -5
- package/dist/viewer/p-DOMCeSTr.js +0 -5
- package/dist/viewer/p-ea736bd1.entry.js +0 -5
- package/dist/viewer/p-ea736bd1.entry.js.map +0 -1
- /package/dist/components/{p-BhgrvpJL.js.map → p-BLSuslo8.js.map} +0 -0
- /package/dist/components/{p-D7rQku5u.js.map → p-Bmj32MLp.js.map} +0 -0
- /package/dist/components/{p-MYlndA6B.js.map → p-Bo49wgwt.js.map} +0 -0
- /package/dist/components/{p-BjcO9U8D.js.map → p-BvOB1WAv.js.map} +0 -0
- /package/dist/components/{p-DSeOWYJ_.js.map → p-BygjJ1WP.js.map} +0 -0
- /package/dist/components/{p-CJuOe1O1.js.map → p-CGpWfqFr.js.map} +0 -0
- /package/dist/components/{p-uwvTj3Cw.js.map → p-CHQ7ZKZd.js.map} +0 -0
- /package/dist/components/{p-Lx4iaHhY.js.map → p-CYhNWr6k.js.map} +0 -0
- /package/dist/components/{p-DyPaZtSF.js.map → p-gFMW2KYT.js.map} +0 -0
- /package/dist/viewer/{p-baec8489.entry.js.map → p-0287e1ba.entry.js.map} +0 -0
- /package/dist/viewer/{p-2bd6cd13.entry.js.map → p-380e0112.entry.js.map} +0 -0
- /package/dist/viewer/{p-101825c2.entry.js.map → p-40d90c6e.entry.js.map} +0 -0
- /package/dist/viewer/{p-317da1b6.entry.js.map → p-6a546084.entry.js.map} +0 -0
- /package/dist/viewer/{p-807aa9d0.entry.js.map → p-72fa9fba.entry.js.map} +0 -0
- /package/dist/viewer/{p-0bf39fff.entry.js.map → p-81391d86.entry.js.map} +0 -0
- /package/dist/viewer/{p-dd2f92e3.entry.js.map → p-c7eb05ec.entry.js.map} +0 -0
- /package/dist/viewer/{p-fade0dba.entry.js.map → p-c9d71f1e.entry.js.map} +0 -0
- /package/dist/viewer/{p-49b9bba2.entry.js.map → p-d50b2449.entry.js.map} +0 -0
- /package/dist/viewer/{p-0fa89933.entry.js.map → p-e80260d3.entry.js.map} +0 -0
- /package/dist/viewer/{p-71c08a04.entry.js.map → p-fc082185.entry.js.map} +0 -0
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
+
const fallbackPerformance = {
|
|
5
|
+
clearMarks: () => undefined,
|
|
6
|
+
clearMeasures: () => undefined,
|
|
7
|
+
getEntriesByName: () => [],
|
|
8
|
+
mark: () => undefined,
|
|
9
|
+
measure: () => undefined,
|
|
10
|
+
};
|
|
11
|
+
function getPerformance() {
|
|
12
|
+
var _a;
|
|
13
|
+
if (typeof window !== 'undefined') {
|
|
14
|
+
return window.performance;
|
|
15
|
+
}
|
|
16
|
+
return (_a = globalThis.performance) !== null && _a !== void 0 ? _a : fallbackPerformance;
|
|
17
|
+
}
|
|
4
18
|
/**
|
|
5
19
|
* A meter for measuring timings. Measurements are stored using the browser's
|
|
6
20
|
* performance APIs, which provide high-resolution timestamps, as well as
|
|
7
21
|
* provides visibility in the browser's developer tooling.
|
|
8
22
|
*/
|
|
9
23
|
export class TimingMeter {
|
|
10
|
-
constructor(name, perf =
|
|
24
|
+
constructor(name, perf = getPerformance()) {
|
|
11
25
|
this.name = name;
|
|
12
26
|
this.perf = perf;
|
|
13
27
|
this.measures = new Set();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meters.js","sourceRoot":"","sources":["../../../../src/lib/meters.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,MAAM,OAAO,WAAW;IAItB,YACkB,IAAY,EACX,OAAoB,
|
|
1
|
+
{"version":3,"file":"meters.js","sourceRoot":"","sources":["../../../../src/lib/meters.ts"],"names":[],"mappings":"AAKA,MAAM,mBAAmB,GAAG;IAC1B,UAAU,EAAE,GAAG,EAAE,CAAC,SAAS;IAC3B,aAAa,EAAE,GAAG,EAAE,CAAC,SAAS;IAC9B,gBAAgB,EAAE,GAAG,EAAE,CAAC,EAAE;IAC1B,IAAI,EAAE,GAAG,EAAE,CAAC,SAAS;IACrB,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS;CACC,CAAC;AAE5B,SAAS,cAAc;;IACrB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,MAAM,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,OAAO,MAAA,UAAU,CAAC,WAAW,mCAAI,mBAAmB,CAAC;AACvD,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,WAAW;IAItB,YACkB,IAAY,EACX,OAAoB,cAAc,EAAE;QADrC,SAAI,GAAJ,IAAI,CAAQ;QACX,SAAI,GAAJ,IAAI,CAAgC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,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,GAAG,CAAC,IAAY;QACtB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,WAAW,CAAC,YAAY,CAAC,CAAC","sourcesContent":["export interface Timing {\n startTime: number;\n duration: number;\n}\n\nconst fallbackPerformance = {\n clearMarks: () => undefined,\n clearMeasures: () => undefined,\n getEntriesByName: () => [],\n mark: () => undefined,\n measure: () => undefined,\n} as unknown as Performance;\n\nfunction getPerformance(): Performance {\n if (typeof window !== 'undefined') {\n return window.performance;\n }\n\n return globalThis.performance ?? fallbackPerformance;\n}\n\n/**\n * A meter for measuring timings. Measurements are stored using the browser's\n * performance APIs, which provide high-resolution timestamps, as well as\n * provides visibility in the browser's developer tooling.\n */\nexport class TimingMeter {\n private measures = new Set<string>();\n private nextId = 0;\n\n public constructor(\n public readonly name: string,\n private readonly perf: Performance = getPerformance()\n ) {}\n\n /**\n * Clears any measurements from the buffer.\n */\n public clearMeasurements(): void {\n this.perf.clearMeasures(this.name);\n }\n\n /**\n * Measures the execution time of a function.\n *\n * @param target A function to execute and measure.\n */\n public measure<T>(target: () => T): T;\n\n /**\n * Measures the time for a promise to resolve, either successfully or not.\n *\n * @param target The promise to measure.\n */\n public measure<T>(target: Promise<T>): Promise<T>;\n public measure<T>(target: (() => T) | Promise<T>): T | Promise<T> {\n if (target instanceof Promise) {\n const mark = this.begin();\n return target.finally(() => this.end(mark));\n } else if (typeof target === 'function') {\n const mark = this.begin();\n const result = target();\n this.end(mark);\n return result;\n } else {\n throw new Error('Input must be a function or Promise');\n }\n }\n\n /**\n * Returns a list of measurements that have been recorded, and clears the\n * internal measurement buffer.\n */\n public takeMeasurements(): Timing[] {\n const timings = this.perf.getEntriesByName(this.name);\n this.clearMeasurements();\n return timings;\n }\n\n /**\n * Returns the last measurement to have been recorded, and clears the internal\n * measurement buffer.\n */\n public takeLastMeasurement(): Timing | undefined {\n const measurements = this.takeMeasurements();\n return measurements[measurements.length - 1];\n }\n\n private begin(): string {\n const mark = `${this.name}-${this.nextId++}`;\n this.measures.add(mark);\n this.perf.mark(mark);\n return mark;\n }\n\n private end(mark: string): void {\n this.perf.measure(this.name, mark);\n this.perf.clearMarks(mark);\n this.measures.delete(mark);\n }\n}\n\nexport const paintTime = new TimingMeter('paint_time');\n"]}
|
|
@@ -5,7 +5,13 @@ export var StorageKeys;
|
|
|
5
5
|
(function (StorageKeys) {
|
|
6
6
|
StorageKeys["DEVICE_ID"] = "vertexvis:device-id";
|
|
7
7
|
})(StorageKeys || (StorageKeys = {}));
|
|
8
|
-
|
|
8
|
+
function getLocalStorage() {
|
|
9
|
+
if (typeof window === 'undefined') {
|
|
10
|
+
throw new Error('Local storage is not available.');
|
|
11
|
+
}
|
|
12
|
+
return window.localStorage;
|
|
13
|
+
}
|
|
14
|
+
export function upsertStorageEntry(key, values, storage = getLocalStorage()) {
|
|
9
15
|
const existing = storage.getItem(key);
|
|
10
16
|
if (existing != null) {
|
|
11
17
|
const updated = { ...JSON.parse(existing), ...values };
|
|
@@ -15,7 +21,7 @@ export function upsertStorageEntry(key, values, storage = window.localStorage) {
|
|
|
15
21
|
storage.setItem(key, JSON.stringify(values));
|
|
16
22
|
}
|
|
17
23
|
}
|
|
18
|
-
export function getStorageEntry(key, f, storage =
|
|
24
|
+
export function getStorageEntry(key, f, storage = getLocalStorage()) {
|
|
19
25
|
const item = storage.getItem(key);
|
|
20
26
|
if (item != null) {
|
|
21
27
|
return f(JSON.parse(item));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../src/lib/storage.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,gDAAiC,CAAA;AACnC,CAAC,EAFW,WAAW,KAAX,WAAW,QAEtB;AAED,MAAM,UAAU,kBAAkB,CAChC,GAAW,EACX,MAAyB,EACzB,UAAmB,
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../../src/lib/storage.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,WAEX;AAFD,WAAY,WAAW;IACrB,gDAAiC,CAAA;AACnC,CAAC,EAFW,WAAW,KAAX,WAAW,QAEtB;AAED,SAAS,eAAe;IACtB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,MAAM,CAAC,YAAY,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,GAAW,EACX,MAAyB,EACzB,UAAmB,eAAe,EAAE;IAEpC,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAEtC,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC;QACvD,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAChD,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,GAAW,EACX,CAA8C,EAC9C,UAAmB,eAAe,EAAE;IAEpC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAElC,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjB,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7B,CAAC;AACH,CAAC","sourcesContent":["export enum StorageKeys {\n DEVICE_ID = 'vertexvis:device-id',\n}\n\nfunction getLocalStorage(): Storage {\n if (typeof window === 'undefined') {\n throw new Error('Local storage is not available.');\n }\n\n return window.localStorage;\n}\n\nexport function upsertStorageEntry<T>(\n key: string,\n values: Record<string, T>,\n storage: Storage = getLocalStorage()\n): void {\n const existing = storage.getItem(key);\n\n if (existing != null) {\n const updated = { ...JSON.parse(existing), ...values };\n storage.setItem(key, JSON.stringify(updated));\n } else {\n storage.setItem(key, JSON.stringify(values));\n }\n}\n\nexport function getStorageEntry<T>(\n key: string,\n f: (value: Record<string, T>) => T | undefined,\n storage: Storage = getLocalStorage()\n): T | undefined {\n const item = storage.getItem(key);\n\n if (item != null) {\n return f(JSON.parse(item));\n }\n}\n"]}
|
|
@@ -36,6 +36,8 @@ export const decodePng = async (bytes) => {
|
|
|
36
36
|
const pool = await getPool();
|
|
37
37
|
return pool.queue((decode) => decode(bytes));
|
|
38
38
|
};
|
|
39
|
-
// Prefetch the worker and initialize the pool.
|
|
40
|
-
|
|
39
|
+
// Prefetch the worker and initialize the pool in browsers only.
|
|
40
|
+
if (typeof window !== 'undefined') {
|
|
41
|
+
void getPool();
|
|
42
|
+
}
|
|
41
43
|
//# sourceMappingURL=png-decoder-pool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"png-decoder-pool.js","sourceRoot":"","sources":["../../../../src/workers/png-decoder-pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,yBAAyB,CAAC;AAOzE,IAAI,YAAkD,CAAC;AACvD,IAAI,UAA8C,CAAC;AAEn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C,KAAK,CAAC,CAAC,CAAC;AAC5D,CAAC,CAAC;AAEF,gEAAgE;AAChE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;IAClC,KAAK,OAAO,EAAE,CAAC;AACjB,CAAC","sourcesContent":["import { loadWorker, Pool, WorkerModule } from 'worker:./png-decoder.js';\n\nimport type { DecodePngFn } from './png-decoder';\n\ntype DecodePngModule = WorkerModule<DecodePngFn>;\ntype DecodePngPool = Pool<DecodePngFn>;\n\nlet workerLoader: Promise<DecodePngModule> | undefined;\nlet poolLoader: Promise<DecodePngPool> | undefined;\n\nconst DEFAULT_POOL_SIZE = 1;\n\nfunction loadWorkerModule(): Promise<DecodePngModule> {\n if (workerLoader == null) {\n console.debug(`Loading PNG worker module`);\n workerLoader = loadWorker();\n }\n return workerLoader;\n}\n\nfunction getPoolSize(): number {\n if (typeof window !== 'undefined') {\n const concurrency = window.navigator.hardwareConcurrency ?? 8;\n return Math.ceil(concurrency / 4);\n } else {\n return DEFAULT_POOL_SIZE;\n }\n}\n\nasync function getPool(): Promise<DecodePngPool> {\n if (poolLoader == null) {\n poolLoader = loadWorkerModule().then(async ({ spawnPool }) => {\n const size = getPoolSize();\n console.debug(`Spawning PNG worker pool [size=${size}]`);\n return spawnPool({ size });\n });\n }\n return poolLoader;\n}\n\nexport const decodePng: DecodePngFn = async (bytes) => {\n const pool = await getPool();\n return pool.queue((decode: DecodePngFn) => decode(bytes));\n};\n\n// Prefetch the worker and initialize the pool in browsers only.\nif (typeof window !== 'undefined') {\n void getPool();\n}\n"]}
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
-
import{g as o}from"./p-DmsAWRoU.js";export{a as getAssetPath,r as render,s as setAssetPath,b as setNonce,c as setPlatformOptions}from"./p-DmsAWRoU.js";export{C as Camera,c as ColorMaterial,a as CrossSectioner,I as ItemOperationBuilder,l as LoadableResource,M as ModelViewController,P as PmiAnnotationOperationsBuilder,b as PmiAnnotationsQueryExecutor,k as PmiController,R as Raycaster,d as RootQuery,S as Scene,e as SceneElementQueryExecutor,f as SceneElementsOperationExecutor,g as SceneItemOperationsBuilder,h as SceneItemQueryExecutor,i as SceneItemsOperationExecutor,s as SceneViewStateIdentifier,j as SynchronizedClock}from"./p-
|
|
4
|
+
import{g as o}from"./p-DmsAWRoU.js";export{a as getAssetPath,r as render,s as setAssetPath,b as setNonce,c as setPlatformOptions}from"./p-DmsAWRoU.js";export{C as Camera,c as ColorMaterial,a as CrossSectioner,I as ItemOperationBuilder,l as LoadableResource,M as ModelViewController,P as PmiAnnotationOperationsBuilder,b as PmiAnnotationsQueryExecutor,k as PmiController,R as Raycaster,d as RootQuery,S as Scene,e as SceneElementQueryExecutor,f as SceneElementsOperationExecutor,g as SceneItemOperationsBuilder,h as SceneItemQueryExecutor,i as SceneItemsOperationExecutor,s as SceneViewStateIdentifier,j as SynchronizedClock}from"./p-gFMW2KYT.js";export{S as SceneTreeController}from"./p-CApzdHGy.js";export{f as fromNodeProto,i as isLoadedRow}from"./p-CiSHWNC4.js";export{S as SCENE_ITEM_NAME_METADATA_KEY}from"./p-BZwvQkyb.js";export{C as CursorManager,b as boxQueryCursor,l as labelPinCursor,m as measurementCursor,a as measurementWithArrowCursor,p as pinCursor}from"./p-Bn7QEZYW.js";export{M as MeasurementController,a as MeasurementEntity}from"./p-CGpWfqFr.js";export{M as MeasurementModel}from"./p-BlP9GdkV.js";export{M as MeasurementOverlayManager}from"./p-BgzShg1O.js";export{m as makeMinimumDistanceResult}from"./p-BKId5xpb.js";import{v as n,q as u,m as x}from"./p-Tvs4yxd5.js";export{T as TransformController}from"./p-B6pxBmYG.js";export{f as flattenPointArray,a as toDegreesTransform,e as toLocalTransform,b as toMatrix,t as toRadiansTransform,c as toTransform,d as toWorldTransform}from"./p-B2SMWIov.js";export{A as AngleUnits,g as AreaUnits,c as CrossSectioning,D as DistanceUnits,E as EntityType,F as FrameCameraBase,O as Orientation,a as ReceivedFrame,b as ReceivedFrameImage,d as ReceivedFrameScene,e as ReceivedOrthographicCamera,f as ReceivedPerspectiveCamera,S as StandardView}from"./p-DLV-gg65.js";export{A as ArrowMarkup,C as CircleMarkup,F as FreeformMarkup}from"./p-C0XdJaSj.js";export{V as Viewport}from"./p-Dpyl9pSp.js";export{V as VolumeIntersectionQueryController,a as VolumeIntersectionQueryModel}from"./p-D1HS4s9j.js";const y=.9999;function v(e){const r=n.create(0,e.z,-e.y);const a=n.create(-e.z,0,e.x);const s=n.magnitudeSquared(r)>n.magnitudeSquared(a)?r:a;return n.normalize(n.cross(e,s))}function B(e,r){const a=n.dot(e,r);if(a>y){const r=v(e);const a=u.fromAxisAngle(r,Math.PI);return x.makeRotation(a)}else if(a<=-y){return x.makeIdentity()}else{const a=n.angleTo(r,e);const s=n.normalize(n.cross(e,r));return x.makeRotation(u.fromAxisAngle(s,a+Math.PI))}}function Q(e,r,a,s){const o=B(e,a);const t=x.makeTranslation(s);return x.multiply(x.multiply(t,o),x.makeTranslation(n.negate(r)))}var W=Object.freeze({__proto__:null,ALMOST_ONE:y,calculateOrthogonalCoordinate:v,computeRotationMatrix:B,computeTransformationDelta:Q});o();export{W as TransformationDelta};
|
|
5
5
|
//# sourceMappingURL=index.js.map
|