@procore/bim-webviewer-sdk 17.3.0 → 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 +16 -0
- package/dist/Procore.Bim.Webviewer.d.ts +1 -0
- package/dist/Procore.Bim.Webviewer.js +1 -1
- 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/controllers/RenderController.d.ts +1 -0
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +1 -0
- package/dist/types/src/measuring/FeatureTooltip/FeatureTooltip.d.ts +2 -0
- package/dist/types/src/measuring/MeasureToolUtils.d.ts +2 -0
- package/dist/types/src/measuring/MeasurementInterface.d.ts +1 -0
- package/dist/types/src/measuring/MeasurementManager.d.ts +3 -1
- package/dist/types/src/measuring/PointToPointController.d.ts +4 -1
- package/dist/types/src/measuring/PointToPointManager.d.ts +3 -0
- package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +1 -0
- package/dist/types/src/picking/PickingController.d.ts +9 -1
- package/dist/types/src/procoregl/MeshTopology/__tests__/TopologyFixtures.d.ts +2 -1
- package/dist/types/src/utils/ApiMetaData/ApiMetaData.d.ts +4 -0
- package/dist/types/src/utils/ApiMetaData/__tests__/mocks.d.ts +3 -2
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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;
|
|
@@ -277,6 +277,7 @@ export class RenderControllerProxy {
|
|
|
277
277
|
intersection: import("../sdk").Vector3 | null;
|
|
278
278
|
meshnodeIndex: number;
|
|
279
279
|
faceNormal: import("../sdk").Vector3 | null;
|
|
280
|
+
nearestMeshnodeIndex?: number;
|
|
280
281
|
};
|
|
281
282
|
}
|
|
282
283
|
export namespace RenderControllerProxy {
|
|
@@ -4,9 +4,11 @@ export declare class FeatureTooltip {
|
|
|
4
4
|
private readonly bimMain;
|
|
5
5
|
private readonly canvas;
|
|
6
6
|
private timerId;
|
|
7
|
+
private delay;
|
|
7
8
|
private readonly locale;
|
|
8
9
|
constructor(params: {
|
|
9
10
|
locale: string;
|
|
11
|
+
delay?: number;
|
|
10
12
|
});
|
|
11
13
|
private onMouseMove;
|
|
12
14
|
private onWheel;
|
|
@@ -5,6 +5,7 @@ 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];
|
|
10
11
|
export type ExtendedLine3 = THREE.Line3 & {
|
|
@@ -26,6 +27,7 @@ export declare function getIntersectionSnapAndOutline(params: {
|
|
|
26
27
|
};
|
|
27
28
|
clippingPlanes: THREE.Plane[];
|
|
28
29
|
globalOffset: Vector3;
|
|
30
|
+
nearestObjectIntersectionLines: THREE.Line3[];
|
|
29
31
|
}): {
|
|
30
32
|
snapType: SnapType;
|
|
31
33
|
snapPosition: THREE.Vector3;
|
|
@@ -21,7 +21,9 @@ export declare class MeasurementManager {
|
|
|
21
21
|
}[];
|
|
22
22
|
toolEnabled: boolean;
|
|
23
23
|
});
|
|
24
|
-
private
|
|
24
|
+
private onSectionBoxDisplayToggled;
|
|
25
|
+
private onSectionBoxDisplayHoverUpdated;
|
|
26
|
+
private onSelectTool;
|
|
25
27
|
setGlobalOffset(params: Vector3): void;
|
|
26
28
|
setMeasurementEnabled(params: {
|
|
27
29
|
measurementMode?: MeasureMode;
|
|
@@ -22,6 +22,7 @@ export declare class PointToPointController {
|
|
|
22
22
|
private readonly models;
|
|
23
23
|
private readonly camera;
|
|
24
24
|
private currentHoverMeshnodeIndex;
|
|
25
|
+
private nearestMeshnodeIndex;
|
|
25
26
|
nonManifoldMeshnodeIndices: Set<number>;
|
|
26
27
|
private readonly meshTopologyCache;
|
|
27
28
|
private _enabled;
|
|
@@ -30,7 +31,7 @@ export declare class PointToPointController {
|
|
|
30
31
|
private lastWorldIntersectionSnapResult;
|
|
31
32
|
private readonly debugGui;
|
|
32
33
|
private readonly viewerRenderer;
|
|
33
|
-
private renderController;
|
|
34
|
+
private readonly renderController;
|
|
34
35
|
constructor(params: {
|
|
35
36
|
pickingController: PickingController;
|
|
36
37
|
renderController: RenderController;
|
|
@@ -46,8 +47,10 @@ export declare class PointToPointController {
|
|
|
46
47
|
handleWheel(event: WheelEvent): Promise<void>;
|
|
47
48
|
private computeIntersectionSnapResult;
|
|
48
49
|
private getWorldIntersectionSnapResult;
|
|
50
|
+
private getNearestMeshnodeIntersectionLines;
|
|
49
51
|
private publishIntersectionSnapResult;
|
|
50
52
|
getMeshTopology(meshnode: Meshnode): MeshTopology | null;
|
|
53
|
+
private getFaceCount;
|
|
51
54
|
private meshnodeTooComplex;
|
|
52
55
|
private determineHoverState;
|
|
53
56
|
}
|
|
@@ -27,9 +27,11 @@ export declare class PointToPointManager implements MeasurementInterface {
|
|
|
27
27
|
private featureTooltip;
|
|
28
28
|
private surfaceCursor;
|
|
29
29
|
private edgeCursor;
|
|
30
|
+
private intersectionCursor;
|
|
30
31
|
private midPointCursor;
|
|
31
32
|
private endPointCursor;
|
|
32
33
|
private dom;
|
|
34
|
+
private active;
|
|
33
35
|
constructor(params: {
|
|
34
36
|
apiController: ApiController;
|
|
35
37
|
renderControllerProxy: RenderControllerProxy;
|
|
@@ -38,6 +40,7 @@ export declare class PointToPointManager implements MeasurementInterface {
|
|
|
38
40
|
measurementRenderer: MeasurementRenderer;
|
|
39
41
|
locale: string;
|
|
40
42
|
});
|
|
43
|
+
setActive(active: boolean): void;
|
|
41
44
|
setGlobalOffset(params: Vector3): void;
|
|
42
45
|
getGlobalOffset(): THREE.Vector3;
|
|
43
46
|
getTemporaryDistanceLabel(): DistanceLabel | null;
|
|
@@ -18,6 +18,7 @@ export declare const measurementObjectEnterObject1Payload: WorldIntersectionSnap
|
|
|
18
18
|
export declare const measurementObjectEnterTooComplexPayload: WorldIntersectionSnapResult;
|
|
19
19
|
export declare const measurementObjectEnterObject2Payload: WorldIntersectionSnapResult;
|
|
20
20
|
export declare const measurementObjectMoveMidpointPayload: WorldIntersectionSnapResult;
|
|
21
|
+
export declare const measurementObjectEnterIntersectionPayload: WorldIntersectionSnapResult;
|
|
21
22
|
export declare const measurementObjectMovePayload: WorldIntersectionSnapResult;
|
|
22
23
|
export declare const measurementClippedObjectMovePayload: WorldIntersectionSnapResult;
|
|
23
24
|
export declare const measurementObjectMoveComplexMeshPayload: WorldIntersectionSnapResult;
|
|
@@ -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;
|
|
@@ -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 {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { FileExtractionModePwfV2OverrideOptions, FileExtractionModePwfV1OverrideOptions, FileExtractionModeOptions, ModelRevisionModePwfV2OverrideOptions, ModelRevisionModePwfV1OverrideOptions, ModelRevisionModeOptions, FileExtractionModePwfV1OverrideResource, FileExtractionModePwfV2OverrideResource, ModelRevisionModePwfV1OverrideResource, ModelRevisionModePwfV2OverrideResource, ModelRevisionModeResource, ResourceOptions } from '../../../types/WebviewerOptions';
|
|
2
2
|
import { FileExtraction } from '../../../api/types/FileExtraction';
|
|
3
|
-
import { ModelRevision
|
|
3
|
+
import { ModelRevision } from '../../../api/types/ModelRevision';
|
|
4
4
|
import { InternalViewpoint } from '../../../viewpoint/types';
|
|
5
|
+
import type { Viewpoint } from '../../../api/types/Viewpoint';
|
|
5
6
|
export declare const projectId = 4;
|
|
6
7
|
export declare const companyId = 1;
|
|
7
8
|
export declare const fileExtractionId = 1;
|
|
@@ -67,6 +68,6 @@ export declare const modelRevisionModePwfV2OverrideResourceOptions: ResourceOpti
|
|
|
67
68
|
export declare const modelRevisionModeResource: ModelRevisionModeResource;
|
|
68
69
|
export declare const modelRevisionModeResourceOptions: ResourceOptions;
|
|
69
70
|
export declare const fileExtraction: FileExtraction;
|
|
70
|
-
export declare const
|
|
71
|
+
export declare const viewpoint: Viewpoint;
|
|
71
72
|
export declare const modelRevision: ModelRevision;
|
|
72
73
|
export declare const bimHomeViewpoint: InternalViewpoint;
|