vim-web 0.3.44-dev.36 → 0.3.44-dev.37
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/types/react-viewers/state/controlBarState.d.ts +23 -0
- package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +4 -3
- package/dist/types/react-viewers/{helpers/componentInputs.d.ts → ultra/ultraInputs.d.ts} +2 -2
- package/dist/types/react-viewers/webgl/webgInputs.d.ts +22 -0
- package/dist/vim-web.iife.js +23 -4
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +23 -4
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,12 +6,35 @@ import { ComponentSettings } from '../settings/settings';
|
|
|
6
6
|
import { SideState } from '../sidePanel/sideState';
|
|
7
7
|
import * as Icons from '../panels/icons';
|
|
8
8
|
import { SectionBoxRef } from './sectionBoxState';
|
|
9
|
+
import { getMeasureState } from './measureState';
|
|
9
10
|
import { ModalRef } from '../panels/modal';
|
|
10
11
|
import * as ControlBar from '../controlbar/controlBar';
|
|
11
12
|
/**
|
|
12
13
|
* Returns a control bar section for the section box.
|
|
13
14
|
*/
|
|
14
15
|
export declare function controlBarSectionBox(section: SectionBoxRef, hasSelection: boolean): ControlBar.IControlBarSection;
|
|
16
|
+
export declare function controlBarActions(camera: CameraRef, settings: ComponentSettings, isolation: Isolation, measure: ReturnType<typeof getMeasureState>): {
|
|
17
|
+
id: string;
|
|
18
|
+
enable: () => boolean;
|
|
19
|
+
style: string;
|
|
20
|
+
buttons: ({
|
|
21
|
+
id: string;
|
|
22
|
+
enabled: () => boolean;
|
|
23
|
+
tip: string;
|
|
24
|
+
action: () => void;
|
|
25
|
+
icon: typeof Icons.toggleIsolation;
|
|
26
|
+
style: typeof ControlBar.buttonDefaultStyle;
|
|
27
|
+
isOn?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
id: string;
|
|
30
|
+
enabled: () => boolean;
|
|
31
|
+
isOn: () => boolean;
|
|
32
|
+
tip: string;
|
|
33
|
+
action: () => void;
|
|
34
|
+
icon: typeof Icons.measure;
|
|
35
|
+
style: typeof ControlBar.buttonDefaultStyle;
|
|
36
|
+
})[];
|
|
37
|
+
};
|
|
15
38
|
export declare function controlBarCamera(camera: CameraRef): {
|
|
16
39
|
id: string;
|
|
17
40
|
enable: () => boolean;
|
|
@@ -2,9 +2,10 @@ import { ControlBarCustomization } from '../controlbar/controlBar';
|
|
|
2
2
|
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
3
3
|
import * as Ultra from '../../core-viewers/ultra/index';
|
|
4
4
|
import { CameraRef } from '../state/cameraState';
|
|
5
|
+
import { ControlBar, Icons } from '..';
|
|
5
6
|
export { buttonDefaultStyle, buttonBlueStyle } from '../controlbar/controlBarButton';
|
|
6
7
|
export { sectionDefaultStyle, sectionBlueStyle } from '../controlbar/controlBarSection';
|
|
7
|
-
export declare function useUltraControlBar(viewer: Ultra.Viewer, section: SectionBoxRef, camera: CameraRef, customization: ControlBarCustomization | undefined): (
|
|
8
|
+
export declare function useUltraControlBar(viewer: Ultra.Viewer, section: SectionBoxRef, camera: CameraRef, customization: ControlBarCustomization | undefined): (ControlBar.IControlBarSection | {
|
|
8
9
|
id: string;
|
|
9
10
|
enable: () => boolean;
|
|
10
11
|
style: string;
|
|
@@ -13,7 +14,7 @@ export declare function useUltraControlBar(viewer: Ultra.Viewer, section: Sectio
|
|
|
13
14
|
tip: string;
|
|
14
15
|
isOn: () => boolean;
|
|
15
16
|
action: () => void;
|
|
16
|
-
icon: typeof
|
|
17
|
-
style: typeof
|
|
17
|
+
icon: typeof Icons.autoCamera;
|
|
18
|
+
style: typeof ControlBar.buttonDefaultStyle;
|
|
18
19
|
}[];
|
|
19
20
|
})[];
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
5
5
|
import { SideState } from '../sidePanel/sideState';
|
|
6
6
|
import { CameraRef } from '../state/cameraState';
|
|
7
|
-
import { Isolation } from '
|
|
7
|
+
import { Isolation } from '../helpers/isolation';
|
|
8
8
|
/**
|
|
9
9
|
* Custom viewer input scheme for the vim component
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class UltraInputs implements VIM.InputScheme {
|
|
12
12
|
private _viewer;
|
|
13
13
|
private _camera;
|
|
14
14
|
private _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module viw-webgl-react
|
|
3
|
+
*/
|
|
4
|
+
import * as VIM from '../../core-viewers/webgl/index';
|
|
5
|
+
import { SideState } from '../sidePanel/sideState';
|
|
6
|
+
import { CameraRef } from '../state/cameraState';
|
|
7
|
+
import { Isolation } from '../helpers/isolation';
|
|
8
|
+
/**
|
|
9
|
+
* Custom viewer input scheme for the vim component
|
|
10
|
+
*/
|
|
11
|
+
export declare class WebglInputs implements VIM.InputScheme {
|
|
12
|
+
private _viewer;
|
|
13
|
+
private _camera;
|
|
14
|
+
private _default;
|
|
15
|
+
private _isolation;
|
|
16
|
+
private _sideState;
|
|
17
|
+
constructor(viewer: VIM.Viewer, camera: CameraRef, isolation: Isolation, sideState: SideState);
|
|
18
|
+
private _getSelection;
|
|
19
|
+
onMainAction(hit: VIM.InputAction): void;
|
|
20
|
+
onIdleAction(hit: VIM.InputAction): void;
|
|
21
|
+
onKeyAction(key: number): boolean;
|
|
22
|
+
}
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -68074,7 +68074,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
68074
68074
|
{
|
|
68075
68075
|
id: ids.buttonZoomToFit,
|
|
68076
68076
|
enabled: () => isTrue(settings2.ui.zoomToFit),
|
|
68077
|
-
tip: "
|
|
68077
|
+
tip: "Frame Camera",
|
|
68078
68078
|
action: () => camera2.frameSelection.call(),
|
|
68079
68079
|
icon: frameSelection,
|
|
68080
68080
|
isOn: () => false,
|
|
@@ -74763,7 +74763,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74763
74763
|
}
|
|
74764
74764
|
animate();
|
|
74765
74765
|
}
|
|
74766
|
-
class
|
|
74766
|
+
class WebglInputs {
|
|
74767
74767
|
constructor(viewer, camera2, isolation, sideState) {
|
|
74768
74768
|
__publicField(this, "_viewer");
|
|
74769
74769
|
__publicField(this, "_camera");
|
|
@@ -76114,7 +76114,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76114
76114
|
}
|
|
76115
76115
|
cursor.register();
|
|
76116
76116
|
props.viewer.viewport.canvas.tabIndex = 0;
|
|
76117
|
-
props.viewer.inputs.scheme = new
|
|
76117
|
+
props.viewer.inputs.scheme = new WebglInputs(
|
|
76118
76118
|
props.viewer,
|
|
76119
76119
|
camera2,
|
|
76120
76120
|
isolation,
|
|
@@ -76562,10 +76562,29 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76562
76562
|
function useUltraControlBar(viewer, section, camera2, customization) {
|
|
76563
76563
|
const sectionSectionBox = controlBarSectionBox(section, viewer.selection.count > 0);
|
|
76564
76564
|
const sectionCamera = controlBarCamera(camera2);
|
|
76565
|
-
|
|
76565
|
+
const frame = frameSection(camera2);
|
|
76566
|
+
let bar = [sectionCamera, frame, sectionSectionBox];
|
|
76566
76567
|
bar = (customization == null ? void 0 : customization(bar)) ?? bar;
|
|
76567
76568
|
return bar;
|
|
76568
76569
|
}
|
|
76570
|
+
function frameSection(camera2) {
|
|
76571
|
+
return {
|
|
76572
|
+
id: ids.sectionActions,
|
|
76573
|
+
enable: () => true,
|
|
76574
|
+
style: sectionDefaultStyle,
|
|
76575
|
+
buttons: [
|
|
76576
|
+
{
|
|
76577
|
+
id: ids.buttonZoomToFit,
|
|
76578
|
+
enabled: () => true,
|
|
76579
|
+
tip: "Frame Camera",
|
|
76580
|
+
action: () => camera2.frameSelection.call(),
|
|
76581
|
+
icon: frameSelection,
|
|
76582
|
+
isOn: () => false,
|
|
76583
|
+
style: buttonDefaultStyle
|
|
76584
|
+
}
|
|
76585
|
+
]
|
|
76586
|
+
};
|
|
76587
|
+
}
|
|
76569
76588
|
function useUltraCamera(viewer, section) {
|
|
76570
76589
|
return useCamera({
|
|
76571
76590
|
onSelectionChanged: viewer.selection.onValueChanged,
|