viral-viewer-2 6.8.0 → 6.8.1
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/components/camera/viral-camera.d.ts +3 -2
- package/dist/components/custom-objects/viral-merged-mesh.d.ts +11 -2
- package/dist/components/custom-objects/viral-merged-model.d.ts +11 -2
- package/dist/components/data-manager/viral-data-manager.d.ts +9 -1
- package/dist/components/visibility-manager/viral-visibility-manager.d.ts +12 -0
- package/dist/const/strings.d.ts +7 -0
- package/dist/gui/navigation-cube/components/cube.mouse.d.ts +5 -2
- package/dist/index.mjs +6809 -6623
- package/dist/types.d.ts +9 -0
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ export declare class ViralCamera {
|
|
|
14
14
|
onUsing: boolean;
|
|
15
15
|
constructor(viralViewerApi: ViralViewerApi);
|
|
16
16
|
setupCamera(): void;
|
|
17
|
+
private _initCameraControl;
|
|
17
18
|
enablePerspectiveCamera(): void;
|
|
18
19
|
enableOrthographicCamera(): void;
|
|
19
20
|
/**
|
|
@@ -30,10 +31,10 @@ export declare class ViralCamera {
|
|
|
30
31
|
restoreState(state: ViralViewerState): void;
|
|
31
32
|
modelId: string;
|
|
32
33
|
elementId: string;
|
|
33
|
-
zoomTo(
|
|
34
|
+
zoomTo(elements?: {
|
|
34
35
|
modelId: string;
|
|
35
36
|
elementId: string;
|
|
36
|
-
}): void;
|
|
37
|
+
}[]): void;
|
|
37
38
|
clientToWorld(items?: Object3D[]): import("three").Intersection<Object3D<import("three").Object3DEventMap>>[] | null;
|
|
38
39
|
worldToClient(point: Vector3): Vector3 | null;
|
|
39
40
|
worldToClient2(point: Vector3): Vector3 | null;
|
|
@@ -18,6 +18,11 @@ export declare class ViralMergedMesh extends Mesh {
|
|
|
18
18
|
private _isBatching;
|
|
19
19
|
get isBatching(): boolean;
|
|
20
20
|
batch(newBufferElements: BufferElement[]): void;
|
|
21
|
+
/**
|
|
22
|
+
* get bufferEleemnts from given ids
|
|
23
|
+
* @param elements
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
21
26
|
getElements(elements: {
|
|
22
27
|
modelId: string;
|
|
23
28
|
elementId: string;
|
|
@@ -51,6 +56,10 @@ export declare class ViralMergedMesh extends Mesh {
|
|
|
51
56
|
modelId: string;
|
|
52
57
|
elementId: string;
|
|
53
58
|
}[]): void;
|
|
59
|
+
get selectedElements(): {
|
|
60
|
+
modelId: string;
|
|
61
|
+
elementId: string;
|
|
62
|
+
}[];
|
|
54
63
|
/**
|
|
55
64
|
* Isolate whole model
|
|
56
65
|
* @param modelIds
|
|
@@ -119,10 +128,10 @@ export declare class ViralMergedMesh extends Mesh {
|
|
|
119
128
|
disableLights(): void;
|
|
120
129
|
calculateCenter(buffer: Float32Array): Vector3 | null;
|
|
121
130
|
getFarthestDistance(centerPoint: Vector3, placePoints: Vector3[]): number;
|
|
122
|
-
|
|
131
|
+
getElementBoxs(elements: {
|
|
123
132
|
modelId: string;
|
|
124
133
|
elementId: string;
|
|
125
|
-
}): Box3 | null;
|
|
134
|
+
}[]): Box3 | null;
|
|
126
135
|
/**
|
|
127
136
|
* ! Disposes of the ViralMergedMesh properly, when dispose we dont need to dispose material
|
|
128
137
|
*/
|
|
@@ -47,11 +47,20 @@ export declare class ViralMergedModel extends Mesh {
|
|
|
47
47
|
b: number;
|
|
48
48
|
};
|
|
49
49
|
}[]): void;
|
|
50
|
+
/**
|
|
51
|
+
* get bufferEleemnts from given ids
|
|
52
|
+
* @param elements
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
50
55
|
getElements(elements: {
|
|
51
56
|
modelId: string;
|
|
52
57
|
elementId: string;
|
|
53
58
|
}[]): BufferElement[];
|
|
54
59
|
getElementsByModel(modelIndex: number): BufferElement[];
|
|
60
|
+
getSelectedElements(): {
|
|
61
|
+
modelId: string;
|
|
62
|
+
elementId: string;
|
|
63
|
+
}[];
|
|
55
64
|
changeColor(elements: {
|
|
56
65
|
modelId: string;
|
|
57
66
|
elementId: string;
|
|
@@ -60,10 +69,10 @@ export declare class ViralMergedModel extends Mesh {
|
|
|
60
69
|
g: number;
|
|
61
70
|
b: number;
|
|
62
71
|
}): void;
|
|
63
|
-
|
|
72
|
+
getElementBoxs(elements: {
|
|
64
73
|
modelId: string;
|
|
65
74
|
elementId: string;
|
|
66
|
-
}): Box3;
|
|
75
|
+
}[]): Box3;
|
|
67
76
|
/**
|
|
68
77
|
* reset visibility/ geometries only not reset color
|
|
69
78
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckClashResult, CompareModelsResult, DataTree, ViralViewerApi } from "../..";
|
|
1
|
+
import { CheckClashResult, CompareModelsResult, DataTree, GroupByResult, ViralViewerApi } from "../..";
|
|
2
2
|
export declare class ViralDataManager {
|
|
3
3
|
viralViewerApi: ViralViewerApi;
|
|
4
4
|
dataTree: DataTree[];
|
|
@@ -54,4 +54,12 @@ export declare class ViralDataManager {
|
|
|
54
54
|
* @param secondModelIndex
|
|
55
55
|
*/
|
|
56
56
|
checkClashModels(firstModelIndex?: number, secondModelIndex?: number): Promise<CheckClashResult>;
|
|
57
|
+
/**
|
|
58
|
+
* group element by property keyword, ex: if keyword is 'Category' it will group element follow category value.
|
|
59
|
+
* @param keyword
|
|
60
|
+
*/
|
|
61
|
+
groupByKeyword: string;
|
|
62
|
+
groupBy(keyword?: string): GroupByResult[];
|
|
63
|
+
unGroupBy(): void;
|
|
64
|
+
private _shallowCompare;
|
|
57
65
|
}
|
|
@@ -33,6 +33,18 @@ export declare class ViralVisibilityManager {
|
|
|
33
33
|
modelId: string;
|
|
34
34
|
elementId: string;
|
|
35
35
|
}[]): void;
|
|
36
|
+
zoomTo(): void;
|
|
37
|
+
changeColor(elements: {
|
|
38
|
+
modelId: string;
|
|
39
|
+
elementId: string;
|
|
40
|
+
}[], color: {
|
|
41
|
+
r: number;
|
|
42
|
+
g: number;
|
|
43
|
+
b: number;
|
|
44
|
+
}): void;
|
|
45
|
+
/**
|
|
46
|
+
* except elements from reverse to original color, using for compare model, group elements,...
|
|
47
|
+
*/
|
|
36
48
|
exceptElements: {
|
|
37
49
|
elements: {
|
|
38
50
|
modelId: string;
|
|
@@ -2,8 +2,11 @@ import { ViralNavigationCube } from "../viral-navigation-cube";
|
|
|
2
2
|
export declare class CubeMouse {
|
|
3
3
|
viralNavigationCube: ViralNavigationCube;
|
|
4
4
|
constructor(viralNavigationCube: ViralNavigationCube);
|
|
5
|
-
private
|
|
6
|
-
private
|
|
5
|
+
private _setupMouseClick;
|
|
6
|
+
private _mouseDownTime;
|
|
7
|
+
private clickThreshold;
|
|
8
|
+
private _handleClick;
|
|
9
|
+
private _handleMouseUp;
|
|
7
10
|
private setupMouseMove;
|
|
8
11
|
private handleMove;
|
|
9
12
|
}
|