vim-web 0.3.44-dev.2 → 0.3.44-dev.4
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 -0
- 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/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 +27 -0
- package/dist/types/react-viewers/controlbar/controlBarSection.d.ts +2 -1
- package/dist/types/react-viewers/panels/icons.d.ts +6 -0
- package/dist/types/react-viewers/panels/sectionBoxPanel.d.ts +4 -0
- package/dist/types/react-viewers/state/controlBarState.d.ts +39 -0
- package/dist/types/react-viewers/state/sectionBoxState.d.ts +33 -0
- package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +6 -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/webglSectionBoxState.d.ts +3 -0
- package/dist/vim-web.iife.js +705 -307
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +706 -308
- 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/{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);
|
|
@@ -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
|
*
|
|
@@ -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,27 @@
|
|
|
1
|
+
export declare const elementIds: {
|
|
2
|
+
sectionCamera: string;
|
|
3
|
+
sectionActions: string;
|
|
4
|
+
sectionTools: string;
|
|
5
|
+
sectionSettings: string;
|
|
6
|
+
sectionMeasure: string;
|
|
7
|
+
sectionSectionBox: string;
|
|
8
|
+
buttonCameraOrbit: string;
|
|
9
|
+
buttonCameraLook: string;
|
|
10
|
+
buttonCameraPan: string;
|
|
11
|
+
buttonCameraZoom: string;
|
|
12
|
+
buttonCameraZoomWindow: string;
|
|
13
|
+
buttonProjectInspector: string;
|
|
14
|
+
buttonSettings: string;
|
|
15
|
+
buttonHelp: string;
|
|
16
|
+
buttonMaximize: string;
|
|
17
|
+
buttonToggleIsolation: string;
|
|
18
|
+
buttonZoomToFit: string;
|
|
19
|
+
buttonSectionBox: string;
|
|
20
|
+
buttonMeasure: string;
|
|
21
|
+
buttonSectionBoxEnable: string;
|
|
22
|
+
buttonSectionBoxVisible: string;
|
|
23
|
+
buttonSectionBoxShrinkToSelection: string;
|
|
24
|
+
buttonSectionBoxAuto: string;
|
|
25
|
+
buttonSectionBoxClip: string;
|
|
26
|
+
buttonSectionBoxSettings: string;
|
|
27
|
+
};
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -37,10 +38,15 @@ export declare function frameRect({ height, width, fill, className }: IconOption
|
|
|
37
38
|
export declare function frameSelection({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
38
39
|
export declare function toggleIsolation({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
39
40
|
export declare function measure({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare function sectionBoxSettings({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare function sectionBoxAuto({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare function sectionBoxVisible({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
40
44
|
export declare function sectionBox({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare function sectionBoxDisable({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
41
46
|
export declare function sectionBoxClip({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
42
47
|
export declare function sectionBoxIgnore({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
43
48
|
export declare function sectionBoxReset({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
44
49
|
export declare function sectionBoxShrink({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare function sectionBoxShrink2({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
45
51
|
export declare function ghost({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
46
52
|
export declare function ghostDead({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as VIM from '../../core-viewers/webgl/index';
|
|
2
|
+
import { ComponentCamera } from '../helpers/camera';
|
|
3
|
+
import { CursorManager } from '../helpers/cursor';
|
|
4
|
+
import { Isolation } from '../helpers/isolation';
|
|
5
|
+
import { ComponentSettings } from '../settings/settings';
|
|
6
|
+
import { SideState } from '../sidePanel/sideState';
|
|
7
|
+
import * as Icons from '../panels/icons';
|
|
8
|
+
import { SectionBoxRef } from './sectionBoxState';
|
|
9
|
+
import { ModalRef } from '../panels/modal';
|
|
10
|
+
import * as ControlBar from '../controlbar/controlBar';
|
|
11
|
+
/**
|
|
12
|
+
* Returns a control bar section for the section box.
|
|
13
|
+
*/
|
|
14
|
+
export declare function controlBarSectionBox(section: SectionBoxRef, hasSelection: boolean): ControlBar.IControlBarSection;
|
|
15
|
+
/**
|
|
16
|
+
* Combines all control bar sections into one control bar.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useControlBar(viewer: VIM.Viewer, camera: ComponentCamera, modal: ModalRef, side: SideState, isolation: Isolation, cursor: CursorManager, settings: ComponentSettings, section: SectionBoxRef, customization: ControlBar.ControlBarCustomization | undefined): (ControlBar.IControlBarSection | {
|
|
19
|
+
id: string;
|
|
20
|
+
enable: () => boolean;
|
|
21
|
+
style: string;
|
|
22
|
+
buttons: ({
|
|
23
|
+
id: string;
|
|
24
|
+
enabled: () => boolean;
|
|
25
|
+
tip: string;
|
|
26
|
+
action: () => void;
|
|
27
|
+
icon: typeof Icons.frameSelection;
|
|
28
|
+
isOn: () => boolean;
|
|
29
|
+
style: typeof ControlBar.buttonDefaultStyle;
|
|
30
|
+
} | {
|
|
31
|
+
id: string;
|
|
32
|
+
enabled: () => boolean;
|
|
33
|
+
tip: string;
|
|
34
|
+
action: () => void;
|
|
35
|
+
icon: typeof Icons.toggleIsolation;
|
|
36
|
+
style: typeof ControlBar.buttonDefaultStyle;
|
|
37
|
+
isOn?: undefined;
|
|
38
|
+
})[];
|
|
39
|
+
})[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { ISignal } from 'ste-signals';
|
|
3
|
+
export type Offsets = {
|
|
4
|
+
topOffset: string;
|
|
5
|
+
sideOffset: string;
|
|
6
|
+
bottomOffset: string;
|
|
7
|
+
};
|
|
8
|
+
export type OffsetField = keyof Offsets;
|
|
9
|
+
export interface SectionBoxRef {
|
|
10
|
+
getEnable: () => boolean;
|
|
11
|
+
setEnable: (enable: boolean) => void;
|
|
12
|
+
getVisible: () => boolean;
|
|
13
|
+
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
|
+
getAuto: () => boolean;
|
|
15
|
+
setAuto: (auto: boolean) => void;
|
|
16
|
+
sectionSelection: () => void;
|
|
17
|
+
sectionReset: () => void;
|
|
18
|
+
getOffsetVisible: () => boolean;
|
|
19
|
+
setOffsetsVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
20
|
+
getText: (field: OffsetField) => string;
|
|
21
|
+
setText: (field: OffsetField, value: string) => void;
|
|
22
|
+
validate: (field: OffsetField) => void;
|
|
23
|
+
}
|
|
24
|
+
export interface SectionBoxAdapter {
|
|
25
|
+
setVisible: (visible: boolean) => void;
|
|
26
|
+
getBox: () => THREE.Box3;
|
|
27
|
+
fitBox: (box: THREE.Box3) => void;
|
|
28
|
+
getSelectionBox: () => Promise<THREE.Box3 | undefined>;
|
|
29
|
+
getRendererBox: () => Promise<THREE.Box3>;
|
|
30
|
+
onSelectionChanged: ISignal;
|
|
31
|
+
onSceneChanged: ISignal;
|
|
32
|
+
}
|
|
33
|
+
export declare function useSectionBox(adapter: SectionBoxAdapter): SectionBoxRef;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ControlBarCustomization } from '../controlbar/controlBar';
|
|
2
|
+
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
3
|
+
import * as Ultra from '../../core-viewers/ultra/index';
|
|
4
|
+
export { buttonDefaultStyle, buttonBlueStyle } from '../controlbar/controlBarButton';
|
|
5
|
+
export { sectionDefaultStyle, sectionBlueStyle } from '../controlbar/controlBarSection';
|
|
6
|
+
export declare function useUltraControlBar(viewer: Ultra.Viewer, section: SectionBoxRef, customization: ControlBarCustomization | undefined): import("../controlbar/controlBarSection").IControlBarSection[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ModalRef } from "../panels/modal";
|
|
2
|
+
import * as Ultra from '../../core-viewers/ultra/index';
|
|
3
|
+
export declare function updateModal(modal: ModalRef, state: Ultra.ClientState): void;
|
|
4
|
+
export declare function updateProgress(request: Ultra.ILoadRequest, modal: ModalRef): Promise<void>;
|