@procore/bim-webviewer-sdk 15.0.0 → 15.1.0-BIM-4183.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/CHANGELOG.md +22 -0
- package/dist/Procore.Bim.Webviewer.d.ts +161 -75
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +45 -25
- package/dist/types/src/api/HttpClient.d.ts +1 -0
- package/dist/types/src/api/analytic_events/analyticKeys.d.ts +10 -6
- package/dist/types/src/api/analytic_events/index.d.ts +1 -1
- package/dist/types/src/api/analytic_events/payloadFactories.d.ts +6 -1
- package/dist/types/src/api/types/Model.d.ts +0 -13
- package/dist/types/src/api/types/ModelRevision.d.ts +9 -0
- package/dist/types/src/api/types/Viewpoint.d.ts +15 -0
- package/dist/types/src/components/Markup/SvgRenderer.d.ts +3 -3
- package/dist/types/src/components/RootComponent.d.ts +3 -3
- package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +35 -8
- package/dist/types/src/components/ToolBarTools.d.ts +17 -16
- package/dist/types/src/components/ToolEnum.d.ts +18 -3
- package/dist/types/src/components/ViewpointManager/ViewpointManager.d.ts +28 -0
- package/dist/types/src/components/{HomeViewpointManager → ViewpointManager}/__tests__/fixtures.d.ts +5 -1
- package/dist/types/src/components/ViewpointManager/index.d.ts +1 -0
- package/dist/types/src/components/WindowModelObjectComponent/WindowModelObjectComponent.d.ts +1 -1
- package/dist/types/src/components/WindowSettingsComponent.d.ts +1 -1
- package/dist/types/src/components/WindowTreeViewComponent.d.ts +4 -4
- package/dist/types/src/components/WindowViewPropertiesComponent/WindowViewPropertiesComponent.d.ts +1 -1
- package/dist/types/src/controllers/CacheController.d.ts +2 -1
- package/dist/types/src/controllers/PubSubController.d.ts +1 -0
- package/dist/types/src/controllers/RenderController.d.ts +11 -8
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +20 -5
- package/dist/types/src/controllers/RenderControllerWorker.d.ts +5 -3
- package/dist/types/src/procoregl/HiddenNodeServices/HiddenNodeServices.d.ts +6 -1
- package/dist/types/src/procoregl/HiddenNodeServices/__tests__/rangify.test.d.ts +1 -0
- package/dist/types/src/procoregl/HiddenNodeServices/rangify.d.ts +14 -0
- package/dist/types/src/procoregl/PartitionsRenderer.d.ts +2 -2
- package/dist/types/src/procoregl/PartitionsRendererImpl.d.ts +3 -2
- package/dist/types/src/procoregl/StandardRenderer.d.ts +2 -2
- package/dist/types/src/procoregl/StandardRendererImpl.d.ts +3 -2
- package/dist/types/src/procoregl/ViewerRenderer.d.ts +3 -2
- package/dist/types/src/pwfreader/PWF.d.ts +3 -0
- package/dist/types/src/pwfreader/shared/NodeServices.d.ts +2 -0
- package/dist/types/src/pwfreader/streaming/PartitionProxy.d.ts +6 -1
- package/dist/types/src/sdk.d.ts +24 -1
- package/dist/types/src/sectioning/SectionController.d.ts +3 -3
- package/dist/types/src/types/WebviewerOptions.d.ts +8 -8
- package/dist/types/src/utils/ApiMetaData/ApiMetaData.d.ts +1 -1
- package/dist/types/src/utils/ApiMetaData/__tests__/mocks.d.ts +1 -1
- package/dist/types/src/utils/ApiMetaData/index.d.ts +1 -0
- package/dist/types/src/utils/Enums.d.ts +13 -12
- package/dist/types/src/utils/Stack.d.ts +6 -4
- package/dist/types/src/utils/constants.d.ts +9 -4
- package/dist/types/src/viewpoint/ViewpointFactory.d.ts +5 -1
- package/dist/types/src/viewpoint/types.d.ts +5 -1
- package/package.json +1 -1
- package/dist/types/src/components/HomeViewpointManager/HomeViewpointManager.d.ts +0 -18
- package/dist/types/src/components/HomeViewpointManager/index.d.ts +0 -1
- /package/dist/types/src/components/{HomeViewpointManager/__tests__/HomeViewpointManager.test.d.ts → ViewpointManager/__tests__/ViewpointManager.test.d.ts} +0 -0
|
@@ -5,38 +5,54 @@ import { ObjectFilter } from './types/ObjectFilter';
|
|
|
5
5
|
import { PublicNode } from './types/PublicNode';
|
|
6
6
|
import { NavigationMode } from './navigation/NavigationModes';
|
|
7
7
|
import { SectionDataAutodeskFormat, SectionDataProcoreFormat } from './sectioning/SectionController';
|
|
8
|
-
import type { Viewpoint } from './api/types/
|
|
8
|
+
import type { Viewpoint, Visibility } from './api/types/Viewpoint';
|
|
9
9
|
import type { CssColor } from './components/Markup/SvgRenderer';
|
|
10
|
+
import { RenderMode } from './utils/constants';
|
|
10
11
|
export declare class Webviewer {
|
|
11
12
|
options: Options;
|
|
12
13
|
static readonly tools: {
|
|
13
|
-
|
|
14
|
+
readonly ALL: 0;
|
|
15
|
+
readonly BOTTOMTOOL: 1;
|
|
16
|
+
readonly FLOORPLAN: 2;
|
|
17
|
+
readonly OBJECTMODELTREE: 3;
|
|
18
|
+
readonly MODELVIEWS: 4;
|
|
19
|
+
readonly COACHMARKS: 5;
|
|
20
|
+
readonly COACHMARKSHIDDEN: 6;
|
|
21
|
+
readonly COACHMARKSECTION: 7;
|
|
22
|
+
readonly MEASUREMENT_SD: 8;
|
|
23
|
+
readonly SETTINGS: 9;
|
|
24
|
+
readonly CONTEXTMENU: 10;
|
|
25
|
+
readonly COACHMARKSFOV: 11;
|
|
26
|
+
readonly VIEW_PROPERTIES: 12;
|
|
27
|
+
readonly LOADING: 13;
|
|
28
|
+
readonly XRAY_MODE: 14;
|
|
29
|
+
readonly SECTION_BOX: 15;
|
|
14
30
|
};
|
|
15
31
|
static readonly toolbar_enum: {
|
|
16
|
-
NONE:
|
|
17
|
-
HOME:
|
|
18
|
-
NAV_DEFAULT:
|
|
19
|
-
NAV_FLY:
|
|
20
|
-
NAV_ORBIT:
|
|
21
|
-
OBJECT:
|
|
22
|
-
PREMEASURE:
|
|
23
|
-
MEASURE:
|
|
24
|
-
SETTING:
|
|
25
|
-
VIEW:
|
|
26
|
-
PROPERTIES:
|
|
27
|
-
CONTEXT_MENU:
|
|
28
|
-
XRAY_MODE:
|
|
29
|
-
SECTION_BOX:
|
|
32
|
+
readonly NONE: 0;
|
|
33
|
+
readonly HOME: 1;
|
|
34
|
+
readonly NAV_DEFAULT: 2;
|
|
35
|
+
readonly NAV_FLY: 3;
|
|
36
|
+
readonly NAV_ORBIT: 4;
|
|
37
|
+
readonly OBJECT: 5;
|
|
38
|
+
readonly PREMEASURE: 6;
|
|
39
|
+
readonly MEASURE: 7;
|
|
40
|
+
readonly SETTING: 8;
|
|
41
|
+
readonly VIEW: 9;
|
|
42
|
+
readonly PROPERTIES: 10;
|
|
43
|
+
readonly CONTEXT_MENU: 11;
|
|
44
|
+
readonly XRAY_MODE: 12;
|
|
45
|
+
readonly SECTION_BOX: 13;
|
|
46
|
+
};
|
|
47
|
+
static readonly action: {
|
|
48
|
+
readonly NONE: -1;
|
|
49
|
+
readonly PAN: 1;
|
|
50
|
+
readonly KEYMOVE: 2;
|
|
51
|
+
readonly ROTATE: 3;
|
|
52
|
+
readonly FLY: 4;
|
|
53
|
+
readonly ORBIT: 5;
|
|
54
|
+
readonly STRAFE: 6;
|
|
30
55
|
};
|
|
31
|
-
static readonly action: Readonly<{
|
|
32
|
-
NONE: -1;
|
|
33
|
-
PAN: 1;
|
|
34
|
-
KEYMOVE: 2;
|
|
35
|
-
ROTATE: 3;
|
|
36
|
-
FLY: 4;
|
|
37
|
-
ORBIT: 5;
|
|
38
|
-
STRAFE: 6;
|
|
39
|
-
}>;
|
|
40
56
|
events: {
|
|
41
57
|
addEventListener: (eventName: string, callback: any) => void;
|
|
42
58
|
removeEventListener: (eventName: string, callback: any) => void;
|
|
@@ -171,6 +187,8 @@ export declare class Webviewer {
|
|
|
171
187
|
} | null>;
|
|
172
188
|
setXRayMode: () => void;
|
|
173
189
|
setNormalMode: () => void;
|
|
190
|
+
setRenderMode: (mode: RenderMode) => void;
|
|
191
|
+
getRenderMode: () => Promise<RenderMode>;
|
|
174
192
|
getObject: (id: number, objectTreeName?: string) => Promise<PublicNode | undefined>;
|
|
175
193
|
getObjects: (objectIds: number[], objectTreeName?: string) => Promise<PublicNode[]>;
|
|
176
194
|
getNumObjectsSelected: (method: string) => Promise<{
|
|
@@ -198,6 +216,8 @@ export declare class Webviewer {
|
|
|
198
216
|
clearObjectTreeFilter: () => Promise<void>;
|
|
199
217
|
getViewpoint: () => Promise<Viewpoint>;
|
|
200
218
|
setViewpoint: (viewpoint: Viewpoint) => Promise<void>;
|
|
219
|
+
getVisibility: () => Promise<Visibility>;
|
|
220
|
+
setVisibility: (visibility: Visibility) => Promise<void>;
|
|
201
221
|
};
|
|
202
222
|
api: {
|
|
203
223
|
getNamesForObjects: (ids: number[]) => Promise<any>;
|
|
@@ -18,14 +18,19 @@ export declare const clientLoadings: {
|
|
|
18
18
|
readonly initialization: `${string}.initialization`;
|
|
19
19
|
readonly download_completed: `${string}.download_completed`;
|
|
20
20
|
};
|
|
21
|
+
export type ModelType = 'standard' | 'partitioned' | undefined;
|
|
21
22
|
export type BimModelsDownloadCompletedPayload = {
|
|
22
23
|
time_to_download: number;
|
|
23
24
|
web_viewer_version: string;
|
|
24
25
|
file_name: string;
|
|
25
26
|
file_type: string;
|
|
26
27
|
input_file_size: number;
|
|
28
|
+
model_type: ModelType;
|
|
29
|
+
model_cached: boolean;
|
|
30
|
+
total_partitions_size?: number;
|
|
31
|
+
total_partitions_size_compressed?: number;
|
|
32
|
+
num_partitions?: number;
|
|
27
33
|
};
|
|
28
|
-
export type ModelType = 'standard' | 'partitioned' | undefined;
|
|
29
34
|
export type ModelInitializationPayload = {
|
|
30
35
|
success: boolean;
|
|
31
36
|
start_timestamp: number;
|
|
@@ -62,6 +67,7 @@ export declare const SECTION_BOX_ORIGIN: {
|
|
|
62
67
|
readonly OBJECT_TREE: "object_tree";
|
|
63
68
|
readonly OBJECT_TREE_ACTIONS: "object_tree_actions";
|
|
64
69
|
readonly SDK: "sdk";
|
|
70
|
+
readonly SDK_VIEWPOINT: "sdk_viewpoint";
|
|
65
71
|
readonly TOOLBAR: "toolbar";
|
|
66
72
|
readonly COACHMARK_SECTIONING: "coachmark_sectioning";
|
|
67
73
|
readonly VIEWS: "views";
|
|
@@ -101,15 +107,13 @@ export declare const modelObjectTrees: {
|
|
|
101
107
|
export declare const renderings: {
|
|
102
108
|
mode_changed: string;
|
|
103
109
|
};
|
|
104
|
-
export declare const
|
|
105
|
-
readonly SHADED: "shaded";
|
|
106
|
-
readonly XRAY: "xray";
|
|
107
|
-
};
|
|
108
|
-
export declare const RENDERING_MODE_ORIGIN: {
|
|
110
|
+
export declare const RENDER_MODE_ORIGIN: {
|
|
109
111
|
readonly OBJECT: "object";
|
|
110
112
|
readonly OBJECT_TREE: "object_tree";
|
|
111
113
|
readonly OBJECT_TREE_ACTIONS: "object_tree_actions";
|
|
112
114
|
readonly SDK: "sdk";
|
|
115
|
+
readonly SDK_VIEWPOINT: "sdk_viewpoint";
|
|
113
116
|
readonly TOOLBAR: "toolbar";
|
|
114
117
|
readonly HOTKEY: "hotkey";
|
|
115
118
|
};
|
|
119
|
+
export type RenderModeOrigin = (typeof RENDER_MODE_ORIGIN)[keyof typeof RENDER_MODE_ORIGIN];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { model, clientLoadings, bimToolbars, sectionBoxes, SECTION_BOX_ORIGIN, SectionBoxOrigin, SectionBoxDisplayPlanesPayload, bimObjects, BIM_OBJECT_ORIGIN, renderings,
|
|
1
|
+
export { model, clientLoadings, bimToolbars, sectionBoxes, SECTION_BOX_ORIGIN, SectionBoxOrigin, SectionBoxDisplayPlanesPayload, bimObjects, BIM_OBJECT_ORIGIN, renderings, RENDER_MODE_ORIGIN, } from './analyticKeys';
|
|
2
2
|
export { trackEvent } from './analyticEvents';
|
|
3
3
|
export { AnalyticEventPayload } from './types/AnalyticEventPayload';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PWF } from '../../pwfreader/PWF';
|
|
2
|
-
import { ModelInitializationPayload, BimModelsDownloadCompletedPayload, InitializationTrackEventPayload } from './analyticKeys';
|
|
2
|
+
import { ModelInitializationPayload, BimModelsDownloadCompletedPayload, InitializationTrackEventPayload, ModelType } from './analyticKeys';
|
|
3
3
|
export declare const getModelMetaData: () => Promise<{
|
|
4
4
|
file_name: string;
|
|
5
5
|
file_type: string;
|
|
@@ -20,4 +20,9 @@ export declare const getInitializationEventPayload: (params: {
|
|
|
20
20
|
export declare const getInitializationTrackEventPayload: (eventPayload: ModelInitializationPayload) => Promise<InitializationTrackEventPayload>;
|
|
21
21
|
export declare const getDownloadCompletedTrackEventPayload: (params: {
|
|
22
22
|
timeToDownload: number;
|
|
23
|
+
modelType: ModelType;
|
|
24
|
+
modelCached: boolean;
|
|
25
|
+
totalPartitionsSize?: number | undefined;
|
|
26
|
+
totalPartitionsSizeCompressed?: number | undefined;
|
|
27
|
+
numPartitions?: number | undefined;
|
|
23
28
|
}) => Promise<BimModelsDownloadCompletedPayload>;
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
export type Viewpoint = {
|
|
2
|
-
camera_data: string;
|
|
3
|
-
sections_data: string;
|
|
4
|
-
redlines_data: string;
|
|
5
|
-
};
|
|
6
|
-
export type ModelRevisionViewpoint = Viewpoint & {
|
|
7
|
-
primary: boolean;
|
|
8
|
-
};
|
|
9
1
|
export type Model = {
|
|
10
2
|
id: number;
|
|
11
3
|
};
|
|
12
|
-
export type ModelRevision = {
|
|
13
|
-
id: number;
|
|
14
|
-
revision: number;
|
|
15
|
-
viewpoints: ModelRevisionViewpoint[];
|
|
16
|
-
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RenderMode } from '../../utils/constants';
|
|
2
|
+
export type Visibility = {
|
|
3
|
+
default_visibility: boolean;
|
|
4
|
+
exceptions: {
|
|
5
|
+
object_ids: number[];
|
|
6
|
+
object_ranges: [number, number][];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export type Viewpoint = {
|
|
10
|
+
camera_data: string;
|
|
11
|
+
sections_data: string;
|
|
12
|
+
redlines_data: string;
|
|
13
|
+
visibility?: Visibility | null;
|
|
14
|
+
render_mode?: RenderMode | null;
|
|
15
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Vector2, Vector3 } from '../../types/Math';
|
|
2
2
|
import type { RenderControllerProxy } from '../../controllers/RenderControllerProxy';
|
|
3
|
-
type RGB = `rgb(${number}, ${number}, ${number})`;
|
|
4
|
-
type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
5
|
-
type HEX = `#${string}`;
|
|
3
|
+
export type RGB = `rgb(${number}, ${number}, ${number})`;
|
|
4
|
+
export type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
5
|
+
export type HEX = `#${string}`;
|
|
6
6
|
export type CssColor = RGB | RGBA | HEX | string;
|
|
7
7
|
export type CssFont = string;
|
|
8
8
|
type Anchorable = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export function RootComponent(options: any, pubsub: any, renderController: any, apiController: any, settingsController: any, sectionBoxDisplayManager: any,
|
|
1
|
+
export function RootComponent(options: any, pubsub: any, renderController: any, apiController: any, settingsController: any, sectionBoxDisplayManager: any, viewpointManager: any): void;
|
|
2
2
|
export class RootComponent {
|
|
3
|
-
constructor(options: any, pubsub: any, renderController: any, apiController: any, settingsController: any, sectionBoxDisplayManager: any,
|
|
3
|
+
constructor(options: any, pubsub: any, renderController: any, apiController: any, settingsController: any, sectionBoxDisplayManager: any, viewpointManager: any);
|
|
4
4
|
options: any;
|
|
5
5
|
pubsub: any;
|
|
6
6
|
render: any;
|
|
7
7
|
sectionBoxDisplayManager: any;
|
|
8
|
-
|
|
8
|
+
viewpointManager: any;
|
|
9
9
|
api: any;
|
|
10
10
|
settings: any;
|
|
11
11
|
sub_components: {};
|
|
@@ -1,32 +1,58 @@
|
|
|
1
|
-
export function ToolBarComponent(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any,
|
|
1
|
+
export function ToolBarComponent(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any): void;
|
|
2
2
|
export class ToolBarComponent {
|
|
3
|
-
constructor(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any,
|
|
3
|
+
constructor(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any);
|
|
4
4
|
options: any;
|
|
5
5
|
pubsub: any;
|
|
6
6
|
render: any;
|
|
7
7
|
sectionBoxDisplayManager: any;
|
|
8
|
-
|
|
8
|
+
viewpointManager: any;
|
|
9
9
|
api: any;
|
|
10
10
|
dom: any;
|
|
11
11
|
toolbarElement: HTMLDivElement | null;
|
|
12
12
|
toolbarMarginTop: number;
|
|
13
13
|
toolStringMap: Readonly<{
|
|
14
|
-
|
|
14
|
+
9: any;
|
|
15
|
+
5: any;
|
|
16
|
+
10: any;
|
|
17
|
+
6: any;
|
|
18
|
+
1: any;
|
|
19
|
+
8: any;
|
|
20
|
+
2: any;
|
|
21
|
+
3: any;
|
|
22
|
+
4: any;
|
|
23
|
+
12: any;
|
|
24
|
+
13: any;
|
|
15
25
|
}>;
|
|
16
26
|
toolIconMap: Readonly<{
|
|
17
|
-
|
|
27
|
+
9: "nav-icon-views";
|
|
28
|
+
5: "nav-icon-objects";
|
|
29
|
+
10: "nav-icon-properties";
|
|
30
|
+
6: "nav-icon-measure";
|
|
31
|
+
1: "nav-icon-cursor-home";
|
|
32
|
+
8: "nav-icon-settings";
|
|
33
|
+
2: "nav-icon-cursor-default";
|
|
34
|
+
3: "nav-icon-cursor-fly";
|
|
35
|
+
4: "nav-icon-cursor-orbit";
|
|
36
|
+
12: "nav-icon-xray-mode";
|
|
37
|
+
13: "nav-icon-section-box";
|
|
18
38
|
}>;
|
|
19
39
|
toolEnumMap: Readonly<{
|
|
20
|
-
|
|
40
|
+
4: 9;
|
|
41
|
+
3: 5;
|
|
42
|
+
12: 10;
|
|
43
|
+
8: 6;
|
|
44
|
+
15: 13;
|
|
45
|
+
14: 12;
|
|
46
|
+
9: 8;
|
|
21
47
|
}>;
|
|
22
48
|
toolTip: HTMLDivElement;
|
|
23
49
|
toolTimeout: NodeJS.Timeout | null;
|
|
24
50
|
createTools(): void;
|
|
25
51
|
createToolTip(): HTMLDivElement;
|
|
26
52
|
setEdges(toolbar: any): void;
|
|
27
|
-
getToolIcon(tool: any):
|
|
53
|
+
getToolIcon(tool: any): any;
|
|
28
54
|
getToolText(tool: any): any;
|
|
29
|
-
getToolBarEnum(tool: any):
|
|
55
|
+
getToolBarEnum(tool: any): any;
|
|
30
56
|
getToolId(tool: any): string;
|
|
31
57
|
createToolBarButton(tool: any, clickFunction?: null): HTMLDivElement;
|
|
32
58
|
createDividerLine(id: any): HTMLDivElement;
|
|
@@ -34,6 +60,7 @@ export class ToolBarComponent {
|
|
|
34
60
|
onResize(): void;
|
|
35
61
|
createNavTools(toolbar: any): void;
|
|
36
62
|
onSectionBoxDisplayToggled(data: any): void;
|
|
63
|
+
onRenderModeChanged(data: any): void;
|
|
37
64
|
onSelectTool(data: any): void;
|
|
38
65
|
selectSectionBoxTool(): Promise<void>;
|
|
39
66
|
ResetNavSelection(): void;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
1
|
+
export declare const TOOL_BAR_TOOLS: {
|
|
2
|
+
readonly NONE: 0;
|
|
3
|
+
readonly HOME: 1;
|
|
4
|
+
readonly NAV_DEFAULT: 2;
|
|
5
|
+
readonly NAV_FLY: 3;
|
|
6
|
+
readonly NAV_ORBIT: 4;
|
|
7
|
+
readonly OBJECT: 5;
|
|
8
|
+
readonly PREMEASURE: 6;
|
|
9
|
+
readonly MEASURE: 7;
|
|
10
|
+
readonly SETTING: 8;
|
|
11
|
+
readonly VIEW: 9;
|
|
12
|
+
readonly PROPERTIES: 10;
|
|
13
|
+
readonly CONTEXT_MENU: 11;
|
|
14
|
+
readonly XRAY_MODE: 12;
|
|
15
|
+
readonly SECTION_BOX: 13;
|
|
16
|
+
};
|
|
17
|
+
export type ToolBarTools = (typeof TOOL_BAR_TOOLS)[keyof typeof TOOL_BAR_TOOLS];
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare const TOOL_ENUM: {
|
|
2
|
+
readonly ALL: 0;
|
|
3
|
+
readonly BOTTOMTOOL: 1;
|
|
4
|
+
readonly FLOORPLAN: 2;
|
|
5
|
+
readonly OBJECTMODELTREE: 3;
|
|
6
|
+
readonly MODELVIEWS: 4;
|
|
7
|
+
readonly COACHMARKS: 5;
|
|
8
|
+
readonly COACHMARKSHIDDEN: 6;
|
|
9
|
+
readonly COACHMARKSECTION: 7;
|
|
10
|
+
readonly MEASUREMENT_SD: 8;
|
|
11
|
+
readonly SETTINGS: 9;
|
|
12
|
+
readonly CONTEXTMENU: 10;
|
|
13
|
+
readonly COACHMARKSFOV: 11;
|
|
14
|
+
readonly VIEW_PROPERTIES: 12;
|
|
15
|
+
readonly LOADING: 13;
|
|
16
|
+
readonly XRAY_MODE: 14;
|
|
17
|
+
readonly SECTION_BOX: 15;
|
|
4
18
|
};
|
|
19
|
+
export type ToolEnum = (typeof TOOL_ENUM)[keyof typeof TOOL_ENUM];
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Markup } from '../Markup';
|
|
2
|
+
import type { RenderControllerProxy } from '../../controllers/RenderControllerProxy';
|
|
3
|
+
import type { SectionBoxDisplayManager } from '../../sectioning/SectionBoxDisplayManager';
|
|
4
|
+
import type { Viewpoint, Visibility } from '../../api/types/Viewpoint';
|
|
5
|
+
import type { RenderModeOrigin, SectionBoxOrigin } from '../../api/analytic_events/analyticKeys';
|
|
6
|
+
type ViewpointOrigins = {
|
|
7
|
+
sectionBox?: SectionBoxOrigin;
|
|
8
|
+
renderMode?: RenderModeOrigin;
|
|
9
|
+
};
|
|
10
|
+
export declare class ViewpointManager {
|
|
11
|
+
private renderController;
|
|
12
|
+
private sectionBoxDisplayManager;
|
|
13
|
+
private markup;
|
|
14
|
+
constructor(params: {
|
|
15
|
+
renderController: RenderControllerProxy;
|
|
16
|
+
sectionBoxDisplayManager: SectionBoxDisplayManager;
|
|
17
|
+
markup: Markup;
|
|
18
|
+
});
|
|
19
|
+
activateHomeViewpoint: () => Promise<void>;
|
|
20
|
+
private activateViewpoint;
|
|
21
|
+
getViewpoint(): Promise<Viewpoint>;
|
|
22
|
+
setViewpoint(viewpoint: Viewpoint, options?: {
|
|
23
|
+
origins?: ViewpointOrigins;
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
setVisibility(visibility: Visibility): Promise<void>;
|
|
26
|
+
getVisibility(): Promise<Visibility>;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
package/dist/types/src/components/{HomeViewpointManager → ViewpointManager}/__tests__/fixtures.d.ts
RENAMED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { Viewpoint } from '../../../api/types/
|
|
1
|
+
import type { Viewpoint } from '../../../api/types/Viewpoint';
|
|
2
2
|
import type { InternalViewpoint } from '../../../viewpoint/types';
|
|
3
3
|
export declare const VIEWPOINT: Viewpoint;
|
|
4
4
|
export declare const VIEWPOINT_NO_SECTION: Viewpoint;
|
|
5
5
|
export declare const VIEWPOINT_NO_REDLINES: Viewpoint;
|
|
6
|
+
export declare const VIEWPOINT_NOTHING_HIDDEN: Viewpoint;
|
|
7
|
+
export declare const VIEWPOINT_NO_RENDER_MODE: Viewpoint;
|
|
6
8
|
export declare const INTERNAL_VIEWPOINT: InternalViewpoint;
|
|
7
9
|
export declare const INTERNAL_VIEWPOINT_NO_SECTION: InternalViewpoint;
|
|
8
10
|
export declare const INTERNAL_VIEWPOINT_NO_REDLINES: InternalViewpoint;
|
|
11
|
+
export declare const INTERNAL_VIEWPOINT_NOTHING_HIDDEN: InternalViewpoint;
|
|
12
|
+
export declare const INTERNAL_VIEWPOINT_NO_RENDER_MODE: InternalViewpoint;
|
|
9
13
|
export declare const homeViewpoint: InternalViewpoint;
|
|
10
14
|
export declare const homeViewpointWithoutRedlinesOrSections: InternalViewpoint;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ViewpointManager } from './ViewpointManager';
|
package/dist/types/src/components/WindowModelObjectComponent/WindowModelObjectComponent.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function WindowModelObjectComponent(options: any, renderController: any, apiController: any, contextMenuEnabled: any): void;
|
|
2
2
|
export class WindowModelObjectComponent {
|
|
3
3
|
constructor(options: any, renderController: any, apiController: any, contextMenuEnabled: any);
|
|
4
|
-
toolId:
|
|
4
|
+
toolId: 3;
|
|
5
5
|
onhideupdate: () => Promise<void>;
|
|
6
6
|
onselectedupdated: (selectedNodeIds: any) => Promise<void>;
|
|
7
7
|
onobjectselectedfrommodel: (payload: any) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function WindowSettingsComponent(options: any, pubsub: any, settings: any): void;
|
|
2
2
|
export class WindowSettingsComponent {
|
|
3
3
|
constructor(options: any, pubsub: any, settings: any);
|
|
4
|
-
toolId:
|
|
4
|
+
toolId: 9;
|
|
5
5
|
settings: any;
|
|
6
6
|
clickEvent: (e: any) => void;
|
|
7
7
|
dispose(): void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export function WindowTreeViewComponent(options: any, api: any, render: any,
|
|
1
|
+
export function WindowTreeViewComponent(options: any, api: any, render: any, viewpointManager: any): void;
|
|
2
2
|
export class WindowTreeViewComponent {
|
|
3
|
-
constructor(options: any, api: any, render: any,
|
|
4
|
-
toolId:
|
|
3
|
+
constructor(options: any, api: any, render: any, viewpointManager: any);
|
|
4
|
+
toolId: 4;
|
|
5
5
|
api: any;
|
|
6
6
|
render: any;
|
|
7
|
-
|
|
7
|
+
viewpointManager: any;
|
|
8
8
|
tree: {};
|
|
9
9
|
folderLevels: {};
|
|
10
10
|
viewpointsDict: {};
|
package/dist/types/src/components/WindowViewPropertiesComponent/WindowViewPropertiesComponent.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function WindowViewPropertiesComponent(options: any, render: any): void;
|
|
2
2
|
export class WindowViewPropertiesComponent {
|
|
3
3
|
constructor(options: any, render: any);
|
|
4
|
-
toolId:
|
|
4
|
+
toolId: 12;
|
|
5
5
|
render: any;
|
|
6
6
|
viewPropertiesId: string;
|
|
7
7
|
searchTerm: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GeometryBundle } from '../types/WebviewerOptions';
|
|
2
2
|
import { FileVersion, PropertiesFile } from '../api/types/FileExtraction';
|
|
3
|
-
import { Model
|
|
3
|
+
import { Model } from '../api/types/Model';
|
|
4
|
+
import { ModelRevision } from '../api/types/ModelRevision';
|
|
4
5
|
export type FileVersionStoreItem = {
|
|
5
6
|
fileId: FileVersion['file_id'];
|
|
6
7
|
fileVersionId: FileVersion['id'];
|
|
@@ -72,6 +72,7 @@ export namespace PubSubController {
|
|
|
72
72
|
propertiesReady: "propertiesReady";
|
|
73
73
|
propertyServiceCheck: "propertyServiceCheck";
|
|
74
74
|
redo: "redo";
|
|
75
|
+
renderModeChanged: "renderModeChanged";
|
|
75
76
|
refreshScene: "refreshScene";
|
|
76
77
|
renderReady: "renderReady";
|
|
77
78
|
rightClick: "rightClick";
|
|
@@ -112,7 +112,7 @@ export class RenderController {
|
|
|
112
112
|
getInitEventPayload(params: any): import("../api/analytic_events/analyticKeys").ModelInitializationPayload;
|
|
113
113
|
launchAnimationLoop(): void;
|
|
114
114
|
captureModelStats(): void;
|
|
115
|
-
init(meshnodeAB: any, nodeAB: any, meshAB: any, manifest: any): Promise<void>;
|
|
115
|
+
init(meshnodeAB: any, nodeAB: any, meshAB: any, manifest: any, downloadMetaData: any): Promise<void>;
|
|
116
116
|
nodeAB: any;
|
|
117
117
|
meshnodeAB: any;
|
|
118
118
|
meshAB: any;
|
|
@@ -120,6 +120,7 @@ export class RenderController {
|
|
|
120
120
|
startTimestamp: number | undefined;
|
|
121
121
|
startTime: number | undefined;
|
|
122
122
|
sceneGraphName: any;
|
|
123
|
+
downloadMetaData: any;
|
|
123
124
|
instantiateGeometryFactory(streaming: any, webGL2Context: any): GeometryFactory;
|
|
124
125
|
onUpdateWithState(data: any): void;
|
|
125
126
|
close(): boolean;
|
|
@@ -196,7 +197,7 @@ export class RenderController {
|
|
|
196
197
|
getRenderer(): import("../procoregl/ViewerRenderer").ViewerRenderer | undefined;
|
|
197
198
|
resizeScene(params: any): void;
|
|
198
199
|
getContextMenuData(evt: any): {
|
|
199
|
-
intersection: import("../
|
|
200
|
+
intersection: import("../sdk").Vector3 | null;
|
|
200
201
|
meshnodeIndex: number;
|
|
201
202
|
} | {
|
|
202
203
|
meshnodeIndex: number;
|
|
@@ -204,7 +205,7 @@ export class RenderController {
|
|
|
204
205
|
onContextMenu(evt: any): void;
|
|
205
206
|
isSectionBlockingClick(): boolean;
|
|
206
207
|
getIntersectionAndMeshnodeIndex(evt: any): {
|
|
207
|
-
intersection: import("../
|
|
208
|
+
intersection: import("../sdk").Vector3 | null;
|
|
208
209
|
meshnodeIndex: number;
|
|
209
210
|
};
|
|
210
211
|
handleMeasurementClick(meshnodeIndex: any): void;
|
|
@@ -229,6 +230,8 @@ export class RenderController {
|
|
|
229
230
|
getHiddenMeshnodeIndices(): any[];
|
|
230
231
|
getHiddenGeoIdsSet(): any;
|
|
231
232
|
addHiddenMeshnodeIndices(arr: any): void;
|
|
233
|
+
setVisibility(params: any): void;
|
|
234
|
+
getVisibility(params: any): any;
|
|
232
235
|
getZoomInterSectPoint(evt: any): {
|
|
233
236
|
x: number;
|
|
234
237
|
y: number;
|
|
@@ -327,7 +330,7 @@ export class RenderController {
|
|
|
327
330
|
removeSectionBox(): void;
|
|
328
331
|
addSectionPlane(params: any): void;
|
|
329
332
|
removeSectionPlane(uuid: any): void;
|
|
330
|
-
getSections(format: any): import("../
|
|
333
|
+
getSections(format: any): import("../sdk").SectionDataProcoreFormat | import("../sdk").SectionDataAutodeskFormat | null;
|
|
331
334
|
clearSection(): void;
|
|
332
335
|
setOptions(options: any): void;
|
|
333
336
|
findFirstObject(meshnodeIndex: any): any;
|
|
@@ -346,7 +349,7 @@ export class RenderController {
|
|
|
346
349
|
y: any;
|
|
347
350
|
z: any;
|
|
348
351
|
}[];
|
|
349
|
-
orbitPoint: import("../
|
|
352
|
+
orbitPoint: import("../sdk").Vector3;
|
|
350
353
|
};
|
|
351
354
|
setMeasureEnabled(enabled: any): void;
|
|
352
355
|
getMeasureEnabled(): boolean;
|
|
@@ -385,12 +388,12 @@ export class RenderController {
|
|
|
385
388
|
getNumNodesHidden(): {
|
|
386
389
|
count: any;
|
|
387
390
|
};
|
|
388
|
-
|
|
389
|
-
|
|
391
|
+
setRenderMode(params: any): void;
|
|
392
|
+
getRenderMode(): string;
|
|
390
393
|
getSelectedNodeIds(): any[];
|
|
391
394
|
getPartiallySelectedNodeIds(): any[];
|
|
392
395
|
toggleSectionBoxDisplay(enable: any): void;
|
|
393
|
-
getSectionBoxDisplayBbox(): import("../
|
|
396
|
+
getSectionBoxDisplayBbox(): import("../sdk").BoundingBox;
|
|
394
397
|
getSectionsAsBox(): import("../sectioning/SectionController").OrientedBox | null;
|
|
395
398
|
zoomToSectionBox(): void;
|
|
396
399
|
resetSectionBox(): void;
|
|
@@ -28,6 +28,15 @@ export class RenderControllerProxy {
|
|
|
28
28
|
logInitializationTimes: any;
|
|
29
29
|
projectId: any;
|
|
30
30
|
baseUrl: any;
|
|
31
|
+
nodeUrl: any;
|
|
32
|
+
meshnodeUrl: any;
|
|
33
|
+
meshUrl: any;
|
|
34
|
+
manifestUrl: any;
|
|
35
|
+
fileExtractionId: any;
|
|
36
|
+
modelId: any;
|
|
37
|
+
modelRevisionId: any;
|
|
38
|
+
companyId: any;
|
|
39
|
+
accessToken: any;
|
|
31
40
|
};
|
|
32
41
|
processPWFArrayBuffers: (arrayBuffers: any, pwfFilePreCached: any) => void;
|
|
33
42
|
messageToEvent: {
|
|
@@ -35,6 +44,10 @@ export class RenderControllerProxy {
|
|
|
35
44
|
'Error: File size exception.': "fileTooBigError";
|
|
36
45
|
};
|
|
37
46
|
handleDownloadError: (message: any) => void;
|
|
47
|
+
downloadMetaData: {
|
|
48
|
+
timeToDownload: number;
|
|
49
|
+
modelCached: boolean;
|
|
50
|
+
};
|
|
38
51
|
navmode: any;
|
|
39
52
|
globalOffset: any;
|
|
40
53
|
createRenderController(): void;
|
|
@@ -128,6 +141,8 @@ export class RenderControllerProxy {
|
|
|
128
141
|
getHiddenGeoIdsSet(): any;
|
|
129
142
|
addHiddenMeshnodeIndices(arr: any): void | Promise<any>;
|
|
130
143
|
removeHiddenGeoIds(arr: any): any;
|
|
144
|
+
setVisibility(params: any): void | Promise<any>;
|
|
145
|
+
getVisibility(params: any): any;
|
|
131
146
|
getOrbitTranslate(evt: any): Promise<any> | {
|
|
132
147
|
translate: {
|
|
133
148
|
x: any;
|
|
@@ -138,7 +153,7 @@ export class RenderControllerProxy {
|
|
|
138
153
|
y: any;
|
|
139
154
|
z: any;
|
|
140
155
|
}[];
|
|
141
|
-
orbitPoint: import("../
|
|
156
|
+
orbitPoint: import("../sdk").Vector3;
|
|
142
157
|
};
|
|
143
158
|
ToScreenPosition(params: any): Promise<any> | {
|
|
144
159
|
x: any;
|
|
@@ -222,7 +237,7 @@ export class RenderControllerProxy {
|
|
|
222
237
|
removeSectionBox(): void;
|
|
223
238
|
addSectionPlane(params: any): void;
|
|
224
239
|
removeSectionPlane(uuid: any): void;
|
|
225
|
-
getSections(format: any): Promise<any> | import("../
|
|
240
|
+
getSections(format: any): Promise<any> | import("../sdk").SectionDataProcoreFormat | import("../sdk").SectionDataAutodeskFormat | null;
|
|
226
241
|
clearSection(): void | Promise<any>;
|
|
227
242
|
setOptions(options: any): void;
|
|
228
243
|
setCanvasSelectionEnabled(params: any): void;
|
|
@@ -260,8 +275,8 @@ export class RenderControllerProxy {
|
|
|
260
275
|
getNumNodesSelected(params: any): Promise<any> | {
|
|
261
276
|
count: any;
|
|
262
277
|
};
|
|
263
|
-
|
|
264
|
-
|
|
278
|
+
setRenderMode(renderMode: any, origin: any): void;
|
|
279
|
+
getRenderMode(): string | Promise<any>;
|
|
265
280
|
getSelectedNodeIds(): any[] | Promise<any>;
|
|
266
281
|
getPartiallySelectedNodeIds(): any[] | Promise<any>;
|
|
267
282
|
toggleSectionBoxDisplay(params: any): void | Promise<any>;
|
|
@@ -274,7 +289,7 @@ export class RenderControllerProxy {
|
|
|
274
289
|
children: number[];
|
|
275
290
|
};
|
|
276
291
|
clearFilteredObjectTree(): void | Promise<any>;
|
|
277
|
-
getSectionBoxDisplayBbox(): Promise<any> | import("../
|
|
292
|
+
getSectionBoxDisplayBbox(): Promise<any> | import("../sdk").BoundingBox;
|
|
278
293
|
getSectionsAsBox(): Promise<any> | import("../sectioning/SectionController").OrientedBox | null;
|
|
279
294
|
setHotkeysEnabled(enabled: any): void;
|
|
280
295
|
partitionUrlsFromMeshnodeIndices(meshnodeIndices: any): any;
|