@procore/bim-webviewer-sdk 16.1.0 → 16.2.0-BIM-4755.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 +47 -0
- package/dist/Procore.Bim.Webviewer.d.ts +133 -105
- package/dist/Procore.Bim.Webviewer.js +1 -1
- package/dist/types/src/Webviewer.d.ts +12 -0
- package/dist/types/src/api/types/BimObject.d.ts +3 -0
- package/dist/types/src/components/CoachmarkManagerComponent/CoachmarkComponent.d.ts +2 -0
- package/dist/types/src/components/CoachmarkManagerComponent/CoachmarkManagerComponent.d.ts +21 -1
- package/dist/types/src/components/CoachmarkManagerComponent/Coachmarks.d.ts +1 -8
- package/dist/types/src/components/Markup/SvgRenderer.d.ts +5 -2
- package/dist/types/src/components/Markup/__tests__/fixtures.d.ts +1 -1
- package/dist/types/src/components/RootComponent.d.ts +2 -0
- package/dist/types/src/components/ShortestDistanceComponent.d.ts +1 -0
- package/dist/types/src/components/ToolBarComponent/ToolBarComponent.d.ts +6 -8
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +28 -0
- package/dist/types/src/components/Tooltip/TooltipManager.d.ts +16 -0
- package/dist/types/src/components/Tooltip/__tests__/Tooltip.test.d.ts +2 -0
- package/dist/types/src/components/Tooltip/index.d.ts +2 -0
- package/dist/types/src/components/WindowViewPropertiesComponent/WindowViewPropertiesComponent.d.ts +3 -2
- package/dist/types/src/components/WindowViewPropertiesComponent/__tests__/formatUoms.test.d.ts +1 -0
- package/dist/types/src/components/WindowViewPropertiesComponent/formatUoms.d.ts +3 -0
- package/dist/types/src/controllers/RenderController.d.ts +3 -20
- package/dist/types/src/controllers/RenderControllerProxy.d.ts +3 -19
- package/dist/types/src/controllers/ShortestDistanceController.d.ts +2 -2
- package/dist/types/src/measuring/MeasureToolUtils.d.ts +11 -3
- package/dist/types/src/measuring/PointToPointController.d.ts +7 -6
- package/dist/types/src/measuring/PointToPointManager.d.ts +26 -5
- package/dist/types/src/measuring/__tests__/PointToPointFixtures.d.ts +165 -6
- package/dist/types/src/measuring/createPointToPointManagerDebugGui.d.ts +7 -0
- package/dist/types/src/navigation/DefaultControl.d.ts +7 -0
- package/dist/types/src/procoregl/MeshTopology/HalfEdge.d.ts +8 -0
- package/dist/types/src/procoregl/MeshTopology/MeshTopology.d.ts +6 -3
- package/dist/types/src/procoregl/MeshTopology/Position.d.ts +6 -7
- package/dist/types/src/procoregl/Models/Models.d.ts +13 -11
- package/dist/types/src/pwfreader/PWF.d.ts +2 -2
- package/dist/types/src/pwfreader/pwf/{PWFMeshObject.d.ts → MeshObject.d.ts} +4 -3
- package/dist/types/src/pwfreader/pwf/MeshnodeObject.d.ts +12 -0
- package/dist/types/src/pwfreader/pwf/NodeObject.d.ts +17 -0
- package/dist/types/src/pwfreader/shared/Mesh.d.ts +2 -1
- package/dist/types/src/pwfreader/shared/MeshServices.d.ts +4 -8
- package/dist/types/src/pwfreader/shared/Meshnode.d.ts +2 -12
- package/dist/types/src/pwfreader/shared/Node.d.ts +3 -20
- package/dist/types/src/pwfreader/streaming/StreamedMeshServices.d.ts +3 -2
- package/dist/types/src/pwfreader/streaming/StreamedMeshnode.d.ts +3 -2
- package/dist/types/src/sdk.d.ts +3 -1
- package/dist/types/src/types/PublicNode.d.ts +2 -2
- package/dist/types/src/unit_util.d.ts +46 -0
- package/dist/types/src/utils/MathHelper/MathHelper.d.ts +19 -0
- package/dist/types/src/utils/MathHelper/__tests__/MathHelper.test.d.ts +1 -0
- package/dist/types/src/utils/MathHelper/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/src/pwfreader/pwf/PWFMeshnodeObject.d.ts +0 -11
- package/dist/types/src/pwfreader/pwf/PWFModelObject.d.ts +0 -14
- package/dist/types/src/pwfreader/pwf/PWFNodeObject.d.ts +0 -10
- /package/dist/types/src/{procoregl/MeshTopology/__tests__/Position.test.d.ts → components/Tooltip/__tests__/TooltipManager.test.d.ts} +0 -0
|
@@ -10,6 +10,7 @@ import type { Viewpoint, Visibility } from './api/types/Viewpoint';
|
|
|
10
10
|
import type { CssColor } from './components/Markup/SvgRenderer';
|
|
11
11
|
import { RenderMode } from './utils/constants';
|
|
12
12
|
import { PointToPointManager } from './measuring/PointToPointManager';
|
|
13
|
+
import { Uom, DisplayUnit } from './unit_util';
|
|
13
14
|
export type ResourceDiscriminator = {
|
|
14
15
|
fileExtractionId: number;
|
|
15
16
|
} | {
|
|
@@ -252,11 +253,22 @@ export declare class Webviewer {
|
|
|
252
253
|
removeContextMenuItems: ({ contextMenuItemIds, }: {
|
|
253
254
|
contextMenuItemIds: string[];
|
|
254
255
|
}) => void;
|
|
256
|
+
showCoachmark: (params: {
|
|
257
|
+
id: string;
|
|
258
|
+
label: string;
|
|
259
|
+
buttonLabel: string;
|
|
260
|
+
buttonOnClick: () => void;
|
|
261
|
+
tooltipMessage?: string;
|
|
262
|
+
}) => void;
|
|
263
|
+
hideCoachmark: (coachmarkId: string) => void;
|
|
255
264
|
getSettings: () => {
|
|
256
265
|
displayUnits: string;
|
|
257
266
|
};
|
|
258
267
|
setToolbarHidden: (hidden: boolean) => void;
|
|
259
268
|
setHotkeysEnabled: (enabled: boolean) => void;
|
|
269
|
+
getEquivalentUnitForDisplayUnit: (unit: Uom, displayUnit: DisplayUnit) => Uom;
|
|
270
|
+
convertUnit: (value: number, from: Uom, to: Uom) => number;
|
|
271
|
+
formatUnit: (value: number, unit: Uom) => string;
|
|
260
272
|
};
|
|
261
273
|
constructor(options: Options);
|
|
262
274
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Uom } from '../../unit_util';
|
|
1
2
|
export type BimObject = {
|
|
2
3
|
id: number;
|
|
3
4
|
value: string;
|
|
@@ -7,4 +8,6 @@ export type BimProperty = {
|
|
|
7
8
|
category: string;
|
|
8
9
|
name: string;
|
|
9
10
|
value: string;
|
|
11
|
+
typed_value?: string | number;
|
|
12
|
+
uom?: Uom | null;
|
|
10
13
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { MenuOptionTooltip } from '../DropdownComponent/MenuOptions/MenuOptionTooltip';
|
|
1
2
|
import { CoachmarkProps } from './Coachmarks';
|
|
2
3
|
export declare class CoachmarkComponent {
|
|
3
4
|
element: HTMLElement;
|
|
4
5
|
buttonLabel: HTMLElement;
|
|
5
6
|
button: HTMLElement;
|
|
6
7
|
label: HTMLElement;
|
|
8
|
+
tooltip?: MenuOptionTooltip;
|
|
7
9
|
private id;
|
|
8
10
|
constructor(props: CoachmarkProps);
|
|
9
11
|
setVisible(visible: boolean): void;
|
|
@@ -1,6 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TooltipManager } from '../Tooltip';
|
|
2
|
+
import type { Options } from '../../types/WebviewerOptions';
|
|
3
|
+
import type { RenderController } from '../../controllers/RenderController';
|
|
4
|
+
import type { SectionBoxDisplayManager } from '../../sectioning/SectionBoxDisplayManager';
|
|
2
5
|
import './styles.css';
|
|
6
|
+
export type CoachmarkManagerProps = {
|
|
7
|
+
tools?: Options['tools'];
|
|
8
|
+
renderController: RenderController;
|
|
9
|
+
sectionBoxDisplayManager: SectionBoxDisplayManager;
|
|
10
|
+
locale: string;
|
|
11
|
+
tooltipManager: TooltipManager;
|
|
12
|
+
};
|
|
3
13
|
export declare class CoachmarkManagerComponent {
|
|
4
14
|
element: HTMLElement;
|
|
15
|
+
private customCoachmarks;
|
|
16
|
+
private tooltipManager;
|
|
5
17
|
constructor(props: CoachmarkManagerProps);
|
|
18
|
+
showCustomCoachmark(params: {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
buttonLabel: string;
|
|
22
|
+
buttonOnClick?: () => void;
|
|
23
|
+
tooltipMessage?: string;
|
|
24
|
+
}): void;
|
|
25
|
+
hideCustomCoachmark(id: string): void;
|
|
6
26
|
}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import type { SectionBoxDisplayManager } from '../../sectioning/SectionBoxDisplayManager';
|
|
2
|
-
import type { Options } from '../../types/WebviewerOptions';
|
|
3
1
|
import type { RenderController } from '../../controllers/RenderController';
|
|
4
2
|
export type CoachmarkProps = {
|
|
5
3
|
label: string;
|
|
6
4
|
buttonLabel: string;
|
|
5
|
+
buttonOnClick?: () => void;
|
|
7
6
|
id: string;
|
|
8
7
|
};
|
|
9
8
|
export type CoachmarkExtendedProps = {
|
|
10
9
|
locale: string;
|
|
11
10
|
renderController: RenderController;
|
|
12
11
|
};
|
|
13
|
-
export type CoachmarkManagerProps = {
|
|
14
|
-
tools?: Options['tools'];
|
|
15
|
-
renderController: RenderController;
|
|
16
|
-
sectionBoxDisplayManager: SectionBoxDisplayManager;
|
|
17
|
-
locale: string;
|
|
18
|
-
};
|
|
@@ -34,6 +34,8 @@ export type Line = {
|
|
|
34
34
|
end: Vector2;
|
|
35
35
|
stroke: CssColor;
|
|
36
36
|
strokeWidth: number;
|
|
37
|
+
strokeDasharray?: string;
|
|
38
|
+
opacity?: number;
|
|
37
39
|
zIndex?: number;
|
|
38
40
|
};
|
|
39
41
|
export type Arrow = {
|
|
@@ -69,8 +71,8 @@ export type SvgData = {
|
|
|
69
71
|
rects?: Rect[];
|
|
70
72
|
};
|
|
71
73
|
type AnchoredBoxEllipse = BoxEllipse & Anchorable;
|
|
72
|
-
type AnchoredRadiusEllipse = Omit<RadiusEllipse, 'center'> & Anchorable;
|
|
73
|
-
type AnchoredLine = Omit<Line, 'start' | 'end'> & AnchorableLine;
|
|
74
|
+
export type AnchoredRadiusEllipse = Omit<RadiusEllipse, 'center'> & Anchorable;
|
|
75
|
+
export type AnchoredLine = Omit<Line, 'start' | 'end'> & AnchorableLine;
|
|
74
76
|
type AnchoredArrow = Omit<Arrow, 'start' | 'end'> & AnchorableLine;
|
|
75
77
|
type AnchoredText = Omit<Text, 'origin'> & Anchorable;
|
|
76
78
|
type AnchoredRect = Omit<Rect, 'x' | 'y'> & Anchorable;
|
|
@@ -109,6 +111,7 @@ export declare class SvgRenderer {
|
|
|
109
111
|
drawArrow(arrow: Arrow): void;
|
|
110
112
|
drawText(text: Text): void;
|
|
111
113
|
drawRect(rect: Rect): void;
|
|
114
|
+
private clipLine;
|
|
112
115
|
private _clear;
|
|
113
116
|
clear(): void;
|
|
114
117
|
hasContent(): boolean;
|
|
@@ -2,7 +2,7 @@ import type { RedlinesData } from '../../../viewpoint/types';
|
|
|
2
2
|
import type { SvgData, AnchoredSvgData } from '../SvgRenderer';
|
|
3
3
|
export declare const MARKUP_DRAW_SNAPSHOT = "\n<defs>\n <marker id=\"arrowhead-0\" viewBox=\"0 0 10 10\" refX=\"7\" refY=\"5\" markerWidth=\"6\" markerHeight=\"3\" orient=\" auto-start-reverse\" fill=\"rgb(0, 0, 255)\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\"></path>\n </marker>\n</defs>\n<ellipse stroke=\"rgb(255, 0, 0)\" stroke-width=\"3\" fill=\"none\" cx=\"288.7389312236744\" cy=\"271.2610687763 256\" rx=\"31.26106877632563\" ry=\"31.26106877632563\"></ellipse>\n<ellipse stroke=\"rgb(255, 255, 127.5)\" stroke-width=\"3\" fill=\"none\" cx=\"194.95572489469748\" cy=\"396.3053438816281\" rx=\"62.522137552651245\" ry=\"93.78320632897683\"></ellipse>\n<line stroke=\"rgb(0, 255, 0)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"302.52213755265126\"></line>\n<line stroke=\"rgb(0, 0, 255)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"177.47786244734877\" marker-end=\"url(#arrowhead-0)\"></line>\n<text fill=\"rgb(255, 255, 0)\" x=\"632.6106877632562\" y=\"240\" style=\"font: 21px tahoma;\">text</text>\n";
|
|
4
4
|
export declare const MARKUP_DATA: RedlinesData;
|
|
5
|
-
export declare const SVG_DRAW_SNAPSHOT = "\n<defs>\n <marker id=\"arrowhead-0\" viewBox=\"0 0 10 10\" refX=\"7\" refY=\"5\" markerWidth=\"6\" markerHeight=\"3\" orient=\"auto-start-reverse\" fill=\"rgba(0, 0, 255, 0.5)\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\"></path>\n </marker>\n</defs>\n<ellipse stroke=\"rgba(255, 0, 0, 0.5)\" stroke-width=\"3\" fill=\"none\" cx=\"288.7389312236744\" cy=\"261.2610687763256\" rx=\"31.26106877632563\" ry=\"41.26106877632563\"></ellipse>\n<ellipse stroke=\"rgba(255, 0, 255, 1)\" stroke-width=\"3\" fill=\"rgba(0, 255, 255, 0.5)\" cx=\"288.7389312236744\" cy=\"331.2610687763256\" rx=\"31.26106877632563\" ry=\"31.26106877632563\"></ellipse>\n<ellipse stroke=\"chartreuse\" stroke-width=\"5\" fill=\"dodgerblue\" cx=\"50\" cy=\"50\" rx=\"50\" ry=\"50\"></ellipse>\n<line stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"302.52213755265126\"></line>\n<line stroke=\"rgba(0, 0, 255, 0.5)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"177.47786244734877\" marker-end=\"url(#arrowhead-0)\"></line>\n<text fill=\"rgba(255, 255, 0, 0.5)\" x=\"632.6106877632562\" y=\"240\" style=\"font: 9px verdana;\">text</text>\n<rect width=\"50\" height=\"100\" x=\"250\" y=\"300\" rx=\"10\" ry=\"10\" fill=\"rgba(255, 0, 0, 0.5)\" stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"1\"></rect>\n";
|
|
5
|
+
export declare const SVG_DRAW_SNAPSHOT = "\n<defs>\n <marker id=\"arrowhead-0\" viewBox=\"0 0 10 10\" refX=\"7\" refY=\"5\" markerWidth=\"6\" markerHeight=\"3\" orient=\"auto-start-reverse\" fill=\"rgba(0, 0, 255, 0.5)\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\"></path>\n </marker>\n</defs>\n<ellipse stroke=\"rgba(255, 0, 0, 0.5)\" stroke-width=\"3\" fill=\"none\" cx=\"288.7389312236744\" cy=\"261.2610687763256\" rx=\"31.26106877632563\" ry=\"41.26106877632563\"></ellipse>\n<ellipse stroke=\"rgba(255, 0, 255, 1)\" stroke-width=\"3\" fill=\"rgba(0, 255, 255, 0.5)\" cx=\"288.7389312236744\" cy=\"331.2610687763256\" rx=\"31.26106877632563\" ry=\"31.26106877632563\"></ellipse>\n<ellipse stroke=\"chartreuse\" stroke-width=\"5\" fill=\"dodgerblue\" cx=\"50\" cy=\"50\" rx=\"50\" ry=\"50\"></ellipse>\n<line stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"302.52213755265126\"></line>\n<line stroke=\"olive\" stroke-width=\"3\" x1=\"220\" y1=\"140\" x2=\"532\" y2=\"202\" stroke-dasharray=\"5 5\"></line>\n<line stroke=\"peru\" stroke-width=\"3\" x1=\"120\" y1=\"40\" x2=\"432\" y2=\"102\" opacity=\"0.5\"></line>\n<line stroke=\"rgba(0, 0, 255, 0.5)\" stroke-width=\"3\" x1=\"320\" y1=\"240\" x2=\"632.6106877632562\" y2=\"177.47786244734877\" marker-end=\"url(#arrowhead-0)\"></line>\n<text fill=\"rgba(255, 255, 0, 0.5)\" x=\"632.6106877632562\" y=\"240\" style=\"font: 9px verdana;\">text</text>\n<rect width=\"50\" height=\"100\" x=\"250\" y=\"300\" rx=\"10\" ry=\"10\" fill=\"rgba(255, 0, 0, 0.5)\" stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"1\"></rect>\n";
|
|
6
6
|
export declare const SVG_DATA: SvgData;
|
|
7
7
|
export declare const ANCHORED_SVG_DRAW_SNAPSHOT = "\n<defs>\n <marker id=\"arrowhead-0\" viewBox=\"0 0 10 10\" refX=\"7\" refY=\"5\" markerWidth=\"6\" markerHeight=\"3\" orient=\"auto-start-reverse\" fill=\"rgba(0, 0, 255, 0.5)\">\n <path d=\"M 0 0 L 10 5 L 0 10 z\"></path>\n </marker>\n</defs>\n<ellipse stroke=\"rgba(255, 0, 0, 0.5)\" stroke-width=\"3\" fill=\"none\" cx=\"373.4940062926364\" cy=\"137.2646118814776\" rx=\"25\" ry=\"25\"></ellipse>\n<ellipse stroke=\"rgba(255, 0, 255, 1)\" stroke-width=\"3\" fill=\"rgba(0, 255, 255, 0.5)\" cx=\"377.4935131017527\" cy=\"113.49240793561125\" rx=\"25\" ry=\"25\"></ellipse>\n<ellipse stroke=\"chartreuse\" stroke-width=\"5\" fill=\"dodgerblue\" cx=\"382.13939697834473\" cy=\"85.87827842058752\" rx=\"25\" ry=\"25\"></ellipse>\n<line stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"3\" x1=\"330.83673841037177\" y1=\"97.63705324816502\" x2=\"429.20274232219333\" y2=\"75.09117116380412\"></line>\n<line stroke=\"rgba(0, 0, 255, 0.5)\" stroke-width=\"3\" x1=\"348.3202682243527\" y1=\"68.77844857614542\" x2=\"421.05630132055813\" y2=\"105.55567600126108\" marker-end=\"url(#arrowhead-0)\"></line>\n<text fill=\"rgba(255, 255, 0, 0.5)\" x=\"397.6021287367146\" y=\"63.40898166491502\" style=\"font: 9px verdana;\">text</text>\n<rect width=\"40\" height=\"25\" x=\"374.1179019239718\" y=\"2.180634279826336\" rx=\"10\" ry=\"10\" fill=\"rgba(255, 0, 0, 0.5)\" stroke=\"rgba(0, 255, 0, 0.5)\" stroke-width=\"1\"></rect>\n<ellipse stroke=\"yellow\" stroke-width=\"5\" fill=\"red\" cx=\"392.02368438075905\" cy=\"-42.30962774098606\" rx=\"25\" ry=\"25\"></ellipse>\n<rect width=\"40\" height=\"25\" x=\"382.02368438075905\" y=\"-44.80962774098606\" rx=\"10\" ry=\"10\" fill=\"green\" stroke=\"cyan\" stroke-width=\"5\"></rect>\n<ellipse stroke=\"magenta\" stroke-width=\"5\" fill=\"blue\" cx=\"412.02368438075905\" cy=\"-22.30962774098606\" rx=\"25\" ry=\"25\"></ellipse>\n";
|
|
8
8
|
export declare const ANCHORED_SVG_CAMERA_PARAMS: {
|
|
@@ -14,6 +14,7 @@ export class RootComponent {
|
|
|
14
14
|
window_components: any[];
|
|
15
15
|
disabled: any[];
|
|
16
16
|
statsJS: StatsJS | undefined;
|
|
17
|
+
tooltipManager: TooltipManager;
|
|
17
18
|
init(): void;
|
|
18
19
|
addComponent(ComponentType: any): void;
|
|
19
20
|
close(): void;
|
|
@@ -23,3 +24,4 @@ export class RootComponent {
|
|
|
23
24
|
}
|
|
24
25
|
import { SectionToolDropdown } from "./DropdownComponent";
|
|
25
26
|
import { StatsJS } from "./StatsJS";
|
|
27
|
+
import { TooltipManager } from "./Tooltip";
|
|
@@ -25,6 +25,7 @@ export class ShortestDistanceComponent {
|
|
|
25
25
|
displayUnit: "ftin";
|
|
26
26
|
pivot: import("three").Vector3;
|
|
27
27
|
mouseMove: (event: any) => void;
|
|
28
|
+
onNavigationChanged(data: any): Promise<void>;
|
|
28
29
|
DrawLine(start: any, end: any): void;
|
|
29
30
|
DrawDashedLine(start: any, end: any): void;
|
|
30
31
|
DrawEndpoint(endpoint: any): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function ToolBarComponent(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any): void;
|
|
1
|
+
export function ToolBarComponent(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any, tooltipManager: any): void;
|
|
2
2
|
export class ToolBarComponent {
|
|
3
|
-
constructor(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any);
|
|
3
|
+
constructor(options: any, pubsub: any, render: any, api: any, sectionBoxDisplayManager: any, viewpointManager: any, tooltipManager: any);
|
|
4
4
|
options: any;
|
|
5
5
|
pubsub: any;
|
|
6
6
|
render: any;
|
|
@@ -9,6 +9,8 @@ export class ToolBarComponent {
|
|
|
9
9
|
api: any;
|
|
10
10
|
dom: any;
|
|
11
11
|
toolbarElement: HTMLDivElement | null;
|
|
12
|
+
tooltipManager: any;
|
|
13
|
+
tooltipIds: {};
|
|
12
14
|
toolbarMarginTop: number;
|
|
13
15
|
toolStringMap: Readonly<{
|
|
14
16
|
9: any;
|
|
@@ -45,10 +47,8 @@ export class ToolBarComponent {
|
|
|
45
47
|
14: 12;
|
|
46
48
|
9: 8;
|
|
47
49
|
}>;
|
|
48
|
-
|
|
49
|
-
toolTimeout: NodeJS.Timeout | null;
|
|
50
|
+
toolTimeout: any;
|
|
50
51
|
createTools(): void;
|
|
51
|
-
createToolTip(): HTMLDivElement;
|
|
52
52
|
setEdges(toolbar: any): void;
|
|
53
53
|
getToolIcon(tool: any): any;
|
|
54
54
|
getToolText(tool: any): any;
|
|
@@ -64,9 +64,7 @@ export class ToolBarComponent {
|
|
|
64
64
|
onSelectTool(data: any): void;
|
|
65
65
|
selectSectionBoxTool(): Promise<void>;
|
|
66
66
|
ResetNavSelection(): void;
|
|
67
|
-
|
|
68
|
-
onLeaveToolTip(): void;
|
|
69
|
-
setToolTipPosition(elem: any): void;
|
|
67
|
+
createToolTipContent(elem: any, name: any): string | HTMLDivElement;
|
|
70
68
|
publishSelectedToolEvent(tool: any): void;
|
|
71
69
|
DisableTool(tool: any): void;
|
|
72
70
|
setHidden(hidden: any): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import './styles.css';
|
|
2
|
+
type Position = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
export type TooltipProps = {
|
|
4
|
+
target?: HTMLElement;
|
|
5
|
+
content?: string | HTMLElement;
|
|
6
|
+
position?: Position;
|
|
7
|
+
maxWidth?: number;
|
|
8
|
+
offset?: number;
|
|
9
|
+
};
|
|
10
|
+
export declare class Tooltip {
|
|
11
|
+
static TOOLTIP_ID: string;
|
|
12
|
+
element: HTMLElement;
|
|
13
|
+
target?: HTMLElement;
|
|
14
|
+
private arrowElement;
|
|
15
|
+
private bodyElement;
|
|
16
|
+
private bimMain;
|
|
17
|
+
private positionHorizontal;
|
|
18
|
+
private positionVertical;
|
|
19
|
+
private offsetFromTarget;
|
|
20
|
+
constructor(props?: TooltipProps);
|
|
21
|
+
update(props: TooltipProps): void;
|
|
22
|
+
private setContent;
|
|
23
|
+
private derivePosition;
|
|
24
|
+
show(): void;
|
|
25
|
+
hide(): void;
|
|
26
|
+
private positionAt;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type TooltipProps } from './Tooltip';
|
|
2
|
+
export declare class TooltipManager {
|
|
3
|
+
private tooltip;
|
|
4
|
+
private registrants;
|
|
5
|
+
private showTimeoutId?;
|
|
6
|
+
private nextRegistrantId;
|
|
7
|
+
constructor();
|
|
8
|
+
register(props: TooltipProps & {
|
|
9
|
+
target: HTMLElement;
|
|
10
|
+
showDelay?: number;
|
|
11
|
+
}): number;
|
|
12
|
+
private onTargetMouseEnter;
|
|
13
|
+
private onTargetMouseLeave;
|
|
14
|
+
unregister(tooltipId: number): void;
|
|
15
|
+
dispose(): void;
|
|
16
|
+
}
|
package/dist/types/src/components/WindowViewPropertiesComponent/WindowViewPropertiesComponent.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export function WindowViewPropertiesComponent(options: any, render: any): void;
|
|
1
|
+
export function WindowViewPropertiesComponent(options: any, render: any, settings: any): void;
|
|
2
2
|
export class WindowViewPropertiesComponent {
|
|
3
|
-
constructor(options: any, render: any);
|
|
3
|
+
constructor(options: any, render: any, settings: any);
|
|
4
4
|
toolId: 12;
|
|
5
5
|
render: any;
|
|
6
|
+
settings: any;
|
|
6
7
|
viewPropertiesId: string;
|
|
7
8
|
searchTerm: string;
|
|
8
9
|
searchComponent: SearchInput | null;
|
package/dist/types/src/components/WindowViewPropertiesComponent/__tests__/formatUoms.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -186,7 +186,7 @@ export class RenderController {
|
|
|
186
186
|
} | null;
|
|
187
187
|
getMeshnodeFromNodeId(nodeId: any): import("../pwfreader/shared/Meshnode").Meshnode | import("../pwfreader/shared/Node").Node | null;
|
|
188
188
|
getMeshnodeFromIndex(id: any): import("../pwfreader/shared/Meshnode").Meshnode | null;
|
|
189
|
-
getMeasureObjectMeshes(): import("../pwfreader/
|
|
189
|
+
getMeasureObjectMeshes(): import("../pwfreader/pwf/MeshnodeObject").MeshnodeObject[];
|
|
190
190
|
getCamera(): import("three").PerspectiveCamera;
|
|
191
191
|
getRenderer(): import("../procoregl/ViewerRenderer").ViewerRenderer | undefined;
|
|
192
192
|
resizeScene(params: any): void;
|
|
@@ -242,15 +242,7 @@ export class RenderController {
|
|
|
242
242
|
y: number;
|
|
243
243
|
z: number;
|
|
244
244
|
};
|
|
245
|
-
ToScreenPosition(params: any):
|
|
246
|
-
x: any;
|
|
247
|
-
y: any;
|
|
248
|
-
z: any;
|
|
249
|
-
} | {
|
|
250
|
-
x: any;
|
|
251
|
-
y: any;
|
|
252
|
-
z: any;
|
|
253
|
-
}[];
|
|
245
|
+
ToScreenPosition(params: any): import("../sdk").Vector3 | import("../sdk").Vector3[];
|
|
254
246
|
ConvertScreenPosition(vector: any): {
|
|
255
247
|
x: any;
|
|
256
248
|
y: any;
|
|
@@ -326,7 +318,6 @@ export class RenderController {
|
|
|
326
318
|
unit: string;
|
|
327
319
|
};
|
|
328
320
|
};
|
|
329
|
-
applyGlobalOffset(vector: any): any;
|
|
330
321
|
refreshScene(): void;
|
|
331
322
|
setHiddenSet(params: any): void;
|
|
332
323
|
refreshLighting(): void;
|
|
@@ -345,15 +336,7 @@ export class RenderController {
|
|
|
345
336
|
onUndo(): void;
|
|
346
337
|
onRedo(): void;
|
|
347
338
|
getOrbitTranslate(event: any): {
|
|
348
|
-
translate:
|
|
349
|
-
x: any;
|
|
350
|
-
y: any;
|
|
351
|
-
z: any;
|
|
352
|
-
} | {
|
|
353
|
-
x: any;
|
|
354
|
-
y: any;
|
|
355
|
-
z: any;
|
|
356
|
-
}[];
|
|
339
|
+
translate: import("../sdk").Vector3 | import("../sdk").Vector3[];
|
|
357
340
|
orbitPoint: import("../sdk").Vector3;
|
|
358
341
|
};
|
|
359
342
|
setMeasureEnabled(enabled: any): void;
|
|
@@ -124,7 +124,7 @@ export class RenderControllerProxy {
|
|
|
124
124
|
hideNodesFromNodeIds(...params: any[]): boolean | Promise<any>;
|
|
125
125
|
onResize(...params: any[]): void;
|
|
126
126
|
getMeshnodeFromIndex(...params: any[]): Promise<any> | import("../pwfreader/shared/Meshnode").Meshnode | null;
|
|
127
|
-
getMeasureObjectMeshes(...params: any[]): Promise<any> | import("../pwfreader/
|
|
127
|
+
getMeasureObjectMeshes(...params: any[]): Promise<any> | import("../pwfreader/pwf/MeshnodeObject").MeshnodeObject[];
|
|
128
128
|
onContextMenu(...params: any[]): void | Promise<any>;
|
|
129
129
|
getContextMenuData(...params: any[]): Promise<any> | {
|
|
130
130
|
meshnodeIndex: number;
|
|
@@ -147,26 +147,10 @@ export class RenderControllerProxy {
|
|
|
147
147
|
setVisibility(...params: any[]): void | Promise<any>;
|
|
148
148
|
getVisibility(...params: any[]): Promise<any> | import("../sdk").Visibility;
|
|
149
149
|
getOrbitTranslate(...params: any[]): Promise<any> | {
|
|
150
|
-
translate:
|
|
151
|
-
x: any;
|
|
152
|
-
y: any;
|
|
153
|
-
z: any;
|
|
154
|
-
} | {
|
|
155
|
-
x: any;
|
|
156
|
-
y: any;
|
|
157
|
-
z: any;
|
|
158
|
-
}[];
|
|
150
|
+
translate: import("../sdk").Vector3 | import("../sdk").Vector3[];
|
|
159
151
|
orbitPoint: import("../sdk").Vector3;
|
|
160
152
|
};
|
|
161
|
-
ToScreenPosition(...params: any[]): Promise<any> |
|
|
162
|
-
x: any;
|
|
163
|
-
y: any;
|
|
164
|
-
z: any;
|
|
165
|
-
} | {
|
|
166
|
-
x: any;
|
|
167
|
-
y: any;
|
|
168
|
-
z: any;
|
|
169
|
-
}[];
|
|
153
|
+
ToScreenPosition(...params: any[]): Promise<any> | import("../sdk").Vector3 | import("../sdk").Vector3[];
|
|
170
154
|
ModelToMapSpace(...params: any[]): Promise<any> | {
|
|
171
155
|
x?: undefined;
|
|
172
156
|
y?: undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MeshnodeObject } from '../pwfreader/
|
|
2
|
-
import { Models } from '../procoregl/Models
|
|
1
|
+
import { MeshnodeObject } from '../pwfreader/pwf/MeshnodeObject';
|
|
2
|
+
import { Models } from '../procoregl/Models';
|
|
3
3
|
export declare class ShortestDistanceController {
|
|
4
4
|
private measureSet;
|
|
5
5
|
private models;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Vector3 } from '../types/Math';
|
|
2
|
+
import { MeshTopology } from '../procoregl/MeshTopology';
|
|
2
3
|
export declare const SNAP_TYPE: {
|
|
3
4
|
readonly surface: "surface";
|
|
4
5
|
readonly midpoint: "midpoint";
|
|
@@ -11,7 +12,9 @@ export declare function getIntersectionSnapAndOutline(params: {
|
|
|
11
12
|
matrixWorld: THREE.Matrix4;
|
|
12
13
|
meshTopology: MeshTopology;
|
|
13
14
|
intersectionFaceNormal: THREE.Vector3;
|
|
14
|
-
|
|
15
|
+
camera: THREE.PerspectiveCamera;
|
|
16
|
+
canvasWidth: number;
|
|
17
|
+
canvasHeight: number;
|
|
15
18
|
outlineOptions: {
|
|
16
19
|
hideDifferentFaceNormal: boolean;
|
|
17
20
|
hideNonCoplanar: boolean;
|
|
@@ -27,8 +30,10 @@ export declare function getIntersectionSnapAndOutline(params: {
|
|
|
27
30
|
start: THREE.Vector3;
|
|
28
31
|
end: THREE.Vector3;
|
|
29
32
|
}[];
|
|
33
|
+
cursorRotation: Vector3;
|
|
34
|
+
snapScreenPosition: Vector3 | null;
|
|
30
35
|
};
|
|
31
|
-
export declare function detectSnapFeature(intersectPoint: THREE.Vector3, line: THREE.Line3): {
|
|
36
|
+
export declare function detectSnapFeature(intersectPoint: THREE.Vector3, line: THREE.Line3, cameraPosition: THREE.Vector3): {
|
|
32
37
|
detectedSnapType: SnapType;
|
|
33
38
|
detectedSnapPosition: THREE.Vector3;
|
|
34
39
|
};
|
|
@@ -36,3 +41,6 @@ export declare function getNormalFromPoints(point1: THREE.Vector3, point2: THREE
|
|
|
36
41
|
export declare function isNormalFacingCamera(normal: THREE.Vector3, cameraDirection: THREE.Vector3): boolean;
|
|
37
42
|
export declare function arePlanesCoplanar(normal1: THREE.Vector3, point1: THREE.Vector3, normal2: THREE.Vector3, point2: THREE.Vector3): boolean;
|
|
38
43
|
export declare function areNormalsSimilar(normal1: THREE.Vector3, normal2: THREE.Vector3): boolean;
|
|
44
|
+
export declare function getSurfaceCursorAngle(camera: THREE.PerspectiveCamera, faceNormal: THREE.Vector3, intersection: THREE.Vector3, canvasWidth: number, canvasHeight: number): Vector3;
|
|
45
|
+
export declare function getEdgeCursorAngle(start: Vector3, end: Vector3, camera: THREE.PerspectiveCamera, canvasWidth: number, canvasHeight: number): number;
|
|
46
|
+
export declare function arePointsCollinear(p1: THREE.Vector3, p2: THREE.Vector3, p3: THREE.Vector3): boolean;
|
|
@@ -2,46 +2,47 @@ import type { PickingController } from '../picking/PickingController';
|
|
|
2
2
|
import type { Models } from '../procoregl/Models';
|
|
3
3
|
import { Vector3 } from '../types/Math';
|
|
4
4
|
import type { SnapType } from './MeasureToolUtils';
|
|
5
|
+
import type { ViewerRenderer } from '../procoregl/ViewerRenderer';
|
|
5
6
|
export type WorldIntersectionSnapResult = {
|
|
6
7
|
intersection: Vector3;
|
|
7
|
-
viewProjectionMatrix: number[];
|
|
8
8
|
snapType: SnapType;
|
|
9
9
|
snapPosition: Vector3;
|
|
10
10
|
snapEdge: {
|
|
11
11
|
start: Vector3;
|
|
12
12
|
end: Vector3;
|
|
13
13
|
} | null;
|
|
14
|
-
faceNormal: Vector3;
|
|
15
14
|
boundaryEdges: {
|
|
16
15
|
start: Vector3;
|
|
17
16
|
end: Vector3;
|
|
18
17
|
}[];
|
|
19
18
|
meshnodeIndex: number;
|
|
19
|
+
cursorRotation: Vector3;
|
|
20
|
+
snapScreenPosition: Vector3 | null;
|
|
20
21
|
};
|
|
21
22
|
export declare class PointToPointController {
|
|
22
23
|
private pickingController;
|
|
23
24
|
private models;
|
|
24
|
-
private camera;
|
|
25
|
+
private readonly camera;
|
|
25
26
|
private currentHoverMeshnodeIndex;
|
|
26
27
|
private meshTopologyCache;
|
|
27
28
|
private _enabled;
|
|
28
|
-
private globalOffset;
|
|
29
|
+
private readonly globalOffset;
|
|
29
30
|
private prevLastWorldIntersectionSnapResult;
|
|
30
31
|
private lastWorldIntersectionSnapResult;
|
|
31
32
|
private debugGui;
|
|
33
|
+
private viewerRenderer;
|
|
32
34
|
constructor(params: {
|
|
33
35
|
pickingController: PickingController;
|
|
34
36
|
models: Models;
|
|
35
37
|
camera: THREE.PerspectiveCamera;
|
|
36
38
|
globalOffset: THREE.Vector3;
|
|
39
|
+
viewerRenderer: ViewerRenderer;
|
|
37
40
|
});
|
|
38
41
|
get enabled(): boolean;
|
|
39
42
|
set enabled(value: boolean);
|
|
40
43
|
handleMouseClick(): void;
|
|
41
44
|
handleMouseMove(event: MouseEvent): void;
|
|
42
45
|
private getWorldIntersectionSnapResult;
|
|
43
|
-
private calculateViewProjectionMatrix;
|
|
44
|
-
private applyGlobalOffset;
|
|
45
46
|
private publishIntersectionSnapResult;
|
|
46
47
|
private getMeshTopology;
|
|
47
48
|
private meshnodeTooComplex;
|
|
@@ -1,21 +1,42 @@
|
|
|
1
1
|
import { SvgRenderer } from '../components/Markup/SvgRenderer';
|
|
2
|
-
import { Vector3 } from '../types/Math';
|
|
3
|
-
import type { WorldIntersectionSnapResult } from './PointToPointController';
|
|
4
2
|
import type { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
5
3
|
export declare class PointToPointManager {
|
|
6
4
|
private svgRenderer;
|
|
7
5
|
private renderControllerProxy;
|
|
8
6
|
private static pointToPointEnabled;
|
|
7
|
+
private firstMeasurePoint;
|
|
8
|
+
private secondMeasurePoint;
|
|
9
|
+
private outlines;
|
|
10
|
+
private intersection;
|
|
11
|
+
private pivot;
|
|
12
|
+
private dist;
|
|
13
|
+
private xDist;
|
|
14
|
+
private yDist;
|
|
15
|
+
private zDist;
|
|
16
|
+
private gui;
|
|
17
|
+
private globalOffset;
|
|
9
18
|
constructor(params: {
|
|
10
19
|
renderControllerProxy: RenderControllerProxy;
|
|
11
20
|
svgRenderer: SvgRenderer;
|
|
21
|
+
globalOffset: {
|
|
22
|
+
offsetX: number;
|
|
23
|
+
offsetY: number;
|
|
24
|
+
offsetZ: number;
|
|
25
|
+
};
|
|
12
26
|
});
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
27
|
+
private onSelectTool;
|
|
28
|
+
private onNavigationChanged;
|
|
29
|
+
private onMeasurementObjectMove;
|
|
30
|
+
private onMeasurementObjectLeave;
|
|
31
|
+
private onMeasurementObjectClick;
|
|
32
|
+
private resetMeasurement;
|
|
33
|
+
private calculateDistances;
|
|
16
34
|
static isEnabled(): boolean;
|
|
17
35
|
togglePointToPoint(params: {
|
|
18
36
|
enable: boolean;
|
|
19
37
|
}): void;
|
|
38
|
+
private setCameraAndNavigationControls;
|
|
39
|
+
private updateSvg;
|
|
20
40
|
private createLine;
|
|
41
|
+
private createEllipse;
|
|
21
42
|
}
|