@procore/bim-webviewer-sdk 16.6.0-rc.14 → 16.6.0-rc.16
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 +5 -0
- package/dist/Procore.Bim.Webviewer.d.ts +135 -2334
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +4 -3
- package/dist/types/src/api/analytic_events/analyticKeys.d.ts +1 -0
- package/dist/types/src/api/analytic_events/index.d.ts +1 -1
- package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +1 -0
- package/dist/types/src/components/ToolBarComponent/ToolbarButton/SplitButton.d.ts +7 -5
- package/dist/types/src/controllers/PubSubController.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/controllers/RenderControllerWorker.d.ts +1 -0
- package/dist/types/src/measuring/MeasurementManager.d.ts +5 -4
- package/dist/types/src/measuring/PointToPointController.d.ts +5 -0
- package/dist/types/src/measuring/PointToPointManager.d.ts +13 -0
- package/dist/types/src/measuring/createPointToPointLineDrawingDebugGui.d.ts +0 -5
- package/dist/types/src/navigation/DefaultControl.d.ts +0 -11
- package/dist/types/src/navigation/__tests__/ZoomControl.test.d.ts +1 -0
- package/dist/types/src/sdk.d.ts +1 -0
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ import { SectionDataAutodeskFormat, SectionDataProcoreFormat } from './sectionin
|
|
|
10
10
|
import type { Viewpoint, Visibility } from './api/types/Viewpoint';
|
|
11
11
|
import type { CssColor } from './components/Markup/SvgRenderer';
|
|
12
12
|
import { RenderMode } from './utils/constants';
|
|
13
|
-
import { PointToPointManager } from './measuring';
|
|
14
13
|
import { Uom, DisplayUnit } from './unit_util';
|
|
14
|
+
import { MeasureMode } from './measuring/MeasurementManager';
|
|
15
15
|
export type ResourceDiscriminator = {
|
|
16
16
|
fileExtractionId: number;
|
|
17
17
|
} | {
|
|
@@ -19,7 +19,6 @@ export type ResourceDiscriminator = {
|
|
|
19
19
|
};
|
|
20
20
|
export declare class Webviewer {
|
|
21
21
|
options: Options;
|
|
22
|
-
pointToPointManager: PointToPointManager;
|
|
23
22
|
private readonly measurementRenderer;
|
|
24
23
|
private readonly measurementManager;
|
|
25
24
|
static readonly tools: {
|
|
@@ -216,7 +215,9 @@ export declare class Webviewer {
|
|
|
216
215
|
deselectObjects: (objectIds: number[], objectTreeName?: string) => Promise<boolean>;
|
|
217
216
|
selectAllObjects: (objectTreeName?: string) => Promise<boolean>;
|
|
218
217
|
getSelectedObjects: () => Promise<number[]>;
|
|
219
|
-
setMeasurement: (enable: boolean
|
|
218
|
+
setMeasurement: (enable: boolean, options?: {
|
|
219
|
+
measurementMode?: MeasureMode;
|
|
220
|
+
}) => void;
|
|
220
221
|
setObjectColor: (palettes: PaletteParams[], options?: {
|
|
221
222
|
resourceId?: number;
|
|
222
223
|
}) => void;
|
|
@@ -148,6 +148,7 @@ export declare const MEASUREMENT_ORIGIN: {
|
|
|
148
148
|
readonly ESC: "esc";
|
|
149
149
|
readonly HOTKEY: "hotkey";
|
|
150
150
|
};
|
|
151
|
+
export type MeasurementOrigin = (typeof MEASUREMENT_ORIGIN)[keyof typeof MEASUREMENT_ORIGIN];
|
|
151
152
|
export declare const measurements: {
|
|
152
153
|
readonly enabled: "project.3d_models.measure.enabled";
|
|
153
154
|
readonly disabled: "project.3d_models.measure.disabled";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { model, clientLoadings, webviewers, bimToolbars, sectionBoxes, SECTION_BOX_ORIGIN, SectionBoxOrigin, SectionBoxDisplayPlanesPayload, bimObjects, BIM_OBJECT_ORIGIN, renderings, RENDER_MODE_ORIGIN, measurements, MEASUREMENT_ORIGIN, } from './analyticKeys';
|
|
1
|
+
export { model, clientLoadings, webviewers, bimToolbars, sectionBoxes, SECTION_BOX_ORIGIN, SectionBoxOrigin, SectionBoxDisplayPlanesPayload, bimObjects, BIM_OBJECT_ORIGIN, renderings, RENDER_MODE_ORIGIN, measurements, MEASUREMENT_ORIGIN, MeasurementOrigin, } from './analyticKeys';
|
|
2
2
|
export { trackEvent } from './analyticEvents';
|
|
3
3
|
export { AnalyticEventPayload } from './types/AnalyticEventPayload';
|
|
@@ -61,6 +61,7 @@ export class ToolBarComponent {
|
|
|
61
61
|
createToolBarButton(tool: any, clickFunction?: null): HTMLDivElement;
|
|
62
62
|
createDividerLine(id: any): HTMLDivElement;
|
|
63
63
|
createOptionalTools(toolbar: any): void;
|
|
64
|
+
measureButton: any;
|
|
64
65
|
onResize(): void;
|
|
65
66
|
createNavTools(toolbar: any): void;
|
|
66
67
|
onMeasurementToggled(data: any): void;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import './styles.css';
|
|
2
2
|
type FlyOutMenuItem = {
|
|
3
|
+
key: string;
|
|
3
4
|
content: string;
|
|
4
5
|
onMenuItemClick: () => void;
|
|
5
6
|
cssIconClass: string;
|
|
6
7
|
};
|
|
7
8
|
export declare class SplitButton {
|
|
8
9
|
element: HTMLElement;
|
|
9
|
-
flyOutMenu
|
|
10
|
-
button
|
|
11
|
-
buttonIcon
|
|
12
|
-
flyOutClickAreaButton
|
|
13
|
-
|
|
10
|
+
private readonly flyOutMenu;
|
|
11
|
+
private readonly button;
|
|
12
|
+
private readonly buttonIcon;
|
|
13
|
+
private readonly flyOutClickAreaButton;
|
|
14
|
+
private readonly flyOutMenuItems;
|
|
14
15
|
onFlyOutMenuOpen: () => void;
|
|
15
16
|
onFlyOutMenuClose: () => void;
|
|
16
17
|
constructor(params: {
|
|
@@ -25,6 +26,7 @@ export declare class SplitButton {
|
|
|
25
26
|
};
|
|
26
27
|
});
|
|
27
28
|
private createFlyOutMenuItem;
|
|
29
|
+
setSelectedItem: (key: string) => void;
|
|
28
30
|
private setMenuItemSelected;
|
|
29
31
|
private flyOutClickZoneOnClick;
|
|
30
32
|
private setFlyOutMenuVisibility;
|
|
@@ -100,6 +100,7 @@ export namespace PubSubController {
|
|
|
100
100
|
undo: "undo";
|
|
101
101
|
updatePivot: "updatePivot";
|
|
102
102
|
windowClose: "windowClose";
|
|
103
|
+
wheel: "wheel";
|
|
103
104
|
windowComponentChanged: "windowComponentChanged";
|
|
104
105
|
windowComponentShouldClose: "windowComponentShouldClose";
|
|
105
106
|
windowComponentShouldOpen: "windowComponentShouldOpen";
|
|
@@ -185,6 +185,7 @@ export class RenderController {
|
|
|
185
185
|
handleEmptySpaceClick(): void;
|
|
186
186
|
onSingleClick(evt: any, rightClick?: boolean): void;
|
|
187
187
|
onMouseMove(evt: any): void;
|
|
188
|
+
onWheel(evt: any): void;
|
|
188
189
|
setCanvasSelectionEnabled(enabled: any): void;
|
|
189
190
|
getSelectedSubtree(meshnodeIndex: any): {
|
|
190
191
|
objectId: number;
|
|
@@ -128,6 +128,7 @@ export class RenderControllerProxy {
|
|
|
128
128
|
};
|
|
129
129
|
onSingleClick(...params: any[]): void | Promise<any>;
|
|
130
130
|
onMouseMove(...params: any[]): void | Promise<any>;
|
|
131
|
+
onWheel(...params: any[]): void | Promise<any>;
|
|
131
132
|
resizeScene(...params: any[]): void;
|
|
132
133
|
onDoubleClick(...params: any[]): void | Promise<any>;
|
|
133
134
|
onRightClick(...params: any[]): void | Promise<any>;
|
|
@@ -40,6 +40,7 @@ export class RenderControllerWorker {
|
|
|
40
40
|
getContextMenuData(evt: any): Promise<any>;
|
|
41
41
|
onSingleClick(evt: any): Promise<any>;
|
|
42
42
|
onMouseMove(evt: any): Promise<any>;
|
|
43
|
+
onWheel(evt: any): Promise<any>;
|
|
43
44
|
resizeScene(...params: any[]): Promise<any>;
|
|
44
45
|
onDoubleClick(evt: any): Promise<any>;
|
|
45
46
|
onRightClick(evt: any): Promise<any>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MeasurementInterface } from './MeasurementInterface';
|
|
2
2
|
import { Vector3 } from '../types/Math';
|
|
3
3
|
import type { ApiController } from '../controllers/ApiController';
|
|
4
|
+
import { MeasurementOrigin } from '../api/analytic_events';
|
|
4
5
|
export declare const MEASURE_MODES: {
|
|
5
6
|
POINT_TO_POINT: string;
|
|
6
7
|
SHORTEST_DISTANCE: string;
|
|
@@ -20,16 +21,16 @@ export declare class MeasurementManager {
|
|
|
20
21
|
});
|
|
21
22
|
setGlobalOffset(params: Vector3): void;
|
|
22
23
|
setMeasurementEnabled(params: {
|
|
23
|
-
measurementMode
|
|
24
|
+
measurementMode?: MeasureMode;
|
|
24
25
|
enable: boolean;
|
|
25
|
-
origin:
|
|
26
|
+
origin: MeasurementOrigin;
|
|
26
27
|
}): void;
|
|
27
28
|
toggleMeasurement(params: {
|
|
28
29
|
measurementMode: MeasureMode;
|
|
29
|
-
origin:
|
|
30
|
+
origin: MeasurementOrigin;
|
|
30
31
|
}): void;
|
|
31
32
|
toggleCurrentMeasurement(params: {
|
|
32
|
-
origin:
|
|
33
|
+
origin: MeasurementOrigin;
|
|
33
34
|
}): void;
|
|
34
35
|
handleKeydown(curKey: number): void;
|
|
35
36
|
private handleESC;
|
|
@@ -2,6 +2,7 @@ import type { PickingController } from '../picking/PickingController';
|
|
|
2
2
|
import type { Models } from '../procoregl/Models';
|
|
3
3
|
import type { SnapType } from './MeasureToolUtils';
|
|
4
4
|
import type { ViewerRenderer } from '../procoregl/ViewerRenderer';
|
|
5
|
+
import type { RenderController } from '../controllers/RenderController';
|
|
5
6
|
import { Vector3 } from '../types/Math';
|
|
6
7
|
export type WorldIntersectionSnapResult = {
|
|
7
8
|
intersection: Vector3;
|
|
@@ -31,8 +32,10 @@ export declare class PointToPointController {
|
|
|
31
32
|
private lastWorldIntersectionSnapResult;
|
|
32
33
|
private readonly debugGui;
|
|
33
34
|
private readonly viewerRenderer;
|
|
35
|
+
private renderController;
|
|
34
36
|
constructor(params: {
|
|
35
37
|
pickingController: PickingController;
|
|
38
|
+
renderController: RenderController;
|
|
36
39
|
models: Models;
|
|
37
40
|
camera: THREE.PerspectiveCamera;
|
|
38
41
|
globalOffset: THREE.Vector3;
|
|
@@ -42,6 +45,8 @@ export declare class PointToPointController {
|
|
|
42
45
|
set enabled(value: boolean);
|
|
43
46
|
handleMouseClick(): void;
|
|
44
47
|
handleMouseMove(event: MouseEvent): void;
|
|
48
|
+
handleWheel(event: WheelEvent): Promise<void>;
|
|
49
|
+
private computeIntersectionSnapResult;
|
|
45
50
|
private getWorldIntersectionSnapResult;
|
|
46
51
|
private publishIntersectionSnapResult;
|
|
47
52
|
private getMeshTopology;
|
|
@@ -24,6 +24,11 @@ export declare class PointToPointManager implements MeasurementInterface {
|
|
|
24
24
|
private readonly locale;
|
|
25
25
|
private cursorTooltip;
|
|
26
26
|
private featureTooltip;
|
|
27
|
+
private surfaceCursor;
|
|
28
|
+
private edgeCursor;
|
|
29
|
+
private midPointCursor;
|
|
30
|
+
private endPointCursor;
|
|
31
|
+
private dom;
|
|
27
32
|
constructor(params: {
|
|
28
33
|
apiController: ApiController;
|
|
29
34
|
renderControllerProxy: RenderControllerProxy;
|
|
@@ -34,6 +39,8 @@ export declare class PointToPointManager implements MeasurementInterface {
|
|
|
34
39
|
});
|
|
35
40
|
setGlobalOffset(params: Vector3): void;
|
|
36
41
|
getGlobalOffset(): THREE.Vector3;
|
|
42
|
+
private onMouseMove;
|
|
43
|
+
private onWheel;
|
|
37
44
|
getMeasurementProgress(): MeasurementState;
|
|
38
45
|
private onCameraUpdated;
|
|
39
46
|
private onNavigationChanged;
|
|
@@ -50,4 +57,10 @@ export declare class PointToPointManager implements MeasurementInterface {
|
|
|
50
57
|
private removeCursors;
|
|
51
58
|
private setCameraAndNavigationControls;
|
|
52
59
|
private updateSvg;
|
|
60
|
+
private updateCursorPosition;
|
|
61
|
+
private updatePointToPointCursorSize;
|
|
62
|
+
private managePointToPointCursorElements;
|
|
63
|
+
private onMeasurementObjectEnter;
|
|
64
|
+
private updatePointToPointCursor;
|
|
65
|
+
private resetCursor;
|
|
53
66
|
}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
import { DebugGui } from '../utils/DebugGui';
|
|
2
|
-
export declare const pointToPointCursorSize: {
|
|
3
|
-
surfaceCursorSize: number;
|
|
4
|
-
edgeCursorSize: number;
|
|
5
|
-
endpointCursorSize: number;
|
|
6
|
-
};
|
|
7
2
|
export declare const createPointToPointLineDrawingDebugGui: () => ReturnType<typeof DebugGui.add>;
|
|
@@ -7,10 +7,6 @@ export declare class DefaultControl implements MouseControl {
|
|
|
7
7
|
private isRotating;
|
|
8
8
|
private startMouseDown?;
|
|
9
9
|
private lockRotation;
|
|
10
|
-
private surfaceCursor;
|
|
11
|
-
private edgeCursor;
|
|
12
|
-
private midPointCursor;
|
|
13
|
-
private endPointCursor;
|
|
14
10
|
private static COUNTS_AS_CLICK_THRESHOLD;
|
|
15
11
|
constructor(params: {
|
|
16
12
|
dom: HTMLElement;
|
|
@@ -23,12 +19,5 @@ export declare class DefaultControl implements MouseControl {
|
|
|
23
19
|
dispose(): void;
|
|
24
20
|
private updateSectionHover;
|
|
25
21
|
private onSectionBoxDisplayHoverUpdated;
|
|
26
|
-
private onMeasurementObjectMove;
|
|
27
|
-
private onMeasurementObjectLeave;
|
|
28
|
-
private onMeasurementObjectEnter;
|
|
29
|
-
private updatePointToPointCursor;
|
|
30
22
|
private resetCursor;
|
|
31
|
-
private updateCursorPosition;
|
|
32
|
-
private updatePointToPointCursorSize;
|
|
33
|
-
private addPointToPointCursorToDom;
|
|
34
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/src/sdk.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export type { PaletteParams } from './types/Palette';
|
|
|
34
34
|
export type { Uom, DisplayUnit } from './unit_util';
|
|
35
35
|
export { UOM, DISPLAY_UNIT_ABBREVIATIONS as DISPLAY_UNIT } from './unit_util';
|
|
36
36
|
export type { ProjectSettings } from './controllers/SettingsController';
|
|
37
|
+
export { MEASURE_MODES, type MeasureMode, } from './measuring/MeasurementManager';
|
|
37
38
|
declare const version: string;
|
|
38
39
|
export { version };
|
|
39
40
|
export { ErrorLogger } from './utils/Error';
|