@procore/bim-webviewer-sdk 17.3.0-rc.9 → 17.4.0-hotfix.0
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/CHANGELOG.md +38 -3
- package/dist/Procore.Bim.Webviewer.d.ts +49 -5
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/api/analytic_events/analyticKeys.d.ts +1 -0
- package/dist/types/src/api/bim_viewpoints.d.ts +5 -0
- package/dist/types/src/api/types/FileExtraction.d.ts +1 -0
- package/dist/types/src/components/ShortestDistanceComponent.d.ts +1 -0
- package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +0 -1
- package/dist/types/src/controllers/RenderController.d.ts +1 -0
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +1 -3
- package/dist/types/src/{navigation → hotkeys}/Hotkeys.d.ts +8 -5
- package/dist/types/src/hotkeys/__tests__/Hotkeys.test.d.ts +1 -0
- package/dist/types/src/measuring/DistanceLabel.d.ts +1 -0
- package/dist/types/src/measuring/FeatureTooltip/FeatureTooltip.d.ts +4 -0
- package/dist/types/src/measuring/MeasureToolUtils.d.ts +11 -8
- package/dist/types/src/measuring/MeasurementInterface.d.ts +1 -0
- package/dist/types/src/measuring/MeasurementManager.d.ts +5 -0
- package/dist/types/src/measuring/PointToPointController.d.ts +7 -10
- package/dist/types/src/measuring/PointToPointManager.d.ts +5 -0
- package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +30 -50
- package/dist/types/src/measuring/__tests__/fixtures.d.ts +17 -0
- package/dist/types/src/navigation/DefaultControl.d.ts +1 -0
- package/dist/types/src/navigation/__tests__/DefaultControl.test.d.ts +1 -0
- package/dist/types/src/picking/PickingController.d.ts +9 -1
- package/dist/types/src/procoregl/MeshTopology/__tests__/TopologyFixtures.d.ts +4 -1
- package/dist/types/src/pwfreader/v1/streaming/StreamedMeshServices.d.ts +2 -0
- package/dist/types/src/pwfreader/v2/PWFV2.d.ts +7 -0
- package/dist/types/src/pwfreader/v2/streaming/MeshData.d.ts +1 -0
- package/dist/types/src/pwfreader/v2/streaming/PartitionProxy.d.ts +7 -2
- package/dist/types/src/pwfreader/v2/streaming/StreamedMeshServices.d.ts +24 -3
- package/dist/types/src/types/setMeasurementSchema.d.ts +21 -0
- package/dist/types/src/utils/ApiMetaData/ApiMetaData.d.ts +4 -0
- package/dist/types/src/utils/ApiMetaData/__tests__/mocks.d.ts +3 -2
- package/dist/types/src/utils/Enums.d.ts +1 -0
- package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/MainThreadSyncAccessHandleFallback.d.ts +2 -1
- package/dist/types/src/{pwfreader/v1/streaming → utils}/OPFSFile/OPFSFile.d.ts +3 -2
- package/dist/types/src/utils/OPFSFile/__tests__/OPFSFile.test.d.ts +1 -0
- package/dist/types/src/utils/OPFSFile/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/types/src/pwfreader/v1/streaming/OPFSFile/index.d.ts +0 -1
- /package/dist/types/src/{navigation/Orbit → utils}/log.d.ts +0 -0
|
@@ -147,6 +147,7 @@ export declare const MEASUREMENT_ORIGIN: {
|
|
|
147
147
|
readonly FLYOUT_MENU: "flyout_menu";
|
|
148
148
|
readonly ESC: "esc";
|
|
149
149
|
readonly HOTKEY: "hotkey";
|
|
150
|
+
readonly NAVIGATION_CHANGE: "navigation_change";
|
|
150
151
|
};
|
|
151
152
|
export type MeasurementOrigin = (typeof MEASUREMENT_ORIGIN)[keyof typeof MEASUREMENT_ORIGIN];
|
|
152
153
|
export declare const measurements: {
|
|
@@ -13,6 +13,7 @@ export class ShortestDistanceComponent {
|
|
|
13
13
|
pivot: import("three").Vector3;
|
|
14
14
|
onHideUpdated(): Promise<void>;
|
|
15
15
|
toggle(params: any): void;
|
|
16
|
+
setActive(active: any): void;
|
|
16
17
|
clearDisplayElements(): void;
|
|
17
18
|
removeCursors(): void;
|
|
18
19
|
setGlobalOffset(params: any): void;
|
|
@@ -68,7 +68,6 @@ export class ToolBarComponent {
|
|
|
68
68
|
onSectionBoxDisplayToggled(data: any): void;
|
|
69
69
|
onRenderModeChanged(data: any): void;
|
|
70
70
|
onSelectTool(data: any): void;
|
|
71
|
-
selectMeasurementTool(data: any): void;
|
|
72
71
|
selectSectionBoxTool(): Promise<void>;
|
|
73
72
|
ResetNavSelection(): void;
|
|
74
73
|
createToolTipContent(elem: any, name: any): string | HTMLDivElement;
|
|
@@ -171,6 +171,7 @@ export class RenderController {
|
|
|
171
171
|
intersection: import("../sdk").Vector3 | null;
|
|
172
172
|
meshnodeIndex: number;
|
|
173
173
|
faceNormal: import("../sdk").Vector3 | null;
|
|
174
|
+
nearestMeshnodeIndex?: number;
|
|
174
175
|
};
|
|
175
176
|
isMeshnodeSelected(virtualMeshnodeIndex: any): boolean;
|
|
176
177
|
clickedOnSelectedObject(virtualMeshnodeIndex: any, rightClick: any): void;
|
|
@@ -7,7 +7,6 @@ export class RenderControllerProxy {
|
|
|
7
7
|
worker: any;
|
|
8
8
|
enableWebWorker: any;
|
|
9
9
|
navigationManager: NavigationManager;
|
|
10
|
-
hotkeys: Hotkeys;
|
|
11
10
|
renderController: RenderController | RenderControllerWorker | null;
|
|
12
11
|
pwfCache: PWFCache | null;
|
|
13
12
|
renderControllerParams: {
|
|
@@ -274,11 +273,11 @@ export class RenderControllerProxy {
|
|
|
274
273
|
clearFilteredObjectTree(...params: any[]): void | Promise<any>;
|
|
275
274
|
getSectionBoxDisplayBbox(...params: any[]): Promise<any> | import("../sdk").BoundingBox;
|
|
276
275
|
getSectionsAsBox(...params: any[]): Promise<any> | import("../sectioning/SectionController").OrientedBox | null;
|
|
277
|
-
setHotkeysEnabled(enabled: any): void;
|
|
278
276
|
getRayIntersectPoint(...params: any[]): Promise<any> | {
|
|
279
277
|
intersection: import("../sdk").Vector3 | null;
|
|
280
278
|
meshnodeIndex: number;
|
|
281
279
|
faceNormal: import("../sdk").Vector3 | null;
|
|
280
|
+
nearestMeshnodeIndex?: number;
|
|
282
281
|
};
|
|
283
282
|
}
|
|
284
283
|
export namespace RenderControllerProxy {
|
|
@@ -292,7 +291,6 @@ export namespace RenderControllerProxy {
|
|
|
292
291
|
}
|
|
293
292
|
import { PubSubController } from './PubSubController';
|
|
294
293
|
import { NavigationManager } from '../navigation/NavigationManager';
|
|
295
|
-
import { Hotkeys } from '../navigation/Hotkeys';
|
|
296
294
|
import { RenderController } from './RenderController';
|
|
297
295
|
import { RenderControllerWorker } from './RenderControllerWorker';
|
|
298
296
|
import { PWFCache } from '../pwfreader/PWFCache';
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import type { NavigationManager } from '
|
|
1
|
+
import type { NavigationManager } from '../navigation/NavigationManager';
|
|
2
2
|
import type { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
3
|
-
import { KeyboardControl } from '
|
|
3
|
+
import { KeyboardControl } from '../navigation/types';
|
|
4
|
+
import type { MeasurementManager } from '../measuring';
|
|
4
5
|
export declare class Hotkeys implements KeyboardControl {
|
|
5
|
-
private renderControllerProxy;
|
|
6
|
-
private navigationManager;
|
|
6
|
+
private readonly renderControllerProxy;
|
|
7
|
+
private readonly navigationManager;
|
|
8
|
+
private readonly measurementManager;
|
|
7
9
|
private _enabled;
|
|
8
10
|
constructor(params: {
|
|
9
11
|
renderControllerProxy: RenderControllerProxy;
|
|
10
12
|
navigationManager: NavigationManager;
|
|
13
|
+
measurementManager: MeasurementManager;
|
|
11
14
|
});
|
|
12
15
|
get enabled(): boolean;
|
|
13
16
|
set enabled(value: boolean);
|
|
14
|
-
onKeyDown: (event: KeyboardEvent) => void
|
|
17
|
+
onKeyDown: (event: KeyboardEvent) => Promise<void>;
|
|
15
18
|
onKeyUp: () => void;
|
|
16
19
|
private publishSelectedToolEvent;
|
|
17
20
|
dispose(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,12 +2,16 @@ import './styles.css';
|
|
|
2
2
|
export declare class FeatureTooltip {
|
|
3
3
|
element: HTMLElement;
|
|
4
4
|
private readonly bimMain;
|
|
5
|
+
private readonly canvas;
|
|
5
6
|
private timerId;
|
|
7
|
+
private delay;
|
|
6
8
|
private readonly locale;
|
|
7
9
|
constructor(params: {
|
|
8
10
|
locale: string;
|
|
11
|
+
delay?: number;
|
|
9
12
|
});
|
|
10
13
|
private onMouseMove;
|
|
14
|
+
private onWheel;
|
|
11
15
|
private onMeasurementObjectLeave;
|
|
12
16
|
private onMeasurementObjectMove;
|
|
13
17
|
private showTooltip;
|
|
@@ -5,8 +5,14 @@ export declare const SNAP_TYPE: {
|
|
|
5
5
|
readonly midpoint: "midpoint";
|
|
6
6
|
readonly edge: "edge";
|
|
7
7
|
readonly endpoint: "endpoint";
|
|
8
|
+
readonly intersection: "intersection";
|
|
8
9
|
};
|
|
9
10
|
export type SnapType = (typeof SNAP_TYPE)[keyof typeof SNAP_TYPE];
|
|
11
|
+
export type ExtendedLine3 = THREE.Line3 & {
|
|
12
|
+
userData?: {
|
|
13
|
+
connectingEdge?: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
10
16
|
export declare function getIntersectionSnapAndOutline(params: {
|
|
11
17
|
intersection: THREE.Vector3;
|
|
12
18
|
matrixWorld: THREE.Matrix4;
|
|
@@ -19,17 +25,14 @@ export declare function getIntersectionSnapAndOutline(params: {
|
|
|
19
25
|
hideDifferentFaceNormal: boolean;
|
|
20
26
|
hideNonCoplanar: boolean;
|
|
21
27
|
};
|
|
28
|
+
clippingPlanes: THREE.Plane[];
|
|
29
|
+
globalOffset: Vector3;
|
|
30
|
+
nearestObjectIntersectionLines: THREE.Line3[];
|
|
22
31
|
}): {
|
|
23
32
|
snapType: SnapType;
|
|
24
33
|
snapPosition: THREE.Vector3;
|
|
25
|
-
snapEdge:
|
|
26
|
-
|
|
27
|
-
end: THREE.Vector3;
|
|
28
|
-
} | null;
|
|
29
|
-
boundaryEdges: {
|
|
30
|
-
start: THREE.Vector3;
|
|
31
|
-
end: THREE.Vector3;
|
|
32
|
-
}[];
|
|
34
|
+
snapEdge: ExtendedLine3 | null;
|
|
35
|
+
boundaryEdges: ExtendedLine3[];
|
|
33
36
|
cursorRotation: Vector3;
|
|
34
37
|
snapScreenPosition: Vector3;
|
|
35
38
|
};
|
|
@@ -12,13 +12,18 @@ export declare class MeasurementManager {
|
|
|
12
12
|
private readonly apiController;
|
|
13
13
|
private currentMode;
|
|
14
14
|
private readonly measureModeToImplementationMap;
|
|
15
|
+
private readonly toolEnabled;
|
|
15
16
|
constructor(params: {
|
|
16
17
|
apiController: ApiController;
|
|
17
18
|
measurements: {
|
|
18
19
|
measurementMode: MeasureMode;
|
|
19
20
|
implementation: MeasurementInterface;
|
|
20
21
|
}[];
|
|
22
|
+
toolEnabled: boolean;
|
|
21
23
|
});
|
|
24
|
+
private onSectionBoxDisplayToggled;
|
|
25
|
+
private onSectionBoxDisplayHoverUpdated;
|
|
26
|
+
private onSelectTool;
|
|
22
27
|
setGlobalOffset(params: Vector3): void;
|
|
23
28
|
setMeasurementEnabled(params: {
|
|
24
29
|
measurementMode?: MeasureMode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PickingController } from '../picking/PickingController';
|
|
2
2
|
import type { Models } from '../procoregl/Models';
|
|
3
|
-
import type { SnapType } from './MeasureToolUtils';
|
|
3
|
+
import type { SnapType, ExtendedLine3 } from './MeasureToolUtils';
|
|
4
4
|
import type { ViewerRenderer } from '../procoregl/ViewerRenderer';
|
|
5
5
|
import { MeshTopology } from '../procoregl/MeshTopology';
|
|
6
6
|
import type { RenderController } from '../controllers/RenderController';
|
|
@@ -10,14 +10,8 @@ export type WorldIntersectionSnapResult = {
|
|
|
10
10
|
intersection: Vector3;
|
|
11
11
|
snapType: SnapType;
|
|
12
12
|
snapPosition: Vector3;
|
|
13
|
-
snapEdge:
|
|
14
|
-
|
|
15
|
-
end: Vector3;
|
|
16
|
-
} | null;
|
|
17
|
-
boundaryEdges: {
|
|
18
|
-
start: Vector3;
|
|
19
|
-
end: Vector3;
|
|
20
|
-
}[];
|
|
13
|
+
snapEdge: ExtendedLine3 | null;
|
|
14
|
+
boundaryEdges: ExtendedLine3[];
|
|
21
15
|
meshnodeIndex: number;
|
|
22
16
|
cursorRotation: Vector3;
|
|
23
17
|
snapScreenPosition: Vector3;
|
|
@@ -28,6 +22,7 @@ export declare class PointToPointController {
|
|
|
28
22
|
private readonly models;
|
|
29
23
|
private readonly camera;
|
|
30
24
|
private currentHoverMeshnodeIndex;
|
|
25
|
+
private nearestMeshnodeIndex;
|
|
31
26
|
nonManifoldMeshnodeIndices: Set<number>;
|
|
32
27
|
private readonly meshTopologyCache;
|
|
33
28
|
private _enabled;
|
|
@@ -36,7 +31,7 @@ export declare class PointToPointController {
|
|
|
36
31
|
private lastWorldIntersectionSnapResult;
|
|
37
32
|
private readonly debugGui;
|
|
38
33
|
private readonly viewerRenderer;
|
|
39
|
-
private renderController;
|
|
34
|
+
private readonly renderController;
|
|
40
35
|
constructor(params: {
|
|
41
36
|
pickingController: PickingController;
|
|
42
37
|
renderController: RenderController;
|
|
@@ -52,8 +47,10 @@ export declare class PointToPointController {
|
|
|
52
47
|
handleWheel(event: WheelEvent): Promise<void>;
|
|
53
48
|
private computeIntersectionSnapResult;
|
|
54
49
|
private getWorldIntersectionSnapResult;
|
|
50
|
+
private getNearestMeshnodeIntersectionLines;
|
|
55
51
|
private publishIntersectionSnapResult;
|
|
56
52
|
getMeshTopology(meshnode: Meshnode): MeshTopology | null;
|
|
53
|
+
private getFaceCount;
|
|
57
54
|
private meshnodeTooComplex;
|
|
58
55
|
private determineHoverState;
|
|
59
56
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SvgRenderer } from '../components/Markup/SvgRenderer';
|
|
2
2
|
import type { Vector3 } from '../types/Math';
|
|
3
3
|
import type { MeasurementRenderer } from './MeasurementRenderer';
|
|
4
|
+
import { DistanceLabel } from './DistanceLabel';
|
|
4
5
|
import type { SettingsController } from '../controllers/SettingsController';
|
|
5
6
|
import type { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
6
7
|
import { type MeasurementInterface, type MeasurementState } from './MeasurementInterface';
|
|
@@ -26,9 +27,11 @@ export declare class PointToPointManager implements MeasurementInterface {
|
|
|
26
27
|
private featureTooltip;
|
|
27
28
|
private surfaceCursor;
|
|
28
29
|
private edgeCursor;
|
|
30
|
+
private intersectionCursor;
|
|
29
31
|
private midPointCursor;
|
|
30
32
|
private endPointCursor;
|
|
31
33
|
private dom;
|
|
34
|
+
private active;
|
|
32
35
|
constructor(params: {
|
|
33
36
|
apiController: ApiController;
|
|
34
37
|
renderControllerProxy: RenderControllerProxy;
|
|
@@ -37,8 +40,10 @@ export declare class PointToPointManager implements MeasurementInterface {
|
|
|
37
40
|
measurementRenderer: MeasurementRenderer;
|
|
38
41
|
locale: string;
|
|
39
42
|
});
|
|
43
|
+
setActive(active: boolean): void;
|
|
40
44
|
setGlobalOffset(params: Vector3): void;
|
|
41
45
|
getGlobalOffset(): THREE.Vector3;
|
|
46
|
+
getTemporaryDistanceLabel(): DistanceLabel | null;
|
|
42
47
|
private onMouseMove;
|
|
43
48
|
private onWheel;
|
|
44
49
|
getMeasurementProgress(): MeasurementState;
|
|
@@ -9,56 +9,52 @@ export declare const measurementObjectLeaveMoveIntoEmptySpace: {
|
|
|
9
9
|
relatedMeshnodeIndex: null;
|
|
10
10
|
};
|
|
11
11
|
export declare const measurementObjectClickPayloadFirstAnchor: {
|
|
12
|
-
snapPosition:
|
|
13
|
-
x: number;
|
|
14
|
-
y: number;
|
|
15
|
-
z: number;
|
|
16
|
-
};
|
|
12
|
+
snapPosition: import("three").Vector3;
|
|
17
13
|
};
|
|
18
14
|
export declare const measurementObjectClickPayloadSecondAnchor: {
|
|
19
|
-
snapPosition:
|
|
20
|
-
x: number;
|
|
21
|
-
y: number;
|
|
22
|
-
z: number;
|
|
23
|
-
};
|
|
15
|
+
snapPosition: import("three").Vector3;
|
|
24
16
|
};
|
|
25
17
|
export declare const measurementObjectEnterObject1Payload: WorldIntersectionSnapResult;
|
|
26
18
|
export declare const measurementObjectEnterTooComplexPayload: WorldIntersectionSnapResult;
|
|
27
19
|
export declare const measurementObjectEnterObject2Payload: WorldIntersectionSnapResult;
|
|
28
20
|
export declare const measurementObjectMoveMidpointPayload: WorldIntersectionSnapResult;
|
|
21
|
+
export declare const measurementObjectEnterIntersectionPayload: WorldIntersectionSnapResult;
|
|
29
22
|
export declare const measurementObjectMovePayload: WorldIntersectionSnapResult;
|
|
23
|
+
export declare const measurementClippedObjectMovePayload: WorldIntersectionSnapResult;
|
|
30
24
|
export declare const measurementObjectMoveComplexMeshPayload: WorldIntersectionSnapResult;
|
|
31
25
|
export declare const svgDataObjectOutline: {
|
|
32
26
|
lines: {
|
|
33
27
|
stroke: string;
|
|
34
|
-
anchorStart:
|
|
35
|
-
|
|
36
|
-
y: number;
|
|
37
|
-
z: number;
|
|
38
|
-
};
|
|
39
|
-
anchorEnd: {
|
|
40
|
-
x: number;
|
|
41
|
-
y: number;
|
|
42
|
-
z: number;
|
|
43
|
-
};
|
|
28
|
+
anchorStart: import("three").Vector3;
|
|
29
|
+
anchorEnd: import("three").Vector3;
|
|
44
30
|
strokeWidth: number;
|
|
45
31
|
opacity: number;
|
|
46
32
|
}[];
|
|
47
33
|
ellipses: never[];
|
|
48
34
|
};
|
|
35
|
+
export declare const svgDataObjectClippedOutline: {
|
|
36
|
+
lines: ({
|
|
37
|
+
stroke: string;
|
|
38
|
+
anchorStart: import("three").Vector3;
|
|
39
|
+
anchorEnd: import("three").Vector3;
|
|
40
|
+
strokeWidth: number;
|
|
41
|
+
opacity: number;
|
|
42
|
+
strokeDasharray: string;
|
|
43
|
+
} | {
|
|
44
|
+
stroke: string;
|
|
45
|
+
anchorStart: import("three").Vector3;
|
|
46
|
+
anchorEnd: import("three").Vector3;
|
|
47
|
+
strokeWidth: number;
|
|
48
|
+
opacity: number;
|
|
49
|
+
strokeDasharray?: undefined;
|
|
50
|
+
})[];
|
|
51
|
+
ellipses: never[];
|
|
52
|
+
};
|
|
49
53
|
export declare const svgDataFirstAnchorOutlineTempMeasurement: {
|
|
50
54
|
lines: ({
|
|
51
55
|
stroke: string;
|
|
52
|
-
anchorStart:
|
|
53
|
-
|
|
54
|
-
y: number;
|
|
55
|
-
z: number;
|
|
56
|
-
};
|
|
57
|
-
anchorEnd: {
|
|
58
|
-
x: number;
|
|
59
|
-
y: number;
|
|
60
|
-
z: number;
|
|
61
|
-
};
|
|
56
|
+
anchorStart: import("three").Vector3;
|
|
57
|
+
anchorEnd: import("three").Vector3;
|
|
62
58
|
strokeWidth: number;
|
|
63
59
|
opacity: number;
|
|
64
60
|
strokeDasharray?: undefined;
|
|
@@ -97,31 +93,15 @@ export declare const svgDataFirstAnchorOutlineTempMeasurement: {
|
|
|
97
93
|
export declare const svgDataFinalMeasurement: {
|
|
98
94
|
lines: ({
|
|
99
95
|
stroke: string;
|
|
100
|
-
anchorStart:
|
|
101
|
-
|
|
102
|
-
y: number;
|
|
103
|
-
z: number;
|
|
104
|
-
};
|
|
105
|
-
anchorEnd: {
|
|
106
|
-
x: number;
|
|
107
|
-
y: number;
|
|
108
|
-
z: number;
|
|
109
|
-
};
|
|
96
|
+
anchorStart: import("three").Vector3;
|
|
97
|
+
anchorEnd: import("three").Vector3;
|
|
110
98
|
strokeWidth: number;
|
|
111
99
|
opacity: number;
|
|
112
100
|
strokeDasharray?: undefined;
|
|
113
101
|
} | {
|
|
114
102
|
stroke: string;
|
|
115
|
-
anchorStart:
|
|
116
|
-
|
|
117
|
-
y: number;
|
|
118
|
-
z: number;
|
|
119
|
-
};
|
|
120
|
-
anchorEnd: {
|
|
121
|
-
x: number;
|
|
122
|
-
y: number;
|
|
123
|
-
z: number;
|
|
124
|
-
};
|
|
103
|
+
anchorStart: import("three").Vector3;
|
|
104
|
+
anchorEnd: import("three").Vector3;
|
|
125
105
|
strokeWidth: number;
|
|
126
106
|
opacity: number;
|
|
127
107
|
strokeDasharray: string;
|
|
@@ -32,3 +32,20 @@ export declare const CAMERA_BEHIND_OF_DISTANCE_LABELS: {
|
|
|
32
32
|
z: number;
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
+
export declare const CAMERA_FAR_FROM_DISTANCE_LABELS: {
|
|
36
|
+
fov: number;
|
|
37
|
+
aspect: number;
|
|
38
|
+
near: number;
|
|
39
|
+
far: number;
|
|
40
|
+
position: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
z: number;
|
|
44
|
+
};
|
|
45
|
+
quaternion: {
|
|
46
|
+
w: number;
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
z: number;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -18,6 +18,7 @@ export declare class DefaultControl implements MouseControl {
|
|
|
18
18
|
onMouseMove: (event: MouseEvent) => void;
|
|
19
19
|
dispose(): void;
|
|
20
20
|
private updateSectionHover;
|
|
21
|
+
private onSectionBoxDisplayToggled;
|
|
21
22
|
private onSectionBoxDisplayHoverUpdated;
|
|
22
23
|
private resetCursor;
|
|
23
24
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -18,12 +18,20 @@ export declare class PickingController {
|
|
|
18
18
|
getRayIntersectPoint(params: {
|
|
19
19
|
event: MouseEvent;
|
|
20
20
|
returnOnEdgeHitFailure: 'null' | 'bboxCenter';
|
|
21
|
+
findNearestMeshnodeIndex?: boolean;
|
|
21
22
|
}): {
|
|
22
23
|
intersection: Vector3 | null;
|
|
23
24
|
meshnodeIndex: number;
|
|
24
25
|
faceNormal: Vector3 | null;
|
|
26
|
+
nearestMeshnodeIndex?: number;
|
|
25
27
|
};
|
|
28
|
+
private findNearestMeshnodeIndex;
|
|
26
29
|
mouseToThreeRay(event: MouseEvent): THREE.Raycaster;
|
|
27
|
-
|
|
30
|
+
extractMeshnodeIndex(event: {
|
|
31
|
+
offsetX: number;
|
|
32
|
+
offsetY: number;
|
|
33
|
+
}): number;
|
|
34
|
+
planeTestMesh(plane: THREE.Plane, meshnodeIndex: number): THREE.Line3[];
|
|
28
35
|
private rayTestMesh;
|
|
36
|
+
private iterateMeshFaces;
|
|
29
37
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MeshTopology } from '../MeshTopology';
|
|
2
|
+
import { PWFMeshMock } from './PWFMeshMock';
|
|
2
3
|
import { Mesh } from '../../../pwfreader/PWFTypes';
|
|
3
|
-
export declare const pwfFlatPair:
|
|
4
|
+
export declare const pwfFlatPair: PWFMeshMock;
|
|
4
5
|
export declare const flatPair: MeshTopology;
|
|
5
6
|
export declare const flatRing: MeshTopology;
|
|
6
7
|
export declare const flatRingOrphan: MeshTopology;
|
|
@@ -8,3 +9,5 @@ export declare const tetraedron: MeshTopology;
|
|
|
8
9
|
export declare const tetraedronCW: MeshTopology;
|
|
9
10
|
export declare const tetraedronOpen: MeshTopology;
|
|
10
11
|
export declare const pwfNonManifold: Mesh;
|
|
12
|
+
export declare const pwfFlatWindowedWall: Mesh;
|
|
13
|
+
export declare const flatWindowedWall: MeshTopology;
|
|
@@ -5,6 +5,7 @@ import type { StreamedMeshnode } from './StreamedMeshnode';
|
|
|
5
5
|
import { MeshObject } from '../objects/MeshObject';
|
|
6
6
|
import { MeshData } from './MeshData';
|
|
7
7
|
import { Mesh } from '../standard/Mesh';
|
|
8
|
+
import { OPFSFile } from '../../../utils/OPFSFile';
|
|
8
9
|
import type { ValidatedFeatureFlags } from '../../../types/WebviewerOptions';
|
|
9
10
|
import type { ResourceDiscriminator } from '../../../Webviewer';
|
|
10
11
|
export declare class StreamedMeshServices extends MeshServices {
|
|
@@ -20,6 +21,7 @@ export declare class StreamedMeshServices extends MeshServices {
|
|
|
20
21
|
});
|
|
21
22
|
initOPFS(): Promise<void>;
|
|
22
23
|
private deleteOPFSFile;
|
|
24
|
+
getOPFSFile(): OPFSFile | undefined;
|
|
23
25
|
closeOPFS(): Promise<void>;
|
|
24
26
|
writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
|
|
25
27
|
getMeshObject(meshIndex: number): MeshObject;
|
|
@@ -22,9 +22,12 @@ import { GeometryFactory } from '../../procoregl/GeometryFactory';
|
|
|
22
22
|
import type { BootstrapperResult } from '../../controllers/Bootstrapper';
|
|
23
23
|
import { Manifest } from './Manifest';
|
|
24
24
|
import { Vector3 } from '../../types/Math';
|
|
25
|
+
import type { ValidatedFeatureFlags } from '../../types/WebviewerOptions';
|
|
26
|
+
import type { ResourceDiscriminator } from '../../Webviewer';
|
|
25
27
|
export declare class PWFV2 implements PWF {
|
|
26
28
|
private readonly downloadMetaData;
|
|
27
29
|
resourceId: number;
|
|
30
|
+
resource: ResourceDiscriminator;
|
|
28
31
|
streaming: boolean;
|
|
29
32
|
nodeAB?: ArrayBuffer;
|
|
30
33
|
meshnodeAB?: ArrayBuffer;
|
|
@@ -47,14 +50,18 @@ export declare class PWFV2 implements PWF {
|
|
|
47
50
|
meshnodeOffPointer: number;
|
|
48
51
|
bvhTree?: BVHTree;
|
|
49
52
|
_virtualMeshnodeIndexOffset: number;
|
|
53
|
+
private readonly featureFlags;
|
|
50
54
|
loadPartitionPromises: Promise<void>[];
|
|
51
55
|
currentIndex: number;
|
|
52
56
|
partitionProxies: PartitionProxy[];
|
|
53
57
|
partitionsCache: LRUCache<string, Partition>;
|
|
58
|
+
private meshServicesOPFSInitialized;
|
|
54
59
|
constructor(params: {
|
|
55
60
|
downloadMetaData: DownloadMetaData;
|
|
56
61
|
resourceId: number;
|
|
62
|
+
resource: ResourceDiscriminator;
|
|
57
63
|
manifest: Manifest;
|
|
64
|
+
featureFlags: ValidatedFeatureFlags;
|
|
58
65
|
});
|
|
59
66
|
setStandardModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, meshAB: ArrayBuffer): void;
|
|
60
67
|
setPartitionedModelBuffers(nodeAB: ArrayBuffer, meshnodeAB: ArrayBuffer, partitionProxiesAB: ArrayBuffer): void;
|
|
@@ -14,5 +14,6 @@ export declare class MeshData {
|
|
|
14
14
|
faces(): Uint16Array;
|
|
15
15
|
uploadToGPU(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
16
16
|
uploadToGPUPreFetching(geometryFactory: StreamedGeometryFactory): StreamedMeshGeometry;
|
|
17
|
+
getCompressedMeshData(): ArrayBuffer;
|
|
17
18
|
getUncompressedMeshData(): ArrayBuffer;
|
|
18
19
|
}
|
|
@@ -2,8 +2,10 @@ import { Partition } from './Partition';
|
|
|
2
2
|
import type { StreamedMeshnode } from './StreamedMeshnode';
|
|
3
3
|
import { PWFPartitionProxy } from '../interface/PWFPartitionProxy';
|
|
4
4
|
import { StreamedGeometryFactory } from '../../../procoregl/StreamedGeometryFactory';
|
|
5
|
+
import { StreamedMeshServices } from './StreamedMeshServices';
|
|
5
6
|
export declare class PartitionProxy {
|
|
6
7
|
private pwfPartitionProxy;
|
|
8
|
+
private meshServices;
|
|
7
9
|
static numberOfPartitions: number;
|
|
8
10
|
static numberOfPartitionsLoaded: number;
|
|
9
11
|
static currentNumberOfDownloading: number;
|
|
@@ -14,7 +16,10 @@ export declare class PartitionProxy {
|
|
|
14
16
|
private _byteLength?;
|
|
15
17
|
private _compressedByteLength?;
|
|
16
18
|
private stats;
|
|
17
|
-
constructor(
|
|
19
|
+
constructor(params: {
|
|
20
|
+
pwfPartitionProxy: PWFPartitionProxy;
|
|
21
|
+
meshServices: StreamedMeshServices;
|
|
22
|
+
});
|
|
18
23
|
meshCount(): number;
|
|
19
24
|
incrementMeshCount(numMeshes: number): void;
|
|
20
25
|
vertexCount(): number;
|
|
@@ -32,7 +37,7 @@ export declare class PartitionProxy {
|
|
|
32
37
|
compressed: number;
|
|
33
38
|
size: number;
|
|
34
39
|
};
|
|
35
|
-
static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, callback: (partitionProxy: PartitionProxy) => void): void;
|
|
40
|
+
static processPartitionProxiesAB(partitionProxiesAB: ArrayBuffer, meshServices: StreamedMeshServices, callback: (partitionProxy: PartitionProxy) => void): void;
|
|
36
41
|
static getPartitionProxies(partitionProxiesAB: ArrayBuffer): PWFPartitionProxy[];
|
|
37
42
|
getContentOfPartitionUrl(): string;
|
|
38
43
|
}
|
|
@@ -3,10 +3,31 @@ import type { PWFV2 } from '../PWFV2';
|
|
|
3
3
|
import { MeshServices } from '../standard';
|
|
4
4
|
import type { StreamedMeshnode } from './StreamedMeshnode';
|
|
5
5
|
import { MeshObject } from '../objects/MeshObject';
|
|
6
|
+
import { MeshData } from './MeshData';
|
|
7
|
+
import { Mesh } from '../standard/Mesh';
|
|
8
|
+
import { OPFSFile } from '../../../utils/OPFSFile';
|
|
9
|
+
import type { ValidatedFeatureFlags } from '../../../types/WebviewerOptions';
|
|
10
|
+
import type { ResourceDiscriminator } from '../../../Webviewer';
|
|
6
11
|
export declare class StreamedMeshServices extends MeshServices {
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
private readonly featureFlags;
|
|
13
|
+
private meshIndexToOPFSRecord;
|
|
14
|
+
private opfsFile?;
|
|
15
|
+
private opfsOffset;
|
|
16
|
+
private resource;
|
|
17
|
+
constructor(params: {
|
|
18
|
+
pwf: PWFV2;
|
|
19
|
+
featureFlags: ValidatedFeatureFlags;
|
|
20
|
+
resource: ResourceDiscriminator;
|
|
21
|
+
});
|
|
22
|
+
initOPFS(): Promise<void>;
|
|
23
|
+
private deleteOPFSFile;
|
|
24
|
+
getOPFSFile(): OPFSFile | undefined;
|
|
25
|
+
closeOPFS(): Promise<void>;
|
|
26
|
+
writeMeshDataToOPFS(meshData: MeshData): Promise<void>;
|
|
27
|
+
getMeshObject(meshIndex: number): MeshObject;
|
|
9
28
|
loadPartitionContainingMeshnode(streamedMeshnode: StreamedMeshnode): Promise<void>;
|
|
10
29
|
getMeshGeometryForOffsets(meshOffset: number, meshnodeOffset: number): StreamedMeshGeometry | undefined;
|
|
11
|
-
|
|
30
|
+
meshFromOffset(meshIndex: number): Mesh;
|
|
31
|
+
private getCompressedMeshDataFromOPFS;
|
|
32
|
+
dispose(): Promise<void>;
|
|
12
33
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const setMeasurementSchema: {
|
|
2
|
+
type: string;
|
|
3
|
+
properties: {
|
|
4
|
+
enable: {
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
options: {
|
|
8
|
+
type: string;
|
|
9
|
+
properties: {
|
|
10
|
+
measurementMode: {
|
|
11
|
+
type: string;
|
|
12
|
+
enum: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
additionalProperties: boolean;
|
|
16
|
+
default: {};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
required: string[];
|
|
20
|
+
additionalProperties: boolean;
|
|
21
|
+
};
|
|
@@ -2,6 +2,7 @@ import { FileExtraction, PropertiesFile, FileVersion, Attachment } from '../../a
|
|
|
2
2
|
import { ModelRevision } from '../../api/types/ModelRevision';
|
|
3
3
|
import * as FileExtractions from '../../api/bim_file_extractions';
|
|
4
4
|
import * as BimModelRevisions from '../../api/bim_model_revisions';
|
|
5
|
+
import * as BimViewpoints from '../../api/bim_viewpoints';
|
|
5
6
|
import { Options, GeometryBundle } from '../../types/WebviewerOptions';
|
|
6
7
|
import { InternalViewpoint } from '../../viewpoint/types';
|
|
7
8
|
import { Model } from '../../api/types/Model';
|
|
@@ -14,6 +15,7 @@ export type ResourceBundle = ({
|
|
|
14
15
|
type Api = {
|
|
15
16
|
getBimFileExtraction: typeof FileExtractions.GetBimFileExtraction;
|
|
16
17
|
getBimModelRevision: typeof BimModelRevisions.GetBimModelRevision;
|
|
18
|
+
getBimViewpoint: typeof BimViewpoints.GetBimViewpoint;
|
|
17
19
|
};
|
|
18
20
|
type ApiOptions = Partial<Api>;
|
|
19
21
|
export declare const API_MODE: {
|
|
@@ -40,8 +42,10 @@ export declare class ApiMetaData {
|
|
|
40
42
|
get companyId(): Promise<number>;
|
|
41
43
|
get baseUrl(): Promise<string>;
|
|
42
44
|
get fileExtractionIds(): Promise<number[]>;
|
|
45
|
+
get fileExtraction(): Promise<FileExtraction>;
|
|
43
46
|
get modelRevision(): Promise<ModelRevision>;
|
|
44
47
|
get homeViewpoint(): Promise<InternalViewpoint | undefined>;
|
|
45
48
|
private get homeViewpointInModelRevisionMode();
|
|
49
|
+
private get homeViewpointInFileExtractionMode();
|
|
46
50
|
}
|
|
47
51
|
export {};
|