viral-viewer-2 6.9.8 → 6.9.9
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/{batched-mesh-simplifier-BAoQ7bJe.mjs → batched-mesh-simplifier-KM5VEIBC.mjs} +1 -1
- package/dist/components/data-manager/viral-data-manager.d.ts +49 -0
- package/dist/components/visibility-manager/viral-visibility-manager.d.ts +1 -1
- package/dist/{index-B55mwbMr.mjs → index-DQMkPpPd.mjs} +2555 -2319
- package/dist/index.mjs +1 -1
- package/dist/types.d.ts +98 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as i, v as r, C as l, u as s, r as t, t as n, D as o, E as V, F as u, G as d, H as g, I as m, L as c, x as E, T as M, c as T, V as y, i as f, d as h, y as p, j as v, z as C, h as D, g as R, b, w as B, f as S, e as F, p as k, o as w, l as G, k as H, A as I, n as L, m as P, J as x, q as z } from "./index-
|
|
1
|
+
import { s as i, v as r, C as l, u as s, r as t, t as n, D as o, E as V, F as u, G as d, H as g, I as m, L as c, x as E, T as M, c as T, V as y, i as f, d as h, y as p, j as v, z as C, h as D, g as R, b, w as B, f as S, e as F, p as k, o as w, l as G, k as H, A as I, n as L, m as P, J as x, q as z } from "./index-DQMkPpPd.mjs";
|
|
2
2
|
export {
|
|
3
3
|
i as BufferElement,
|
|
4
4
|
r as CheckClashResult,
|
package/dist/types.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export interface ViewerOptions {
|
|
|
6
6
|
enableNavigationCube: boolean;
|
|
7
7
|
enableTools: boolean;
|
|
8
8
|
enablePostProcessing?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Optimize Edge rendering, Show/ Hide edges base on camera movement
|
|
11
|
+
*/
|
|
12
|
+
adaptiveEdges?: boolean;
|
|
13
|
+
adaptiveAmbientOcclusion?: boolean;
|
|
9
14
|
}
|
|
10
15
|
export interface ViralViewerRevitProject {
|
|
11
16
|
Materials: RenderMaterial[];
|
|
@@ -199,30 +204,116 @@ export declare class TreeNode {
|
|
|
199
204
|
children: Map<string, TreeNode>;
|
|
200
205
|
keys: Set<number>;
|
|
201
206
|
}
|
|
207
|
+
export interface SerializedTreeNode {
|
|
208
|
+
children: {
|
|
209
|
+
[char: string]: SerializedTreeNode;
|
|
210
|
+
};
|
|
211
|
+
keys: number[];
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Optimized DataTree with flat key-value storage
|
|
215
|
+
* - Memory efficient: Uses flat Map instead of nested objects
|
|
216
|
+
* - Fast queries: O(1) element lookup, O(n) search
|
|
217
|
+
* - Lazy search index: Only builds trie when search is called
|
|
218
|
+
*/
|
|
202
219
|
export declare class DataTree {
|
|
203
|
-
|
|
220
|
+
private _elementMap;
|
|
221
|
+
private _searchIndex;
|
|
222
|
+
private _searchIndexBuilt;
|
|
223
|
+
get elementData(): {
|
|
204
224
|
[key: number]: {
|
|
205
225
|
[key: string]: {
|
|
206
226
|
[key: string]: string;
|
|
207
227
|
};
|
|
208
228
|
};
|
|
209
229
|
}[];
|
|
210
|
-
|
|
211
|
-
constructor(elementData: {
|
|
230
|
+
constructor(elementData?: {
|
|
212
231
|
[key: number]: {
|
|
213
232
|
[key: string]: {
|
|
214
233
|
[key: string]: string;
|
|
215
234
|
};
|
|
216
235
|
};
|
|
217
|
-
}[], treeNode?:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
236
|
+
}[], treeNode?: SerializedTreeNode);
|
|
237
|
+
/**
|
|
238
|
+
* Add elements to the data tree (batch operation)
|
|
239
|
+
* @param data Object with elementId as key
|
|
240
|
+
*/
|
|
241
|
+
addElements(data: {
|
|
242
|
+
[key: number]: {
|
|
243
|
+
[key: string]: {
|
|
244
|
+
[key: string]: string;
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
}): void;
|
|
248
|
+
/**
|
|
249
|
+
* Get element data by ID - O(1) lookup
|
|
250
|
+
*/
|
|
221
251
|
getObjectByKey(key: number): {
|
|
222
252
|
[key: string]: {
|
|
223
253
|
[key: string]: string;
|
|
224
254
|
};
|
|
225
255
|
} | null;
|
|
256
|
+
/**
|
|
257
|
+
* Get all element IDs
|
|
258
|
+
*/
|
|
259
|
+
getElementIds(): number[];
|
|
260
|
+
/**
|
|
261
|
+
* Get element count
|
|
262
|
+
*/
|
|
263
|
+
get size(): number;
|
|
264
|
+
/**
|
|
265
|
+
* Get all elements with their data
|
|
266
|
+
* @returns Array of { elementId, data } objects
|
|
267
|
+
*/
|
|
268
|
+
getAllElements(): {
|
|
269
|
+
elementId: number;
|
|
270
|
+
data: {
|
|
271
|
+
[key: string]: {
|
|
272
|
+
[key: string]: string;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
}[];
|
|
276
|
+
/**
|
|
277
|
+
* Get all elements as a Map (more efficient for large datasets)
|
|
278
|
+
* @returns Map<elementId, elementData>
|
|
279
|
+
*/
|
|
280
|
+
getAllElementsMap(): Map<number, {
|
|
281
|
+
[key: string]: {
|
|
282
|
+
[key: string]: string;
|
|
283
|
+
};
|
|
284
|
+
}>;
|
|
285
|
+
/**
|
|
286
|
+
* Iterate over all elements without creating intermediate arrays
|
|
287
|
+
* More memory efficient for large datasets
|
|
288
|
+
* @param callback Function to call for each element
|
|
289
|
+
*/
|
|
290
|
+
forEachElement(callback: (elementId: number, data: {
|
|
291
|
+
[key: string]: {
|
|
292
|
+
[key: string]: string;
|
|
293
|
+
};
|
|
294
|
+
}) => void): void;
|
|
295
|
+
/**
|
|
296
|
+
* Search for elements containing the query string
|
|
297
|
+
* Builds search index lazily on first search
|
|
298
|
+
*/
|
|
299
|
+
search(query: string): number[];
|
|
300
|
+
/**
|
|
301
|
+
* Build inverted index for search
|
|
302
|
+
* Maps: "search term" -> Set<elementId>
|
|
303
|
+
*/
|
|
304
|
+
private _buildSearchIndex;
|
|
305
|
+
/**
|
|
306
|
+
* Rebuild search index from serialized worker result
|
|
307
|
+
*/
|
|
308
|
+
private _rebuildSearchIndexFromSerialized;
|
|
309
|
+
/**
|
|
310
|
+
* Clear search index to free memory
|
|
311
|
+
*/
|
|
312
|
+
clearSearchIndex(): void;
|
|
313
|
+
/**
|
|
314
|
+
* Dispose and clear all data
|
|
315
|
+
*/
|
|
316
|
+
dispose(): void;
|
|
226
317
|
}
|
|
227
318
|
export declare class CompareModelsResult {
|
|
228
319
|
deleted: number[];
|