viral-viewer-2 6.7.4 → 6.7.5
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 +7 -4
- package/README.md +0 -0
- package/dist/components/camera/viral-camera.d.ts +8 -3
- package/dist/components/compress/viral-compress.processor.d.ts +2 -1
- package/dist/components/custom-objects/viral-instanced-mesh.d.ts +6 -1
- package/dist/components/custom-objects/viral-main.model.d.ts +12 -0
- package/dist/components/custom-objects/viral-merged-mesh.d.ts +78 -8
- package/dist/components/custom-objects/viral-merged-model.d.ts +29 -2
- package/dist/components/custom-objects/viral-mesh.abstract.d.ts +3 -0
- package/dist/components/custom-objects/viral-mesh.d.ts +6 -1
- package/dist/components/custom-objects/{viral-model.d.ts → viral-seperate-model.d.ts} +5 -3
- package/dist/components/data-manager/viral-data-manager.d.ts +20 -4
- package/dist/components/event-handler/viral-centralized-event-handler.d.ts +4 -0
- package/dist/components/event-handler/viral-lifecycle-event-handler.d.ts +4 -3
- package/dist/components/handler/geometry.handler.d.ts +1 -0
- package/dist/components/loader/viral-revit.loader.d.ts +0 -1
- package/dist/components/material/viral-material-manager.d.ts +4 -6
- package/dist/components/post-processing/post-processing-renderer.d.ts +5 -0
- package/dist/components/renderer/viral-renderer.d.ts +2 -0
- package/dist/components/scene/viral-scene.d.ts +7 -5
- package/dist/components/section-box/viral-section-box.d.ts +32 -0
- package/dist/components/visibility-manager/viral-visibility-manager.d.ts +39 -0
- package/dist/components/worker/build-tree-node.worker.d.ts +12 -0
- package/dist/components/worker/load-element-standalone.worker.d.ts +7 -2
- package/dist/components/worker-script/build-tree-node.script.d.ts +1 -0
- package/dist/gui/draggable-modal/viral-draggable-modal.d.ts +1 -1
- package/dist/gui/navigation-cube/viral-navigation-cube.d.ts +0 -2
- package/dist/index.mjs +13148 -11913
- package/dist/types.d.ts +34 -2
- package/dist/utils/log.d.ts +1 -0
- package/dist/utils/threejs.d.ts +8 -1
- package/dist/viral-viewer-api.d.ts +3 -2
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -96,7 +96,9 @@ export declare enum ViralutionEvent {
|
|
|
96
96
|
LOADED_RENDERER = 2,
|
|
97
97
|
LOADED_CAMERA = 3,
|
|
98
98
|
LOADED_CUBE = 4,
|
|
99
|
-
LOADED_TOOLS = 5
|
|
99
|
+
LOADED_TOOLS = 5,
|
|
100
|
+
LOADED_SEPERATE_MODEL = 6,
|
|
101
|
+
GENERATED_MERGE_MODEL = 7
|
|
100
102
|
}
|
|
101
103
|
export declare class Dictionary<TKey, TValue> {
|
|
102
104
|
private items;
|
|
@@ -171,8 +173,9 @@ export declare class DebouncedEventHandler<T> {
|
|
|
171
173
|
handleEvent: (event: T) => void;
|
|
172
174
|
}
|
|
173
175
|
export declare class BufferElement {
|
|
174
|
-
buffer: Float32Array
|
|
176
|
+
buffer: Float32Array | null;
|
|
175
177
|
elementId: string;
|
|
178
|
+
modelId: number;
|
|
176
179
|
}
|
|
177
180
|
export interface LightConfiguration {
|
|
178
181
|
enabled?: boolean;
|
|
@@ -188,3 +191,32 @@ export interface SunLightConfiguration extends LightConfiguration {
|
|
|
188
191
|
radius?: number;
|
|
189
192
|
}
|
|
190
193
|
export declare const DefaultLightConfiguration: SunLightConfiguration;
|
|
194
|
+
export declare class TreeNode {
|
|
195
|
+
children: Map<string, TreeNode>;
|
|
196
|
+
keys: Set<number>;
|
|
197
|
+
}
|
|
198
|
+
export declare class DataTree {
|
|
199
|
+
elementData: {
|
|
200
|
+
[key: number]: {
|
|
201
|
+
[key: string]: {
|
|
202
|
+
[key: string]: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
}[];
|
|
206
|
+
private root;
|
|
207
|
+
constructor(elementData: {
|
|
208
|
+
[key: number]: {
|
|
209
|
+
[key: string]: {
|
|
210
|
+
[key: string]: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
}[], treeNode: TreeNode);
|
|
214
|
+
private buildSuffixTrie;
|
|
215
|
+
private insert;
|
|
216
|
+
search(query: string): number[];
|
|
217
|
+
getObjectByKey(key: number): {
|
|
218
|
+
[key: string]: {
|
|
219
|
+
[key: string]: string;
|
|
220
|
+
};
|
|
221
|
+
} | null;
|
|
222
|
+
}
|
package/dist/utils/log.d.ts
CHANGED
package/dist/utils/threejs.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { Mesh, Vector3 } from "three";
|
|
1
|
+
import { Box3, Mesh, Vector3 } from "three";
|
|
2
2
|
export declare class THREEUtil {
|
|
3
3
|
static middlePoint(point1: Vector3, point2: Vector3): Vector3;
|
|
4
|
+
static getCenterPoint(points: Vector3[]): Vector3;
|
|
4
5
|
static clearChildren(mesh: Mesh): void;
|
|
5
6
|
static hexToThreejsColor(hexColor: string): string;
|
|
7
|
+
static hexToRGB(hex: string): {
|
|
8
|
+
r: number;
|
|
9
|
+
g: number;
|
|
10
|
+
b: number;
|
|
11
|
+
};
|
|
6
12
|
static rgbToThreejsColor(r: number, g: number, b: number): string;
|
|
7
13
|
private static componentToHex;
|
|
14
|
+
static mergeBoundingBoxes(boxes: Box3[]): Box3;
|
|
8
15
|
}
|
|
@@ -23,11 +23,11 @@ import { ViralTools } from "./gui/tools/viral-tools";
|
|
|
23
23
|
import { ViralNavigationCube } from "./gui/navigation-cube/viral-navigation-cube";
|
|
24
24
|
import { ViralAvatarManager } from "./components/avatar-manager/viral-avatar-manager";
|
|
25
25
|
import { ViralGeometryHandler } from "./components/handler/geometry.handler";
|
|
26
|
+
import { ViralSectionBox } from "./components/section-box/viral-section-box";
|
|
26
27
|
/**
|
|
27
28
|
* Root of library
|
|
28
29
|
*/
|
|
29
|
-
export declare class ViralViewerApi {
|
|
30
|
-
lifeCycleEvent: EventDispatcher;
|
|
30
|
+
export declare class ViralViewerApi extends EventDispatcher {
|
|
31
31
|
options: ViewerOptions;
|
|
32
32
|
viralLifecycleEventHandler: ViralLifecycleEventHandler;
|
|
33
33
|
targetElement: HTMLElement;
|
|
@@ -53,5 +53,6 @@ export declare class ViralViewerApi {
|
|
|
53
53
|
localStorageService: LocalStorageService;
|
|
54
54
|
viralStats: ViralStats | null;
|
|
55
55
|
viralGeometryHandler: ViralGeometryHandler | null;
|
|
56
|
+
viralSectionBox: ViralSectionBox | null;
|
|
56
57
|
constructor(options?: ViewerOptions);
|
|
57
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "viral-viewer-2",
|
|
3
|
-
"version": "6.7.
|
|
3
|
+
"version": "6.7.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/node": "^20.2.5",
|
|
24
24
|
"@types/pako": "^2.0.0",
|
|
25
|
-
"@types/three": "^0.
|
|
25
|
+
"@types/three": "^0.171.0",
|
|
26
26
|
"lil-gui": "^0.20.0",
|
|
27
27
|
"typescript": "^5.0.4",
|
|
28
28
|
"vite": "^5.1.1",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vite-plugin-static-copy": "^1.0.1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"camera-controls": "^2.
|
|
33
|
+
"camera-controls": "^2.9.0",
|
|
34
34
|
"n8ao": "^1.9.3",
|
|
35
35
|
"pako": "^2.1.0",
|
|
36
36
|
"potree-core-viral": "^0.3.0",
|