vim-web 0.3.44-dev.2 → 0.3.44-dev.21
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/dist/style.css +38 -1
- package/dist/types/core-viewers/ultra/index.d.ts +1 -1
- package/dist/types/core-viewers/ultra/viewer/camera.d.ts +2 -1
- package/dist/types/core-viewers/ultra/viewer/inputs/inputMouse.d.ts +6 -5
- package/dist/types/core-viewers/ultra/viewer/marshal.d.ts +0 -1
- package/dist/types/core-viewers/ultra/viewer/rpcClient.d.ts +1 -0
- package/dist/types/core-viewers/ultra/viewer/rpcSafeClient.d.ts +1 -0
- package/dist/types/core-viewers/ultra/viewer/sectionBox.d.ts +2 -5
- package/dist/types/core-viewers/ultra/viewer/selection.d.ts +2 -0
- package/dist/types/core-viewers/ultra/viewer/viewer.d.ts +2 -0
- package/dist/types/core-viewers/ultra/viewer/vimCollection.d.ts +4 -0
- package/dist/types/core-viewers/webgl/utils/threeUtils.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/gizmos.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBox.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandle.d.ts +2 -0
- package/dist/types/react-viewers/bim/bimPanel.d.ts +3 -3
- package/dist/types/react-viewers/bim/bimTree.d.ts +2 -2
- package/dist/types/react-viewers/controlbar/controlBar.d.ts +6 -44
- package/dist/types/react-viewers/controlbar/controlBarButton.d.ts +3 -1
- package/dist/types/react-viewers/controlbar/controlBarIds.d.ts +29 -0
- package/dist/types/react-viewers/controlbar/controlBarSection.d.ts +2 -1
- package/dist/types/react-viewers/helpers/inputs.d.ts +2 -2
- package/dist/types/react-viewers/helpers/isolation.d.ts +2 -2
- package/dist/types/react-viewers/helpers/reactUtils.d.ts +39 -0
- package/dist/types/react-viewers/index.d.ts +4 -0
- package/dist/types/react-viewers/panels/axesPanel.d.ts +2 -2
- package/dist/types/react-viewers/panels/contextMenu.d.ts +2 -2
- package/dist/types/react-viewers/panels/icons.d.ts +7 -0
- package/dist/types/react-viewers/panels/sectionBoxPanel.d.ts +4 -0
- package/dist/types/react-viewers/state/cameraState.d.ts +22 -0
- package/dist/types/react-viewers/state/controlBarState.d.ts +64 -0
- package/dist/types/react-viewers/state/sectionBoxState.d.ts +30 -0
- package/dist/types/react-viewers/ultra/index.d.ts +1 -0
- package/dist/types/react-viewers/ultra/ultraCameraState.d.ts +2 -0
- package/dist/types/react-viewers/ultra/ultraComponent.d.ts +1 -7
- package/dist/types/react-viewers/ultra/ultraComponentRef.d.ts +36 -0
- package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +19 -0
- package/dist/types/react-viewers/ultra/ultraModal.d.ts +4 -0
- package/dist/types/react-viewers/ultra/ultraSectionBoxState.d.ts +3 -0
- package/dist/types/react-viewers/webgl/index.d.ts +0 -1
- package/dist/types/react-viewers/webgl/webglCameraState.d.ts +2 -0
- package/dist/types/react-viewers/webgl/webglComponentRef.d.ts +7 -2
- package/dist/types/react-viewers/webgl/webglSectionBoxState.d.ts +3 -0
- package/dist/vim-web.iife.js +999 -424
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +1000 -425
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/react-viewers/controlbar/controlBarCommands.d.ts +0 -4
- package/dist/types/react-viewers/controlbar/sectionBoxState.d.ts +0 -15
- package/dist/types/react-viewers/helpers/camera.d.ts +0 -37
- /package/dist/types/react-viewers/{controlbar → panels}/restOfScreen.d.ts +0 -0
- /package/dist/types/react-viewers/{controlbar → state}/fullScreenState.d.ts +0 -0
- /package/dist/types/react-viewers/{controlbar → state}/measureState.d.ts +0 -0
- /package/dist/types/react-viewers/{controlbar → state}/pointerState.d.ts +0 -0
package/dist/style.css
CHANGED
|
@@ -165,7 +165,17 @@
|
|
|
165
165
|
transform: translateX(0%);
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
body {
|
|
169
|
+
position: absolute;
|
|
170
|
+
height: 100%;
|
|
171
|
+
width: 100%;
|
|
172
|
+
margin: 0px;
|
|
173
|
+
padding: 0px;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
}
|
|
176
|
+
canvas:focus {
|
|
177
|
+
outline: none;
|
|
178
|
+
}*, ::before, ::after {
|
|
169
179
|
--tw-border-spacing-x: 0;
|
|
170
180
|
--tw-border-spacing-y: 0;
|
|
171
181
|
--tw-translate-x: 0;
|
|
@@ -779,6 +789,10 @@ video:where(.vim-component,.vim-component *) {
|
|
|
779
789
|
margin-top: 0.25rem;
|
|
780
790
|
margin-bottom: 0.25rem;
|
|
781
791
|
}
|
|
792
|
+
.vc-my-2 {
|
|
793
|
+
margin-top: 0.5rem;
|
|
794
|
+
margin-bottom: 0.5rem;
|
|
795
|
+
}
|
|
782
796
|
.vc-my-6 {
|
|
783
797
|
margin-top: 1.5rem;
|
|
784
798
|
margin-bottom: 1.5rem;
|
|
@@ -819,6 +833,9 @@ video:where(.vim-component,.vim-component *) {
|
|
|
819
833
|
.vc-block {
|
|
820
834
|
display: block;
|
|
821
835
|
}
|
|
836
|
+
.vc-inline {
|
|
837
|
+
display: inline;
|
|
838
|
+
}
|
|
822
839
|
.vc-flex {
|
|
823
840
|
display: flex;
|
|
824
841
|
}
|
|
@@ -858,6 +875,9 @@ video:where(.vim-component,.vim-component *) {
|
|
|
858
875
|
.vc-min-h-0 {
|
|
859
876
|
min-height: 0px;
|
|
860
877
|
}
|
|
878
|
+
.vc-w-1\/2 {
|
|
879
|
+
width: 50%;
|
|
880
|
+
}
|
|
861
881
|
.vc-w-1\/3 {
|
|
862
882
|
width: 33.333333%;
|
|
863
883
|
}
|
|
@@ -1048,6 +1068,9 @@ video:where(.vim-component,.vim-component *) {
|
|
|
1048
1068
|
.\!vc-border-solid {
|
|
1049
1069
|
border-style: solid !important;
|
|
1050
1070
|
}
|
|
1071
|
+
.vc-border-none {
|
|
1072
|
+
border-style: none;
|
|
1073
|
+
}
|
|
1051
1074
|
.\!vc-border-gray-medium {
|
|
1052
1075
|
border-color: var(--c-medium-gray) !important;
|
|
1053
1076
|
}
|
|
@@ -1115,6 +1138,10 @@ video:where(.vim-component,.vim-component *) {
|
|
|
1115
1138
|
.vc-p-6 {
|
|
1116
1139
|
padding: 1.5rem;
|
|
1117
1140
|
}
|
|
1141
|
+
.vc-px-1 {
|
|
1142
|
+
padding-left: 0.25rem;
|
|
1143
|
+
padding-right: 0.25rem;
|
|
1144
|
+
}
|
|
1118
1145
|
.vc-px-2 {
|
|
1119
1146
|
padding-left: 0.5rem;
|
|
1120
1147
|
padding-right: 0.5rem;
|
|
@@ -1401,6 +1428,16 @@ video:where(.vim-component,.vim-component *) {
|
|
|
1401
1428
|
}
|
|
1402
1429
|
|
|
1403
1430
|
@container (width > 0px){
|
|
1431
|
+
.vim-sectionbox-offsets .vc-text-xs{
|
|
1432
|
+
font-size: min(5.5cqmin, 0.8rem);
|
|
1433
|
+
line-height: min(6.5cqmin, 1rem);
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
.vim-sectionbox-offsets .vim-sectionbox-offsets-entry{
|
|
1437
|
+
margin-top: min(3.0cqmin, 0.5rem);
|
|
1438
|
+
margin-bottom: min(3.0cqmin, 0.5rem);
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1404
1441
|
.vim-message-box .vc-text-xs{
|
|
1405
1442
|
font-size: min(5.5cqmin, 0.8rem);
|
|
1406
1443
|
line-height: min(6.5cqmin, 1rem);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import "./style.css";
|
|
1
2
|
export * from './viewer/viewer';
|
|
2
3
|
export * as utils from './utils/promise';
|
|
3
4
|
export * from './viewer/vim';
|
|
4
|
-
export * from './viewer/vim';
|
|
5
5
|
export * from './utils/math3d';
|
|
6
6
|
export * from './viewer/color';
|
|
7
7
|
export type { ILoadRequest, VimRequestErrorType } from './viewer/loadRequest';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box3, Segment } from '../utils/math3d';
|
|
1
|
+
import { Box3, Segment, Vector3 } from '../utils/math3d';
|
|
2
2
|
import { RpcSafeClient } from './rpcSafeClient';
|
|
3
3
|
import { Vim } from './vim';
|
|
4
4
|
/**
|
|
@@ -78,6 +78,7 @@ export declare class Camera implements ICamera {
|
|
|
78
78
|
*/
|
|
79
79
|
onConnect(): void;
|
|
80
80
|
onCameraPose(pose: Segment): void;
|
|
81
|
+
set(position: Vector3, target: Vector3, blendTime?: number): void;
|
|
81
82
|
/**
|
|
82
83
|
* Pauses or resumes rendering
|
|
83
84
|
* @param value - True to pause rendering, false to resume
|
|
@@ -8,14 +8,15 @@ export declare class InputMouse extends InputHandler {
|
|
|
8
8
|
private _lastMouseDownPosition;
|
|
9
9
|
private _selection;
|
|
10
10
|
private _camera;
|
|
11
|
+
private _capture;
|
|
11
12
|
constructor(canvas: HTMLCanvasElement, rpc: RpcSafeClient, selection: ViewerSelection, camera: ICamera);
|
|
12
13
|
register(): void;
|
|
13
14
|
dispose(): void;
|
|
14
|
-
private
|
|
15
|
-
private
|
|
15
|
+
private onPointerDown;
|
|
16
|
+
private onPointerUp;
|
|
16
17
|
private handleMouseClick;
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
18
|
+
private onPointerMove;
|
|
19
|
+
private onDoubleClick;
|
|
20
|
+
private onMouseScroll;
|
|
20
21
|
private relativePosition;
|
|
21
22
|
}
|
|
@@ -28,6 +28,7 @@ export declare class RpcClient {
|
|
|
28
28
|
RPCCreateText(position: Vector3, color: RGBA32, text: string): Promise<number>;
|
|
29
29
|
RPCDestroyMaterialInstances(materialInstanceHandle: number[]): void;
|
|
30
30
|
RPCDestroyText(componentHandle: number): void;
|
|
31
|
+
RPCEnableSectionBox(value: boolean): void;
|
|
31
32
|
RPCFrameAll(blendTime: number): Promise<Segment>;
|
|
32
33
|
RPCFrameBox(box: Box3, blendTime: number): Promise<Segment>;
|
|
33
34
|
RPCFrameInstances(componentHandle: number, nodes: number[], blendTime: number): Promise<Segment>;
|
|
@@ -142,6 +142,7 @@ export declare class RpcSafeClient {
|
|
|
142
142
|
* SECTION BOX METHODS
|
|
143
143
|
* Methods for controlling section box visibility and position.
|
|
144
144
|
******************************************************************************/
|
|
145
|
+
RPCEnableSectionBox(enable: boolean): void;
|
|
145
146
|
RPCSetSectionBox(state: SectionBoxState): void;
|
|
146
147
|
RPCGetSectionBox(): Promise<SectionBoxState | undefined>;
|
|
147
148
|
/*******************************************************************************
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Box3 } from "../utils/math3d";
|
|
2
2
|
import { RpcSafeClient } from "./rpcSafeClient";
|
|
3
3
|
export declare class SectionBox {
|
|
4
|
-
private _enabled;
|
|
5
4
|
private _visible;
|
|
6
5
|
private _interactible;
|
|
7
6
|
private _clip;
|
|
@@ -17,12 +16,10 @@ export declare class SectionBox {
|
|
|
17
16
|
scheduleUpdate(): void;
|
|
18
17
|
private pull;
|
|
19
18
|
private push;
|
|
20
|
-
get enabled(): boolean;
|
|
21
|
-
set enabled(value: boolean);
|
|
22
19
|
get visible(): boolean;
|
|
23
20
|
set visible(value: boolean);
|
|
24
|
-
get
|
|
25
|
-
set
|
|
21
|
+
get interactive(): boolean;
|
|
22
|
+
set interactive(value: boolean);
|
|
26
23
|
get clip(): boolean;
|
|
27
24
|
set clip(value: boolean);
|
|
28
25
|
fitBox(box: Box3): void;
|
|
@@ -30,6 +30,8 @@ export declare class ViewerSelection implements IViewerSelection {
|
|
|
30
30
|
private _rpc;
|
|
31
31
|
private _vims;
|
|
32
32
|
private _selectedNodes;
|
|
33
|
+
private _onValueChanged;
|
|
34
|
+
get onValueChanged(): import("ste-signals").ISignal;
|
|
33
35
|
/**
|
|
34
36
|
* Creates a new ViewerSelection instance.
|
|
35
37
|
* @param rpc - RPC client for communication with the viewer.
|
|
@@ -9,6 +9,7 @@ import { ColorManager } from './colorManager';
|
|
|
9
9
|
import { ICamera } from './camera';
|
|
10
10
|
import { RpcSafeClient, VimSource } from './rpcSafeClient';
|
|
11
11
|
import { ISimpleEvent } from 'ste-simple-events';
|
|
12
|
+
import { ViewerSelection } from './selection';
|
|
12
13
|
import { IReadonlyVimCollection } from './vimCollection';
|
|
13
14
|
import { IRenderer } from './renderer';
|
|
14
15
|
import { SectionBox } from './sectionBox';
|
|
@@ -48,6 +49,7 @@ export declare class Viewer {
|
|
|
48
49
|
get viewport(): IViewport;
|
|
49
50
|
get renderer(): IRenderer;
|
|
50
51
|
get decoder(): IDecoder;
|
|
52
|
+
get selection(): ViewerSelection;
|
|
51
53
|
/**
|
|
52
54
|
* API to create, manage, and destroy colors.
|
|
53
55
|
*/
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { ISignal } from "ste-signals";
|
|
1
2
|
import { Vim } from "./vim";
|
|
2
3
|
export interface IReadonlyVimCollection {
|
|
3
4
|
getFromHandle(handle: number): Vim | undefined;
|
|
4
5
|
getAll(): ReadonlyArray<Vim>;
|
|
5
6
|
getAt(index: number): Vim | undefined;
|
|
6
7
|
count: number;
|
|
8
|
+
onChanged: ISignal;
|
|
7
9
|
}
|
|
8
10
|
export declare class VimCollection implements IReadonlyVimCollection {
|
|
9
11
|
private _vims;
|
|
12
|
+
private _onChanged;
|
|
13
|
+
get onChanged(): ISignal;
|
|
10
14
|
constructor();
|
|
11
15
|
get count(): number;
|
|
12
16
|
/**
|
|
@@ -88,7 +88,7 @@ export declare class SectionBox {
|
|
|
88
88
|
* @param box - The bounding box to match (required).
|
|
89
89
|
* @param padding - The scalar amount by which to expand the bounding box. Default is `1`.
|
|
90
90
|
*/
|
|
91
|
-
fitBox(box: THREE.Box3
|
|
91
|
+
fitBox(box: THREE.Box3): void;
|
|
92
92
|
/**
|
|
93
93
|
* Updates the section box to match the current size of `this.section.box`.
|
|
94
94
|
*
|
|
@@ -8,9 +8,11 @@ export declare class SectionBoxHandle extends THREE.Mesh {
|
|
|
8
8
|
private _color;
|
|
9
9
|
private _highlightColor;
|
|
10
10
|
private _materials;
|
|
11
|
+
private _camera;
|
|
11
12
|
private _camSub;
|
|
12
13
|
constructor(axes: Axis, sign: number, size: number, color?: THREE.Color);
|
|
13
14
|
trackCamera(camera: ICamera): void;
|
|
15
|
+
update(): void;
|
|
14
16
|
setPosition(position: THREE.Vector3): void;
|
|
15
17
|
get forward(): THREE.Vector3;
|
|
16
18
|
highlight(value: boolean): void;
|
|
@@ -5,13 +5,13 @@ import React from 'react';
|
|
|
5
5
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
6
6
|
import { TreeActionRef } from './bimTree';
|
|
7
7
|
import { Isolation } from '../helpers/isolation';
|
|
8
|
-
import {
|
|
8
|
+
import { CameraRef } from '../state/cameraState';
|
|
9
9
|
import { ViewerState } from '../webgl/viewerState';
|
|
10
10
|
import { ComponentSettings } from '../settings/settings';
|
|
11
11
|
import { BimInfoPanelRef } from './bimInfoData';
|
|
12
12
|
export declare function OptionalBimPanel(props: {
|
|
13
13
|
viewer: VIM.Viewer;
|
|
14
|
-
camera:
|
|
14
|
+
camera: CameraRef;
|
|
15
15
|
viewerState: ViewerState;
|
|
16
16
|
isolation: Isolation;
|
|
17
17
|
visible: boolean;
|
|
@@ -30,7 +30,7 @@ export declare function OptionalBimPanel(props: {
|
|
|
30
30
|
*/
|
|
31
31
|
export declare function BimPanel(props: {
|
|
32
32
|
viewer: VIM.Viewer;
|
|
33
|
-
camera:
|
|
33
|
+
camera: CameraRef;
|
|
34
34
|
viewerState: ViewerState;
|
|
35
35
|
isolation: Isolation;
|
|
36
36
|
visible: boolean;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import 'react-complex-tree/lib/style.css';
|
|
6
6
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
7
|
-
import {
|
|
7
|
+
import { CameraRef } from '../state/cameraState';
|
|
8
8
|
import { Isolation } from '../helpers/isolation';
|
|
9
9
|
import { BimTreeData } from './bimTreeData';
|
|
10
10
|
export type TreeActionRef = {
|
|
@@ -23,7 +23,7 @@ export type TreeActionRef = {
|
|
|
23
23
|
export declare function BimTree(props: {
|
|
24
24
|
actionRef: React.MutableRefObject<TreeActionRef>;
|
|
25
25
|
viewer: VIM.Viewer;
|
|
26
|
-
camera:
|
|
26
|
+
camera: CameraRef;
|
|
27
27
|
objects: VIM.Object3D[];
|
|
28
28
|
isolation: Isolation;
|
|
29
29
|
treeData: BimTreeData;
|
|
@@ -1,57 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module viw-webgl-react
|
|
3
3
|
*/
|
|
4
|
-
import * as VIM from '../../core-viewers/webgl/index';
|
|
5
|
-
import { ComponentCamera } from '../helpers/camera';
|
|
6
|
-
import { CursorManager } from '../helpers/cursor';
|
|
7
|
-
import { Isolation } from '../helpers/isolation';
|
|
8
|
-
import { ComponentSettings } from '../settings/settings';
|
|
9
|
-
import { SideState } from '../sidePanel/sideState';
|
|
10
4
|
import { IControlBarSection } from './controlBarSection';
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
export
|
|
5
|
+
export * from './controlBarSection';
|
|
6
|
+
export * from './controlBarButton';
|
|
7
|
+
export * from './controlBarSection';
|
|
8
|
+
export * from './controlBarIds';
|
|
14
9
|
/**
|
|
15
10
|
* A map function that changes the context menu.
|
|
16
11
|
*/
|
|
17
12
|
export type ControlBarCustomization = (e: IControlBarSection[]) => IControlBarSection[];
|
|
18
|
-
export declare const elementIds: {
|
|
19
|
-
sectionCamera: string;
|
|
20
|
-
sectionTools: string;
|
|
21
|
-
sectionSettings: string;
|
|
22
|
-
sectionMeasure: string;
|
|
23
|
-
sectionSectionBox: string;
|
|
24
|
-
buttonCameraOrbit: string;
|
|
25
|
-
buttonCameraLook: string;
|
|
26
|
-
buttonCameraPan: string;
|
|
27
|
-
buttonCameraZoom: string;
|
|
28
|
-
buttonCameraZoomWindow: string;
|
|
29
|
-
buttonCameraZoomToFit: string;
|
|
30
|
-
buttonProjectInspector: string;
|
|
31
|
-
buttonSettings: string;
|
|
32
|
-
buttonHelp: string;
|
|
33
|
-
buttonMaximize: string;
|
|
34
|
-
buttonSectionBox: string;
|
|
35
|
-
buttonMeasure: string;
|
|
36
|
-
buttonToggleIsolation: string;
|
|
37
|
-
buttonMeasureDelete: string;
|
|
38
|
-
buttonMeasureDone: string;
|
|
39
|
-
buttonSectionBoxReset: string;
|
|
40
|
-
buttonSectionBoxShrinkToSelection: string;
|
|
41
|
-
buttonSectionBoxClip: string;
|
|
42
|
-
buttonSectionBoxIgnore: string;
|
|
43
|
-
buttonSectionBoxDone: string;
|
|
44
|
-
};
|
|
45
13
|
/**
|
|
46
14
|
* JSX Component for the control bar.
|
|
47
15
|
*/
|
|
48
16
|
export declare function ControlBar(props: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
modal: ModalRef;
|
|
52
|
-
side: SideState;
|
|
53
|
-
isolation: Isolation;
|
|
54
|
-
cursor: CursorManager;
|
|
55
|
-
settings: ComponentSettings;
|
|
56
|
-
customization: ControlBarCustomization | undefined;
|
|
17
|
+
content: IControlBarSection[];
|
|
18
|
+
show: boolean;
|
|
57
19
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare function buttonDefaultStyle(on: boolean): string;
|
|
2
|
+
export declare function buttonExpandStyle(on: boolean): string;
|
|
3
|
+
export declare function buttonDisableStyle(on: boolean): string;
|
|
2
4
|
export declare function buttonBlueStyle(on: boolean): string;
|
|
3
5
|
export interface IControlBarButtonItem {
|
|
4
6
|
id: string;
|
|
@@ -12,6 +14,6 @@ export interface IControlBarButtonItem {
|
|
|
12
14
|
className: any;
|
|
13
15
|
}) => JSX.Element;
|
|
14
16
|
isOn?: () => boolean;
|
|
15
|
-
style
|
|
17
|
+
style?: (on: boolean) => string;
|
|
16
18
|
}
|
|
17
19
|
export declare function createButton(button: IControlBarButtonItem): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const ids: {
|
|
2
|
+
sectionCamera: string;
|
|
3
|
+
sectionInputs: string;
|
|
4
|
+
sectionActions: string;
|
|
5
|
+
sectionTools: string;
|
|
6
|
+
sectionSettings: string;
|
|
7
|
+
sectionMeasure: string;
|
|
8
|
+
sectionSectionBox: string;
|
|
9
|
+
buttonCameraAuto: string;
|
|
10
|
+
buttonCameraOrbit: string;
|
|
11
|
+
buttonCameraLook: string;
|
|
12
|
+
buttonCameraPan: string;
|
|
13
|
+
buttonCameraZoom: string;
|
|
14
|
+
buttonCameraZoomWindow: string;
|
|
15
|
+
buttonProjectInspector: string;
|
|
16
|
+
buttonSettings: string;
|
|
17
|
+
buttonHelp: string;
|
|
18
|
+
buttonMaximize: string;
|
|
19
|
+
buttonToggleIsolation: string;
|
|
20
|
+
buttonZoomToFit: string;
|
|
21
|
+
buttonSectionBox: string;
|
|
22
|
+
buttonMeasure: string;
|
|
23
|
+
buttonSectionBoxEnable: string;
|
|
24
|
+
buttonSectionBoxVisible: string;
|
|
25
|
+
buttonSectionBoxShrinkToSelection: string;
|
|
26
|
+
buttonSectionBoxAuto: string;
|
|
27
|
+
buttonSectionBoxReset: string;
|
|
28
|
+
buttonSectionBoxSettings: string;
|
|
29
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { IControlBarButtonItem } from './controlBarButton';
|
|
2
2
|
export declare const sectionDefaultStyle: string;
|
|
3
3
|
export declare const sectionBlueStyle: string;
|
|
4
|
+
export declare const sectionNoPadStyle: string;
|
|
4
5
|
export interface IControlBarSection {
|
|
5
6
|
id: string;
|
|
6
7
|
enable?: (() => boolean) | undefined;
|
|
7
8
|
buttons: IControlBarButtonItem[];
|
|
8
|
-
style
|
|
9
|
+
style?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare function createSection(section: IControlBarSection): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
5
5
|
import { SideState } from '../sidePanel/sideState';
|
|
6
|
-
import {
|
|
6
|
+
import { CameraRef } from '../state/cameraState';
|
|
7
7
|
import { Isolation } from './isolation';
|
|
8
8
|
/**
|
|
9
9
|
* Custom viewer input scheme for the vim component
|
|
@@ -14,7 +14,7 @@ export declare class ComponentInputs implements VIM.InputScheme {
|
|
|
14
14
|
private _default;
|
|
15
15
|
private _isolation;
|
|
16
16
|
private _sideState;
|
|
17
|
-
constructor(viewer: VIM.Viewer, camera:
|
|
17
|
+
constructor(viewer: VIM.Viewer, camera: CameraRef, isolation: Isolation, sideState: SideState);
|
|
18
18
|
private _getSelection;
|
|
19
19
|
onMainAction(hit: VIM.InputAction): void;
|
|
20
20
|
onIdleAction(hit: VIM.InputAction): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
2
2
|
import { ComponentSettings } from '../settings/settings';
|
|
3
|
-
import {
|
|
3
|
+
import { CameraRef } from '../state/cameraState';
|
|
4
4
|
import { ISimpleEvent } from 'ste-simple-events';
|
|
5
5
|
/**
|
|
6
6
|
* Manages the isolation mechanic in the VIM component.
|
|
@@ -32,7 +32,7 @@ export declare class Isolation {
|
|
|
32
32
|
* @param camera - A component that handles camera control and framing.
|
|
33
33
|
* @param settings - The settings that control isolation and material usage.
|
|
34
34
|
*/
|
|
35
|
-
constructor(viewer: VIM.Viewer, camera:
|
|
35
|
+
constructor(viewer: VIM.Viewer, camera: CameraRef, settings: ComponentSettings);
|
|
36
36
|
/**
|
|
37
37
|
* Applies relevant settings to the isolation behavior.
|
|
38
38
|
*
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface StateRef<T> {
|
|
2
|
+
get(): T;
|
|
3
|
+
set(value: T): void;
|
|
4
|
+
confirm(): void;
|
|
5
|
+
}
|
|
6
|
+
export declare function useStateRef<T>(initialValue: T): {
|
|
7
|
+
get(): T;
|
|
8
|
+
set: (value: T) => void;
|
|
9
|
+
confirm(): void;
|
|
10
|
+
useOnChange(on: (value: T) => (void | (() => void))): void;
|
|
11
|
+
useMemo<TOut>(on: (value: T) => TOut, deps?: any[]): TOut;
|
|
12
|
+
useValidate(on: (value: T) => T): void;
|
|
13
|
+
useConfirm(on: (value: T) => T): void;
|
|
14
|
+
};
|
|
15
|
+
export interface ActionRef {
|
|
16
|
+
call(): void;
|
|
17
|
+
set(func: () => void): void;
|
|
18
|
+
}
|
|
19
|
+
export declare function useActionRef(action: () => void): ActionRef;
|
|
20
|
+
export interface ArgActionRef<T> {
|
|
21
|
+
call(arg: T): void;
|
|
22
|
+
set(func: (arg: T) => void): void;
|
|
23
|
+
}
|
|
24
|
+
export declare function useArgActionRef<T>(action: (arg: T) => void): ArgActionRef<T>;
|
|
25
|
+
export interface FuncRef<T> {
|
|
26
|
+
call(): T;
|
|
27
|
+
set(func: () => T): void;
|
|
28
|
+
}
|
|
29
|
+
export declare function useFuncRef<T>(func: () => T): FuncRef<T>;
|
|
30
|
+
export interface AsyncFuncRef<T> {
|
|
31
|
+
call(): Promise<T>;
|
|
32
|
+
set(func: () => Promise<T>): void;
|
|
33
|
+
}
|
|
34
|
+
export declare function useAsyncFuncRef<T>(func: () => Promise<T>): AsyncFuncRef<T>;
|
|
35
|
+
export interface ArgFuncRef<TArg, TResult> {
|
|
36
|
+
call(arg: TArg): TResult;
|
|
37
|
+
set(func: (arg: TArg) => TResult): void;
|
|
38
|
+
}
|
|
39
|
+
export declare function useArgFuncRef<TArg, TResult>(func: (arg: TArg) => TResult): ArgFuncRef<TArg, TResult>;
|
|
@@ -5,5 +5,9 @@ export * as ErrorStyle from './errors/errorStyle';
|
|
|
5
5
|
export * as Errors from './errors/errors';
|
|
6
6
|
export * as Urls from './urls';
|
|
7
7
|
export * as Icons from './panels/icons';
|
|
8
|
+
export type { ActionRef, ArgActionRef, ArgFuncRef, AsyncFuncRef, FuncRef, StateRef } from './helpers/reactUtils';
|
|
8
9
|
export type { MessageBoxProps } from './panels/messageBox';
|
|
9
10
|
export * from './container';
|
|
11
|
+
export { type CameraRef } from './state/cameraState';
|
|
12
|
+
export { type SectionBoxRef } from './state/sectionBoxState';
|
|
13
|
+
export * as ControlBar from './controlbar/controlBar';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
6
|
-
import {
|
|
6
|
+
import { CameraRef } from '../state/cameraState';
|
|
7
7
|
import { SettingsState } from '../settings/settingsState';
|
|
8
8
|
/**
|
|
9
9
|
* Memoized version of the AxesPanelMemo.
|
|
@@ -14,7 +14,7 @@ export declare const AxesPanelMemo: React.MemoExoticComponent<typeof AxesPanel>;
|
|
|
14
14
|
*/
|
|
15
15
|
declare function AxesPanel(props: {
|
|
16
16
|
viewer: VIM.Viewer;
|
|
17
|
-
camera:
|
|
17
|
+
camera: CameraRef;
|
|
18
18
|
settings: SettingsState;
|
|
19
19
|
}): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { WebglViewer } from '../..';
|
|
6
6
|
import { Isolation } from '../helpers/isolation';
|
|
7
|
-
import {
|
|
7
|
+
import { CameraRef } from '../state/cameraState';
|
|
8
8
|
import { TreeActionRef } from '../bim/bimTree';
|
|
9
9
|
import { ModalRef } from './modal';
|
|
10
10
|
type ClickCallback = React.MouseEvent<HTMLDivElement, MouseEvent>;
|
|
@@ -65,7 +65,7 @@ export declare const VimContextMenuMemo: React.MemoExoticComponent<typeof VimCon
|
|
|
65
65
|
*/
|
|
66
66
|
export declare function VimContextMenu(props: {
|
|
67
67
|
viewer: WebglViewer.Viewer;
|
|
68
|
-
camera:
|
|
68
|
+
camera: CameraRef;
|
|
69
69
|
modal: ModalRef;
|
|
70
70
|
isolation: Isolation;
|
|
71
71
|
selection: WebglViewer.Object3D[];
|
|
@@ -10,6 +10,7 @@ export type IconOptions = {
|
|
|
10
10
|
fill: string;
|
|
11
11
|
className?: string;
|
|
12
12
|
};
|
|
13
|
+
export declare function slidersHoriz({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export declare function settings({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export declare function help({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export declare function trash({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
@@ -26,6 +27,7 @@ export declare function arrowLeft({ height, width, fill, className }: IconOption
|
|
|
26
27
|
export declare function fullArrowLeft({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
export declare function visible({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
28
29
|
export declare function hidden({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function autoCamera({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
29
31
|
export declare function orbit({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
30
32
|
export declare function look({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
31
33
|
export declare function perspective({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
@@ -37,10 +39,15 @@ export declare function frameRect({ height, width, fill, className }: IconOption
|
|
|
37
39
|
export declare function frameSelection({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
38
40
|
export declare function toggleIsolation({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
39
41
|
export declare function measure({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function sectionBoxSettings({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare function sectionBoxAuto({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare function sectionBoxVisible({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
40
45
|
export declare function sectionBox({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function sectionBoxDisable({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
41
47
|
export declare function sectionBoxClip({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
42
48
|
export declare function sectionBoxIgnore({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
43
49
|
export declare function sectionBoxReset({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
44
50
|
export declare function sectionBoxShrink({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
export declare function sectionBoxShrink2({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
45
52
|
export declare function ghost({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
46
53
|
export declare function ghostDead({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module viw-webgl-react
|
|
3
|
+
*/
|
|
4
|
+
import { THREE } from '../../index';
|
|
5
|
+
import { ActionRef, AsyncFuncRef, StateRef } from '../helpers/reactUtils';
|
|
6
|
+
import { ISignal } from 'ste-signals';
|
|
7
|
+
export interface CameraRef {
|
|
8
|
+
autoCamera: StateRef<boolean>;
|
|
9
|
+
reset: ActionRef;
|
|
10
|
+
frameSelection: AsyncFuncRef<void>;
|
|
11
|
+
frameScene: AsyncFuncRef<void>;
|
|
12
|
+
}
|
|
13
|
+
interface ICameraAdapter {
|
|
14
|
+
onSelectionChanged: ISignal;
|
|
15
|
+
frameCamera: (box: THREE.Box3, duration: number) => void;
|
|
16
|
+
resetCamera: (duration: number) => void;
|
|
17
|
+
frameAll: (duration: number) => void;
|
|
18
|
+
hasSelection: () => boolean;
|
|
19
|
+
getSelectionBox: () => Promise<THREE.Box3>;
|
|
20
|
+
}
|
|
21
|
+
export declare function useCamera(adapter: ICameraAdapter): CameraRef;
|
|
22
|
+
export {};
|