viral-viewer-2 7.1.0 → 7.1.2
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-BrzQ9Wcy.mjs → batched-mesh-simplifier-vu8hs13q.mjs} +1 -1
- package/dist/components/camera/viral-camera.d.ts +1 -1
- package/dist/components/data-manager/viral-data-manager.d.ts +5 -12
- package/dist/components/duplication-analyzer/viral-duplication-analyzer.d.ts +1 -1
- package/dist/components/event-handler/base/event-dispatcher.d.ts +1 -1
- package/dist/components/event-handler/mouse/viral-mouse.d.ts +1 -1
- package/dist/components/event-handler/viral-lifecycle-event-handler.d.ts +1 -1
- package/dist/components/loader/viral-revit.loader.d.ts +2 -17
- package/dist/components/loader/viral.loader.d.ts +0 -2
- package/dist/components/worker/bounding-box-intersect.worker.d.ts +1 -1
- package/dist/components/worker/bounding-box.worker.d.ts +1 -1
- package/dist/components/worker/load-element-batch.worker.d.ts +1 -1
- package/dist/entities/archive-elements.d.ts +59 -0
- package/dist/entities/base-elements.d.ts +61 -0
- package/dist/entities/configuration.d.ts +14 -0
- package/dist/entities/data-tree.d.ts +127 -0
- package/dist/entities/data.d.ts +25 -0
- package/dist/entities/event.d.ts +30 -0
- package/dist/entities/index.d.ts +9 -0
- package/dist/entities/results.d.ts +19 -0
- package/dist/entities/tool.d.ts +6 -0
- package/dist/entities/viewer-option.d.ts +18 -0
- package/dist/gui/draggable-modal/viral-draggable-modal.d.ts +6 -1
- package/dist/index-t54CsB2Q.mjs +120157 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +23 -26
- package/dist/types.d.ts +0 -325
- package/dist/viral-viewer-api.d.ts +1 -1
- package/package.json +1 -2
- package/dist/components/loader/viral-flatbuffer.loader.d.ts +0 -13
- package/dist/components/worker/load-element-by-material-v2.worker.d.ts +0 -11
- package/dist/components/worker/load-element-by-material.worker.d.ts +0 -11
- package/dist/components/worker/load-element-standalone.worker.d.ts +0 -15
- package/dist/components/worker/viral-viewer-2.worker.d.ts +0 -17
- package/dist/components/worker/viral-viewer-3.worker.d.ts +0 -14
- package/dist/components/worker/viral-viewer.worker.d.ts +0 -8
- package/dist/components/worker-script/load-element-by-material.script.d.ts +0 -3
- package/dist/components/worker-script/load-element-standalone.script.d.ts +0 -1
- package/dist/components/worker-script/load-model-worker-2.script.d.ts +0 -1
- package/dist/components/worker-script/load-model-worker.script.d.ts +0 -1
- package/dist/components/worker-script/material-aproach/load-element-by-material-instanced-mesh.script.d.ts +0 -1
- package/dist/components/worker-script/material-aproach/load-element-by-material-mesh.script.d.ts +0 -3
- package/dist/components/worker-script/threejs.types.d.ts +0 -1
- package/dist/index-B8x3D_5L.mjs +0 -58685
- package/dist/models/flat-buffer/model-management-camera-model.d.ts +0 -24
- package/dist/models/flat-buffer/parameter-dictionary.d.ts +0 -20
- package/dist/models/flat-buffer/point.d.ts +0 -11
- package/dist/models/flat-buffer/render-material.d.ts +0 -26
- package/dist/models/flat-buffer/revit-transform.d.ts +0 -22
- package/dist/models/flat-buffer/viralution-box.d.ts +0 -11
- package/dist/models/flat-buffer/viralution-element.d.ts +0 -27
- package/dist/models/flat-buffer/viralution-information.d.ts +0 -19
- package/dist/models/flat-buffer/viralution-parameter.d.ts +0 -35
- package/dist/models/flat-buffer/viralution-solid.d.ts +0 -28
- package/dist/models/flat-buffer/viralution-standalone-model.d.ts +0 -27
- package/dist/models/index.d.ts +0 -8
- package/dist/serializers/index.d.ts +0 -2
- package/dist/serializers/viralution-flatbuffer.serializer.d.ts +0 -92
- package/dist/serializers/viralution-standalone.serializer.d.ts +0 -16
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './types';
|
|
|
2
2
|
export * from './viral-viewer-api';
|
|
3
3
|
export * from './utils';
|
|
4
4
|
export * from './components/custom-objects';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './entities';
|
|
6
6
|
export { ViralRenderDebugPanel } from './gui/render-debug-panel/viral-render-debug-panel';
|
|
7
7
|
export { ViralBatchDebugPanel } from './gui/batch-debug-panel/viral-batch-debug-panel';
|
|
8
8
|
export { ViralInstancedDebugPanel } from './gui/instanced-debug-panel/viral-instanced-debug-panel';
|
package/dist/index.mjs
CHANGED
|
@@ -1,40 +1,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { k as r, z as i, C as s, t as l, e as t, s as n, D as o, E as V, F as u, G as d, H as m, L as g, T as E, u as c, c as y, V as M, w as T, d as h, g as p, x as v, h as D, v as C, r as R, b, f, j as B, i as w, p as G, o as H, l as L, y as P, n as k, m as x, q as F } from "./index-t54CsB2Q.mjs";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
r as BufferElement,
|
|
4
|
+
i as CheckClashResult,
|
|
5
|
+
s as CompareModelsResult,
|
|
6
|
+
l as DataTree,
|
|
7
7
|
t as DebouncedEventHandler,
|
|
8
8
|
n as DefaultLightConfiguration,
|
|
9
9
|
o as Dictionary,
|
|
10
10
|
V as ElementFragment,
|
|
11
11
|
u as Fragment,
|
|
12
12
|
d as GroupByResult,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
c as LogUtil,
|
|
13
|
+
m as HTMLUtil,
|
|
14
|
+
g as LogUtil,
|
|
16
15
|
E as THREEUtil,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
c as TreeNode,
|
|
17
|
+
y as ViralBatchDebugPanel,
|
|
18
|
+
M as ViralBatchedMesh,
|
|
19
|
+
T as ViralCameraEventType,
|
|
21
20
|
h as ViralInstancedDebugPanel,
|
|
22
21
|
p as ViralInstancedMesh,
|
|
23
22
|
v as ViralKeyboardEventType,
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
D as ViralMergedModel,
|
|
24
|
+
C as ViralMouseEventType,
|
|
26
25
|
R as ViralPoint,
|
|
27
26
|
b as ViralRenderDebugPanel,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
x as ViralutionStandaloneSerializer,
|
|
39
|
-
z as ViralutionTrackingModel
|
|
27
|
+
f as ViralViewerApi,
|
|
28
|
+
B as ViralViewerRevitGeometry,
|
|
29
|
+
w as ViralViewerRevitNoneStructuralGeometry,
|
|
30
|
+
G as ViralutionBox,
|
|
31
|
+
H as ViralutionCamera,
|
|
32
|
+
L as ViralutionElement,
|
|
33
|
+
P as ViralutionEvent,
|
|
34
|
+
k as ViralutionSolid,
|
|
35
|
+
x as ViralutionStandaloneModel,
|
|
36
|
+
F as ViralutionTrackingModel
|
|
40
37
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,118 +1,3 @@
|
|
|
1
|
-
export interface ViewerOptions {
|
|
2
|
-
container: HTMLElement;
|
|
3
|
-
cameraZUp: boolean;
|
|
4
|
-
isDev: boolean;
|
|
5
|
-
numberOfWorker: number;
|
|
6
|
-
enableNavigationCube: boolean;
|
|
7
|
-
enableTools: boolean;
|
|
8
|
-
enablePostProcessing?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Optimize Edge rendering, Show/ Hide edges base on camera movement
|
|
11
|
-
*/
|
|
12
|
-
adaptiveEdges?: boolean;
|
|
13
|
-
adaptiveAmbientOcclusion?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* from 0 to 1, step 0.1
|
|
16
|
-
*/
|
|
17
|
-
navigationCubeScale?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface ViralViewerRevitProject {
|
|
20
|
-
Materials: RenderMaterial[];
|
|
21
|
-
StructuralGeometries: ViralViewerRevitStructuralGeometry[];
|
|
22
|
-
NoneStructuralGeometries: ViralViewerRevitNoneStructuralGeometry[];
|
|
23
|
-
}
|
|
24
|
-
export interface RenderMaterial {
|
|
25
|
-
Name: string;
|
|
26
|
-
Opacity: number;
|
|
27
|
-
Metalness: number;
|
|
28
|
-
Roughness: number;
|
|
29
|
-
Red: number;
|
|
30
|
-
Green: number;
|
|
31
|
-
Blue: number;
|
|
32
|
-
}
|
|
33
|
-
export interface ViralViewerRevitStructuralGeometry {
|
|
34
|
-
MaterialIndex: number;
|
|
35
|
-
Vertices: ViralPoint[];
|
|
36
|
-
Indices: number[];
|
|
37
|
-
}
|
|
38
|
-
export declare class ViralViewerRevitNoneStructuralGeometry {
|
|
39
|
-
MaterialIndex: number;
|
|
40
|
-
Vertices: ViralPoint[];
|
|
41
|
-
Indices: number[];
|
|
42
|
-
Name: string;
|
|
43
|
-
Instances: RevitTransform[];
|
|
44
|
-
}
|
|
45
|
-
export interface ViralutionFragmentModel {
|
|
46
|
-
Materials: RenderMaterial[];
|
|
47
|
-
Fragments: Fragment[];
|
|
48
|
-
}
|
|
49
|
-
export declare class Fragment {
|
|
50
|
-
MaterialIndex: number;
|
|
51
|
-
Elements: ElementFragment[];
|
|
52
|
-
}
|
|
53
|
-
export declare class ElementFragment {
|
|
54
|
-
Vertices: ViralPoint[];
|
|
55
|
-
Indices: number[];
|
|
56
|
-
Instances: RevitTransform[];
|
|
57
|
-
Id: string;
|
|
58
|
-
}
|
|
59
|
-
export declare class ViralViewerRevitGeometry {
|
|
60
|
-
Vertices: ViralPoint[];
|
|
61
|
-
Indices: number[];
|
|
62
|
-
Transform: RevitTransform | null;
|
|
63
|
-
}
|
|
64
|
-
export declare class ViralPoint {
|
|
65
|
-
X: number;
|
|
66
|
-
Y: number;
|
|
67
|
-
Z: number;
|
|
68
|
-
}
|
|
69
|
-
export interface RevitTransform {
|
|
70
|
-
BasisX: ViralPoint;
|
|
71
|
-
BasisY: ViralPoint;
|
|
72
|
-
BasisZ: ViralPoint;
|
|
73
|
-
Offset: ViralPoint;
|
|
74
|
-
Id: string;
|
|
75
|
-
}
|
|
76
|
-
export interface ViralViewerState {
|
|
77
|
-
CameraPoint: ViralPoint;
|
|
78
|
-
TargetPoint: ViralPoint;
|
|
79
|
-
}
|
|
80
|
-
export interface ViralViewerTool {
|
|
81
|
-
svg: string;
|
|
82
|
-
index: number;
|
|
83
|
-
activate: boolean;
|
|
84
|
-
name: string;
|
|
85
|
-
}
|
|
86
|
-
export declare enum ViralMouseEventType {
|
|
87
|
-
ON_MOUSE_MOVE = 0,
|
|
88
|
-
ON_MOUSE_DOWN_LEFT = 1,
|
|
89
|
-
ON_MOUSE_UP_LEFT = 2,
|
|
90
|
-
ON_MOUSE_DOWN_RIGHT = 3,
|
|
91
|
-
ON_MOUSE_UP_RIGHT = 4,
|
|
92
|
-
ON_MOUSE_DOUBLE_CLICK = 5
|
|
93
|
-
}
|
|
94
|
-
export declare enum ViralCameraEventType {
|
|
95
|
-
ON_WAKE = 0,
|
|
96
|
-
ON_SLEEP = 1,
|
|
97
|
-
ON_UPDATE = 2
|
|
98
|
-
}
|
|
99
|
-
export declare enum ViralKeyboardEventType {
|
|
100
|
-
KEYDOWN = 0,
|
|
101
|
-
KEYUP = 1
|
|
102
|
-
}
|
|
103
|
-
export declare enum ViralutionEvent {
|
|
104
|
-
LOADED_SCENE = 0,
|
|
105
|
-
LOADED_MATERIAL_MANAGER = 1,
|
|
106
|
-
LOADED_RENDERER = 2,
|
|
107
|
-
LOADED_CAMERA = 3,
|
|
108
|
-
LOADED_CUBE = 4,
|
|
109
|
-
LOADED_TOOLS = 5,
|
|
110
|
-
LOADED_SEPERATE_MODEL = 6,
|
|
111
|
-
GENERATED_MERGE_MODEL = 7,
|
|
112
|
-
LOADED_DATA = 8,
|
|
113
|
-
SELECT_ELEMENTS = 9,
|
|
114
|
-
UNSELECT_ELEMENTS = 10
|
|
115
|
-
}
|
|
116
1
|
export declare class Dictionary<TKey, TValue> {
|
|
117
2
|
private items;
|
|
118
3
|
add(key: TKey, value: TValue): void;
|
|
@@ -123,47 +8,6 @@ export declare class Dictionary<TKey, TValue> {
|
|
|
123
8
|
values(): TValue[];
|
|
124
9
|
count(): number;
|
|
125
10
|
}
|
|
126
|
-
export declare class ViralutionElement {
|
|
127
|
-
Solids: ViralutionSolid[];
|
|
128
|
-
Id: string;
|
|
129
|
-
Instances: RevitTransform[];
|
|
130
|
-
}
|
|
131
|
-
export declare class ViralutionStandaloneModel {
|
|
132
|
-
Materials: RenderMaterial[];
|
|
133
|
-
Elements: ViralutionElement[];
|
|
134
|
-
Camera: ViralutionCamera;
|
|
135
|
-
}
|
|
136
|
-
export declare class ViralutionSolid {
|
|
137
|
-
MaterialIndex: number;
|
|
138
|
-
Vertices: ViralPoint[];
|
|
139
|
-
Indices: number[];
|
|
140
|
-
Buffer: number[];
|
|
141
|
-
}
|
|
142
|
-
export declare class ViralutionCamera {
|
|
143
|
-
scale: number;
|
|
144
|
-
origin: ViralPoint;
|
|
145
|
-
eyePosition: ViralPoint;
|
|
146
|
-
upDirection: ViralPoint;
|
|
147
|
-
forwardDirection: ViralPoint;
|
|
148
|
-
target: ViralPoint;
|
|
149
|
-
box: ViralutionBox;
|
|
150
|
-
}
|
|
151
|
-
export declare class ViralutionBox {
|
|
152
|
-
min: ViralPoint;
|
|
153
|
-
max: ViralPoint;
|
|
154
|
-
}
|
|
155
|
-
export declare class ViralutionTrackingModel {
|
|
156
|
-
Data: {
|
|
157
|
-
[key: number]: number[][];
|
|
158
|
-
};
|
|
159
|
-
CameraData: ViralutionCamera;
|
|
160
|
-
Translation?: number[];
|
|
161
|
-
}
|
|
162
|
-
export declare class IFCTrackingModel {
|
|
163
|
-
Data: {
|
|
164
|
-
[key: string]: number[][];
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
11
|
export declare class DebouncedEventHandler<T> {
|
|
168
12
|
private delay;
|
|
169
13
|
private eventHandler;
|
|
@@ -171,172 +15,3 @@ export declare class DebouncedEventHandler<T> {
|
|
|
171
15
|
constructor(delay: number, eventHandler: (event: T) => void);
|
|
172
16
|
handleEvent: (event: T) => void;
|
|
173
17
|
}
|
|
174
|
-
export declare class BufferElement {
|
|
175
|
-
/**
|
|
176
|
-
* In case this buffer element is instanced mesh this buffer is original geometry
|
|
177
|
-
*/
|
|
178
|
-
buffer: Float32Array | null;
|
|
179
|
-
/**
|
|
180
|
-
* In case this buffer element is instanced mesh this field is null
|
|
181
|
-
*/
|
|
182
|
-
elementId: string;
|
|
183
|
-
modelId: number;
|
|
184
|
-
localMaterialIndex?: number;
|
|
185
|
-
globalMaterialIndex?: number;
|
|
186
|
-
minPoint?: ViralPoint;
|
|
187
|
-
maxPoint?: ViralPoint;
|
|
188
|
-
/**
|
|
189
|
-
* In case this buffer element is instanced mesh
|
|
190
|
-
*/
|
|
191
|
-
instances: {
|
|
192
|
-
elementId: string;
|
|
193
|
-
transform: number[];
|
|
194
|
-
}[];
|
|
195
|
-
}
|
|
196
|
-
export interface LightConfiguration {
|
|
197
|
-
enabled?: boolean;
|
|
198
|
-
castShadow?: boolean;
|
|
199
|
-
intensity?: number;
|
|
200
|
-
color?: number;
|
|
201
|
-
indirectLightIntensity?: number;
|
|
202
|
-
shadowcatcher?: boolean;
|
|
203
|
-
}
|
|
204
|
-
export interface SunLightConfiguration extends LightConfiguration {
|
|
205
|
-
elevation?: number;
|
|
206
|
-
azimuth?: number;
|
|
207
|
-
radius?: number;
|
|
208
|
-
}
|
|
209
|
-
export declare const DefaultLightConfiguration: SunLightConfiguration;
|
|
210
|
-
export declare class TreeNode {
|
|
211
|
-
children: Map<string, TreeNode>;
|
|
212
|
-
keys: Set<number>;
|
|
213
|
-
}
|
|
214
|
-
export interface SerializedTreeNode {
|
|
215
|
-
children: {
|
|
216
|
-
[char: string]: SerializedTreeNode;
|
|
217
|
-
};
|
|
218
|
-
keys: number[];
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Optimized DataTree with flat key-value storage
|
|
222
|
-
* - Memory efficient: Uses flat Map instead of nested objects
|
|
223
|
-
* - Fast queries: O(1) element lookup, O(n) search
|
|
224
|
-
* - Lazy search index: Only builds trie when search is called
|
|
225
|
-
*/
|
|
226
|
-
export declare class DataTree {
|
|
227
|
-
private _elementMap;
|
|
228
|
-
private _searchIndex;
|
|
229
|
-
private _searchIndexBuilt;
|
|
230
|
-
get elementData(): {
|
|
231
|
-
[key: number]: {
|
|
232
|
-
[key: string]: {
|
|
233
|
-
[key: string]: string;
|
|
234
|
-
};
|
|
235
|
-
};
|
|
236
|
-
}[];
|
|
237
|
-
constructor(elementData?: {
|
|
238
|
-
[key: number]: {
|
|
239
|
-
[key: string]: {
|
|
240
|
-
[key: string]: string;
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
}[], treeNode?: SerializedTreeNode);
|
|
244
|
-
/**
|
|
245
|
-
* Add elements to the data tree (batch operation)
|
|
246
|
-
* @param data Object with elementId as key
|
|
247
|
-
*/
|
|
248
|
-
addElements(data: {
|
|
249
|
-
[key: number]: {
|
|
250
|
-
[key: string]: {
|
|
251
|
-
[key: string]: string;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
}): void;
|
|
255
|
-
/**
|
|
256
|
-
* Get element data by ID - O(1) lookup
|
|
257
|
-
*/
|
|
258
|
-
getObjectByKey(key: number): {
|
|
259
|
-
[key: string]: {
|
|
260
|
-
[key: string]: string;
|
|
261
|
-
};
|
|
262
|
-
} | null;
|
|
263
|
-
/**
|
|
264
|
-
* Get all element IDs
|
|
265
|
-
*/
|
|
266
|
-
getElementIds(): number[];
|
|
267
|
-
/**
|
|
268
|
-
* Get element count
|
|
269
|
-
*/
|
|
270
|
-
get size(): number;
|
|
271
|
-
/**
|
|
272
|
-
* Get all elements with their data
|
|
273
|
-
* @returns Array of { elementId, data } objects
|
|
274
|
-
*/
|
|
275
|
-
getAllElements(): {
|
|
276
|
-
elementId: number;
|
|
277
|
-
data: {
|
|
278
|
-
[key: string]: {
|
|
279
|
-
[key: string]: string;
|
|
280
|
-
};
|
|
281
|
-
};
|
|
282
|
-
}[];
|
|
283
|
-
/**
|
|
284
|
-
* Get all elements as a Map (more efficient for large datasets)
|
|
285
|
-
* @returns Map<elementId, elementData>
|
|
286
|
-
*/
|
|
287
|
-
getAllElementsMap(): Map<number, {
|
|
288
|
-
[key: string]: {
|
|
289
|
-
[key: string]: string;
|
|
290
|
-
};
|
|
291
|
-
}>;
|
|
292
|
-
/**
|
|
293
|
-
* Iterate over all elements without creating intermediate arrays
|
|
294
|
-
* More memory efficient for large datasets
|
|
295
|
-
* @param callback Function to call for each element
|
|
296
|
-
*/
|
|
297
|
-
forEachElement(callback: (elementId: number, data: {
|
|
298
|
-
[key: string]: {
|
|
299
|
-
[key: string]: string;
|
|
300
|
-
};
|
|
301
|
-
}) => void): void;
|
|
302
|
-
/**
|
|
303
|
-
* Search for elements containing the query string
|
|
304
|
-
* Builds search index lazily on first search
|
|
305
|
-
*/
|
|
306
|
-
search(query: string): number[];
|
|
307
|
-
/**
|
|
308
|
-
* Build inverted index for search
|
|
309
|
-
* Maps: "search term" -> Set<elementId>
|
|
310
|
-
*/
|
|
311
|
-
private _buildSearchIndex;
|
|
312
|
-
/**
|
|
313
|
-
* Rebuild search index from serialized worker result
|
|
314
|
-
*/
|
|
315
|
-
private _rebuildSearchIndexFromSerialized;
|
|
316
|
-
/**
|
|
317
|
-
* Clear search index to free memory
|
|
318
|
-
*/
|
|
319
|
-
clearSearchIndex(): void;
|
|
320
|
-
/**
|
|
321
|
-
* Dispose and clear all data
|
|
322
|
-
*/
|
|
323
|
-
dispose(): void;
|
|
324
|
-
}
|
|
325
|
-
export declare class CompareModelsResult {
|
|
326
|
-
deleted: number[];
|
|
327
|
-
added: number[];
|
|
328
|
-
modified: number[];
|
|
329
|
-
notChanged: number[];
|
|
330
|
-
}
|
|
331
|
-
export declare class CheckClashResult {
|
|
332
|
-
clashes: Dictionary<number, number[]>;
|
|
333
|
-
}
|
|
334
|
-
export declare class GroupByResult {
|
|
335
|
-
value: {
|
|
336
|
-
[key: string]: {
|
|
337
|
-
[key: string]: string;
|
|
338
|
-
};
|
|
339
|
-
};
|
|
340
|
-
elementIds: number[];
|
|
341
|
-
modelId: number;
|
|
342
|
-
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ViewerOptions } from "./types";
|
|
2
1
|
import { ViralCompressProcessor } from "./components/compress/viral-compress.processor";
|
|
3
2
|
import { ViralCamera } from "./components/camera/viral-camera";
|
|
4
3
|
import { ViralMouse } from "./components/event-handler/mouse/viral-mouse";
|
|
@@ -28,6 +27,7 @@ import { ViralPivotPoint } from "./gui/pivot-point/viral-pivot-point";
|
|
|
28
27
|
import { ViralBatchDebugPanel } from "./gui/batch-debug-panel/viral-batch-debug-panel";
|
|
29
28
|
import { ViralRenderDebugPanel } from "./gui/render-debug-panel/viral-render-debug-panel";
|
|
30
29
|
import { ViralInstancedDebugPanel } from "./gui/instanced-debug-panel/viral-instanced-debug-panel";
|
|
30
|
+
import { ViewerOptions } from ".";
|
|
31
31
|
/**
|
|
32
32
|
* Root of library
|
|
33
33
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viral-viewer-2",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"@types/node": "^20.2.5",
|
|
24
24
|
"@types/pako": "^2.0.0",
|
|
25
25
|
"@types/three": "^0.181.0",
|
|
26
|
-
"flatbuffers": "^25.2.10",
|
|
27
26
|
"lil-gui": "^0.20.0",
|
|
28
27
|
"typescript": "^5.0.4",
|
|
29
28
|
"vite": "^5.1.1",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ViralutionElement } from "../../types";
|
|
2
|
-
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
3
|
-
export declare class ViralFlatbufferLoader {
|
|
4
|
-
viralViewerApi: ViralViewerApi;
|
|
5
|
-
elements: ViralutionElement[];
|
|
6
|
-
private _loadElementPatchWorker;
|
|
7
|
-
constructor(viralViewerApi: ViralViewerApi);
|
|
8
|
-
load(trackingUrl: string, informationUrl: string, materialsUrl: string, elementsUrls: string[], callbackOnFinish?: () => void): Promise<void>;
|
|
9
|
-
private getInformations;
|
|
10
|
-
private getTracking;
|
|
11
|
-
private getMaterials;
|
|
12
|
-
private getElements;
|
|
13
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
2
|
-
import { Fragment, RenderMaterial } from "../../types";
|
|
3
|
-
import { WorkerThreadPool } from "./base/worker-pool";
|
|
4
|
-
export declare class LoadElementByMaterialV2Worker {
|
|
5
|
-
viralViewerApi: ViralViewerApi;
|
|
6
|
-
meshWorkerPool: WorkerThreadPool;
|
|
7
|
-
instancedMeshWorkerPool: WorkerThreadPool;
|
|
8
|
-
constructor(viralViewerApi: ViralViewerApi);
|
|
9
|
-
initial(materials: RenderMaterial[]): void;
|
|
10
|
-
loadElement(fragment: Fragment, callbackOnSuccess?: () => void): void;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
2
|
-
import { RenderMaterial, ViralutionElement } from "../../types";
|
|
3
|
-
import { WorkerThreadPool } from "./base/worker-pool";
|
|
4
|
-
export declare class LoadElementByMaterialWorker {
|
|
5
|
-
viralViewerApi: ViralViewerApi;
|
|
6
|
-
workerPool: WorkerThreadPool;
|
|
7
|
-
private _meshesByMaterial;
|
|
8
|
-
constructor(viralViewerApi: ViralViewerApi);
|
|
9
|
-
initial(materials: RenderMaterial[]): void;
|
|
10
|
-
loadElement(elements: ViralutionElement[], callbackOnSuccess?: () => void): void;
|
|
11
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
2
|
-
import { RenderMaterial, ViralutionElement } from "../../types";
|
|
3
|
-
import { WorkerThreadPool } from "./base/worker-pool";
|
|
4
|
-
export declare class LoadElementStandaloneWorker {
|
|
5
|
-
viralViewerApi: ViralViewerApi;
|
|
6
|
-
workerPool: WorkerThreadPool;
|
|
7
|
-
constructor(viralViewerApi: ViralViewerApi);
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @param materials
|
|
11
|
-
* @returns modelId
|
|
12
|
-
*/
|
|
13
|
-
initial(materials: RenderMaterial[]): number;
|
|
14
|
-
loadElement(modelId: number, elements: ViralutionElement[], callbackOnSuccess?: () => void): void;
|
|
15
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
2
|
-
import { Dictionary, RenderMaterial, ViralViewerRevitNoneStructuralGeometry, ViralViewerRevitStructuralGeometry } from "../../types";
|
|
3
|
-
import { Mesh, MeshPhongMaterial } from "three";
|
|
4
|
-
import { WorkerThreadPool } from "./base/worker-pool";
|
|
5
|
-
export declare class ViralViewerWorker2 {
|
|
6
|
-
viralViewerApi: ViralViewerApi;
|
|
7
|
-
workerPool: WorkerThreadPool;
|
|
8
|
-
materials: RenderMaterial[];
|
|
9
|
-
mainModel: Mesh | null;
|
|
10
|
-
threejsMaterials: Dictionary<number, MeshPhongMaterial>;
|
|
11
|
-
private readonly maxPolygonPerObject;
|
|
12
|
-
private readonly maxPolygonForEdge;
|
|
13
|
-
constructor(viralViewerApi: ViralViewerApi, scriptUrl?: string);
|
|
14
|
-
initial(materials: RenderMaterial[]): void;
|
|
15
|
-
loadStructuralGeometry(model: ViralViewerRevitStructuralGeometry, callbackOnSuccess?: () => void): void;
|
|
16
|
-
loadNoneStructuralGeometry(model: ViralViewerRevitNoneStructuralGeometry, callbackOnSuccess?: () => void): void;
|
|
17
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
2
|
-
import { RenderMaterial, ViralViewerRevitNoneStructuralGeometry, ViralViewerRevitStructuralGeometry } from "../../types";
|
|
3
|
-
import { Mesh } from "three";
|
|
4
|
-
import { WorkerThreadPool } from "./base/worker-pool";
|
|
5
|
-
export declare class ViralViewerWorker3 {
|
|
6
|
-
viralViewerApi: ViralViewerApi;
|
|
7
|
-
workerPool: WorkerThreadPool;
|
|
8
|
-
materials: RenderMaterial[];
|
|
9
|
-
mainModel: Mesh | null;
|
|
10
|
-
constructor(viralViewerApi: ViralViewerApi, scriptUrl?: string);
|
|
11
|
-
initial(materials: RenderMaterial[]): void;
|
|
12
|
-
loadStructuralGeometry(model: ViralViewerRevitStructuralGeometry, callbackOnSuccess?: () => void): void;
|
|
13
|
-
loadNoneStructuralGeometry(model: ViralViewerRevitNoneStructuralGeometry, callbackOnSuccess?: () => void): void;
|
|
14
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ViralViewerApi } from "../../viral-viewer-api";
|
|
2
|
-
import { ViralViewerRevitProject } from "../../types";
|
|
3
|
-
export declare class ViralViewerWorker {
|
|
4
|
-
viralViewerApi: ViralViewerApi;
|
|
5
|
-
worker: Worker;
|
|
6
|
-
constructor(viralViewerApi: ViralViewerApi, scriptUrl?: string);
|
|
7
|
-
loadModel(model: ViralViewerRevitProject, callbackOnSuccess?: () => void): void;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function workerCode(): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const workerCode: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const workerCode: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function workerCode(): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function workerCode(): void;
|