vim-web 0.3.44-dev.16 → 0.3.44-dev.18
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/bim/bimPanel.d.ts +3 -3
- package/dist/types/react-viewers/bim/bimTree.d.ts +2 -2
- package/dist/types/react-viewers/controlbar/controlBarIds.d.ts +4 -2
- package/dist/types/react-viewers/helpers/camera.d.ts +8 -33
- 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/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 +1 -0
- package/dist/types/react-viewers/state/controlBarState.d.ts +14 -2
- package/dist/types/react-viewers/ultra/index.d.ts +2 -0
- package/dist/types/react-viewers/ultra/ultraComponent.d.ts +1 -25
- package/dist/types/react-viewers/ultra/ultraComponentRef.d.ts +31 -0
- package/dist/types/react-viewers/webgl/webglComponentRef.d.ts +2 -2
- package/dist/vim-web.iife.js +239 -183
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +239 -183
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
|
@@ -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 '../helpers/camera';
|
|
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 '../helpers/camera';
|
|
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,10 +1,12 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const ids: {
|
|
2
2
|
sectionCamera: string;
|
|
3
|
+
sectionInputs: string;
|
|
3
4
|
sectionActions: string;
|
|
4
5
|
sectionTools: string;
|
|
5
6
|
sectionSettings: string;
|
|
6
7
|
sectionMeasure: string;
|
|
7
8
|
sectionSectionBox: string;
|
|
9
|
+
buttonCameraAuto: string;
|
|
8
10
|
buttonCameraOrbit: string;
|
|
9
11
|
buttonCameraLook: string;
|
|
10
12
|
buttonCameraPan: string;
|
|
@@ -22,6 +24,6 @@ export declare const elementIds: {
|
|
|
22
24
|
buttonSectionBoxVisible: string;
|
|
23
25
|
buttonSectionBoxShrinkToSelection: string;
|
|
24
26
|
buttonSectionBoxAuto: string;
|
|
25
|
-
|
|
27
|
+
buttonSectionBoxReset: string;
|
|
26
28
|
buttonSectionBoxSettings: string;
|
|
27
29
|
};
|
|
@@ -1,37 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module viw-webgl-react
|
|
3
3
|
*/
|
|
4
|
-
import { WebglViewer
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Resets the camera to its initial position.
|
|
13
|
-
*/
|
|
14
|
-
reset(): void;
|
|
15
|
-
/**
|
|
16
|
-
* Frames selected elements if there is an active selection; otherwise, frames all visible objects.
|
|
17
|
-
* @param duration Optional duration of the camera movement animation (default: 1).
|
|
18
|
-
*/
|
|
19
|
-
frameContext(duration?: number): void;
|
|
20
|
-
/**
|
|
21
|
-
* Frames selected elements if there is an active selection; otherwise, does nothing.
|
|
22
|
-
* @param duration Optional duration of the camera movement animation (default: 1).
|
|
23
|
-
*/
|
|
24
|
-
frameSelection(duration?: number): void;
|
|
25
|
-
/**
|
|
26
|
-
* Frames all visible objects in the scene.
|
|
27
|
-
* @param source Optional VIM to specify the source of objects to frame.
|
|
28
|
-
* @param duration Duration of the camera movement animation (default: 1).
|
|
29
|
-
*/
|
|
30
|
-
frameVisibleObjects(source?: WebglViewer.Vim, duration?: number): void;
|
|
31
|
-
/**
|
|
32
|
-
* Returns the bounding box of all visible objects.
|
|
33
|
-
* @param source Optional VIM to specify the source of visible objects.
|
|
34
|
-
* @returns The bounding box of all visible objects.
|
|
35
|
-
*/
|
|
36
|
-
getVisibleBoundingBox(source?: WebglViewer.Vim): THREE.Box3;
|
|
4
|
+
import { WebglViewer } from '../../index';
|
|
5
|
+
import { ActionRef, StateRef } from './reactUtils';
|
|
6
|
+
export interface CameraRef {
|
|
7
|
+
autoCamera: StateRef<boolean>;
|
|
8
|
+
reset: ActionRef;
|
|
9
|
+
frameSelection: ActionRef;
|
|
10
|
+
frameVisibleObjects: ActionRef;
|
|
37
11
|
}
|
|
12
|
+
export declare function useCamera(viewer: WebglViewer.Viewer): CameraRef;
|
|
@@ -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 './camera';
|
|
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 './camera';
|
|
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
|
*
|
|
@@ -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 '../helpers/camera';
|
|
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 '../helpers/camera';
|
|
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[];
|
|
@@ -27,6 +27,7 @@ export declare function arrowLeft({ height, width, fill, className }: IconOption
|
|
|
27
27
|
export declare function fullArrowLeft({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
export declare function visible({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
29
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;
|
|
30
31
|
export declare function orbit({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
31
32
|
export declare function look({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
32
33
|
export declare function perspective({ height, width, fill, className }: IconOptions): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
2
|
-
import {
|
|
2
|
+
import { CameraRef } from '../helpers/camera';
|
|
3
3
|
import { CursorManager } from '../helpers/cursor';
|
|
4
4
|
import { Isolation } from '../helpers/isolation';
|
|
5
5
|
import { ComponentSettings } from '../settings/settings';
|
|
@@ -15,7 +15,7 @@ export declare function controlBarSectionBox(section: SectionBoxRef, hasSelectio
|
|
|
15
15
|
/**
|
|
16
16
|
* Combines all control bar sections into one control bar.
|
|
17
17
|
*/
|
|
18
|
-
export declare function useControlBar(viewer: VIM.Viewer, camera:
|
|
18
|
+
export declare function useControlBar(viewer: VIM.Viewer, camera: CameraRef, modal: ModalRef, side: SideState, isolation: Isolation, cursor: CursorManager, settings: ComponentSettings, section: SectionBoxRef, customization: ControlBar.ControlBarCustomization | undefined): (ControlBar.IControlBarSection | {
|
|
19
19
|
id: string;
|
|
20
20
|
enable: () => boolean;
|
|
21
21
|
style: string;
|
|
@@ -36,4 +36,16 @@ export declare function useControlBar(viewer: VIM.Viewer, camera: ComponentCamer
|
|
|
36
36
|
style: typeof ControlBar.buttonDefaultStyle;
|
|
37
37
|
isOn?: undefined;
|
|
38
38
|
})[];
|
|
39
|
+
} | {
|
|
40
|
+
id: string;
|
|
41
|
+
enable: () => boolean;
|
|
42
|
+
style: string;
|
|
43
|
+
buttons: {
|
|
44
|
+
id: string;
|
|
45
|
+
tip: string;
|
|
46
|
+
isOn: () => boolean;
|
|
47
|
+
action: () => void;
|
|
48
|
+
icon: typeof Icons.autoCamera;
|
|
49
|
+
style: typeof ControlBar.buttonDefaultStyle;
|
|
50
|
+
}[];
|
|
39
51
|
})[];
|
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
import * as Ultra from '../../core-viewers/ultra/index';
|
|
2
2
|
import { Container } from '../container';
|
|
3
|
-
import {
|
|
4
|
-
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
5
|
-
export type UltraComponentRef = {
|
|
6
|
-
/**
|
|
7
|
-
* The Vim viewer instance associated with the component.
|
|
8
|
-
*/
|
|
9
|
-
viewer: Ultra.Viewer;
|
|
10
|
-
/**
|
|
11
|
-
* API to manage the modal dialog.
|
|
12
|
-
*/
|
|
13
|
-
modal: ModalRef;
|
|
14
|
-
/**
|
|
15
|
-
* API to manage the section box.
|
|
16
|
-
*/
|
|
17
|
-
sectionBox: SectionBoxRef;
|
|
18
|
-
/**
|
|
19
|
-
* Disposes of the component and its resources.
|
|
20
|
-
*/
|
|
21
|
-
dispose: () => void;
|
|
22
|
-
/**
|
|
23
|
-
* Loads a file into the viewer.
|
|
24
|
-
* @param url The URL of the file to load.
|
|
25
|
-
*/
|
|
26
|
-
load(url: Ultra.VimSource): Ultra.ILoadRequest;
|
|
27
|
-
};
|
|
3
|
+
import { UltraComponentRef } from './ultraComponentRef';
|
|
28
4
|
/**
|
|
29
5
|
* Creates a UI container along with a VIM.Viewer and its associated React component.
|
|
30
6
|
* @param container An optional container object. If none is provided, a container will be created.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as Ultra from '../../core-viewers/ultra';
|
|
2
|
+
import { ModalRef } from '../panels/modal';
|
|
3
|
+
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
4
|
+
import { ControlBarRef } from '../webgl/webglComponentRef';
|
|
5
|
+
export type UltraComponentRef = {
|
|
6
|
+
/**
|
|
7
|
+
* The Vim viewer instance associated with the component.
|
|
8
|
+
*/
|
|
9
|
+
viewer: Ultra.Viewer;
|
|
10
|
+
/**
|
|
11
|
+
* API to manage the modal dialog.
|
|
12
|
+
*/
|
|
13
|
+
modal: ModalRef;
|
|
14
|
+
/**
|
|
15
|
+
* API to manage the section box.
|
|
16
|
+
*/
|
|
17
|
+
sectionBox: SectionBoxRef;
|
|
18
|
+
/**
|
|
19
|
+
* API to customize the control.
|
|
20
|
+
*/
|
|
21
|
+
controlBar: ControlBarRef;
|
|
22
|
+
/**
|
|
23
|
+
* Disposes of the component and its resources.
|
|
24
|
+
*/
|
|
25
|
+
dispose: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Loads a file into the viewer.
|
|
28
|
+
* @param url The URL of the file to load.
|
|
29
|
+
*/
|
|
30
|
+
load(url: Ultra.VimSource): Ultra.ILoadRequest;
|
|
31
|
+
};
|
|
@@ -5,7 +5,7 @@ import * as VIM from '../../core-viewers/webgl/index';
|
|
|
5
5
|
import { ContextMenuCustomization } from '../panels/contextMenu';
|
|
6
6
|
import { ComponentSettings } from '../settings/settings';
|
|
7
7
|
import { Isolation } from '../helpers/isolation';
|
|
8
|
-
import {
|
|
8
|
+
import { CameraRef } from '../helpers/camera';
|
|
9
9
|
import { Container } from '../container';
|
|
10
10
|
import { BimInfoPanelRef } from '../bim/bimInfoData';
|
|
11
11
|
import { ControlBarCustomization } from '../controlbar/controlBar';
|
|
@@ -106,7 +106,7 @@ export type VimComponentRef = {
|
|
|
106
106
|
/**
|
|
107
107
|
* Camera API to interact with the viewer camera at a higher level.
|
|
108
108
|
*/
|
|
109
|
-
camera:
|
|
109
|
+
camera: CameraRef;
|
|
110
110
|
/**
|
|
111
111
|
* API To interact with the BIM info panel.
|
|
112
112
|
*/
|