vim-web 0.3.44-dev.18 → 0.3.44-dev.19
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/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/webgl/viewer/gizmos/sectionBox/sectionBoxHandle.d.ts +2 -0
- package/dist/types/react-viewers/bim/bimPanel.d.ts +1 -1
- package/dist/types/react-viewers/bim/bimTree.d.ts +1 -1
- package/dist/types/react-viewers/helpers/inputs.d.ts +1 -1
- package/dist/types/react-viewers/helpers/isolation.d.ts +1 -1
- package/dist/types/react-viewers/panels/axesPanel.d.ts +1 -1
- package/dist/types/react-viewers/panels/contextMenu.d.ts +1 -1
- package/dist/types/react-viewers/state/cameraState.d.ts +22 -0
- package/dist/types/react-viewers/state/controlBarState.d.ts +18 -5
- package/dist/types/react-viewers/state/sectionBoxState.d.ts +0 -1
- package/dist/types/react-viewers/ultra/ultraCameraState.d.ts +2 -0
- package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +14 -1
- package/dist/types/react-viewers/webgl/webglCameraState.d.ts +2 -0
- package/dist/types/react-viewers/webgl/webglComponentRef.d.ts +1 -1
- package/dist/vim-web.iife.js +231 -165
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +231 -165
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/react-viewers/helpers/camera.d.ts +0 -12
|
@@ -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
|
}
|
|
@@ -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,7 +5,7 @@ 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 { CameraRef } from '../
|
|
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';
|
|
@@ -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 { CameraRef } from '../
|
|
7
|
+
import { CameraRef } from '../state/cameraState';
|
|
8
8
|
import { Isolation } from '../helpers/isolation';
|
|
9
9
|
import { BimTreeData } from './bimTreeData';
|
|
10
10
|
export type TreeActionRef = {
|
|
@@ -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 { CameraRef } from '
|
|
6
|
+
import { CameraRef } from '../state/cameraState';
|
|
7
7
|
import { Isolation } from './isolation';
|
|
8
8
|
/**
|
|
9
9
|
* Custom viewer input scheme for the vim component
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
2
2
|
import { ComponentSettings } from '../settings/settings';
|
|
3
|
-
import { CameraRef } from '
|
|
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.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
6
|
-
import { CameraRef } from '../
|
|
6
|
+
import { CameraRef } from '../state/cameraState';
|
|
7
7
|
import { SettingsState } from '../settings/settingsState';
|
|
8
8
|
/**
|
|
9
9
|
* Memoized version of the AxesPanelMemo.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { WebglViewer } from '../..';
|
|
6
6
|
import { Isolation } from '../helpers/isolation';
|
|
7
|
-
import { CameraRef } from '../
|
|
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>;
|
|
@@ -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 {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
2
|
-
import { CameraRef } from '
|
|
2
|
+
import { CameraRef } from './cameraState';
|
|
3
3
|
import { CursorManager } from '../helpers/cursor';
|
|
4
4
|
import { Isolation } from '../helpers/isolation';
|
|
5
5
|
import { ComponentSettings } from '../settings/settings';
|
|
@@ -12,6 +12,19 @@ import * as ControlBar from '../controlbar/controlBar';
|
|
|
12
12
|
* Returns a control bar section for the section box.
|
|
13
13
|
*/
|
|
14
14
|
export declare function controlBarSectionBox(section: SectionBoxRef, hasSelection: boolean): ControlBar.IControlBarSection;
|
|
15
|
+
export declare function controlBarCamera(camera: CameraRef): {
|
|
16
|
+
id: string;
|
|
17
|
+
enable: () => boolean;
|
|
18
|
+
style: string;
|
|
19
|
+
buttons: {
|
|
20
|
+
id: string;
|
|
21
|
+
tip: string;
|
|
22
|
+
isOn: () => boolean;
|
|
23
|
+
action: () => void;
|
|
24
|
+
icon: typeof Icons.autoCamera;
|
|
25
|
+
style: typeof ControlBar.buttonDefaultStyle;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
15
28
|
/**
|
|
16
29
|
* Combines all control bar sections into one control bar.
|
|
17
30
|
*/
|
|
@@ -24,17 +37,17 @@ export declare function useControlBar(viewer: VIM.Viewer, camera: CameraRef, mod
|
|
|
24
37
|
enabled: () => boolean;
|
|
25
38
|
tip: string;
|
|
26
39
|
action: () => void;
|
|
27
|
-
icon: typeof Icons.
|
|
28
|
-
isOn: () => boolean;
|
|
40
|
+
icon: typeof Icons.toggleIsolation;
|
|
29
41
|
style: typeof ControlBar.buttonDefaultStyle;
|
|
42
|
+
isOn?: undefined;
|
|
30
43
|
} | {
|
|
31
44
|
id: string;
|
|
32
45
|
enabled: () => boolean;
|
|
46
|
+
isOn: () => boolean;
|
|
33
47
|
tip: string;
|
|
34
48
|
action: () => void;
|
|
35
|
-
icon: typeof Icons.
|
|
49
|
+
icon: typeof Icons.measure;
|
|
36
50
|
style: typeof ControlBar.buttonDefaultStyle;
|
|
37
|
-
isOn?: undefined;
|
|
38
51
|
})[];
|
|
39
52
|
} | {
|
|
40
53
|
id: string;
|
|
@@ -26,6 +26,5 @@ export interface SectionBoxAdapter {
|
|
|
26
26
|
getSelectionBox: () => Promise<THREE.Box3 | undefined>;
|
|
27
27
|
getRendererBox: () => Promise<THREE.Box3>;
|
|
28
28
|
onSelectionChanged: ISignal;
|
|
29
|
-
onSceneChanged: ISignal;
|
|
30
29
|
}
|
|
31
30
|
export declare function useSectionBox(adapter: SectionBoxAdapter): SectionBoxRef;
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { ControlBarCustomization } from '../controlbar/controlBar';
|
|
2
2
|
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
3
3
|
import * as Ultra from '../../core-viewers/ultra/index';
|
|
4
|
+
import { CameraRef } from '../state/cameraState';
|
|
4
5
|
export { buttonDefaultStyle, buttonBlueStyle } from '../controlbar/controlBarButton';
|
|
5
6
|
export { sectionDefaultStyle, sectionBlueStyle } from '../controlbar/controlBarSection';
|
|
6
|
-
export declare function useUltraControlBar(viewer: Ultra.Viewer, section: SectionBoxRef, customization: ControlBarCustomization | undefined): import("../controlbar/controlBarSection").IControlBarSection
|
|
7
|
+
export declare function useUltraControlBar(viewer: Ultra.Viewer, section: SectionBoxRef, camera: CameraRef, customization: ControlBarCustomization | undefined): (import("../controlbar/controlBarSection").IControlBarSection | {
|
|
8
|
+
id: string;
|
|
9
|
+
enable: () => boolean;
|
|
10
|
+
style: string;
|
|
11
|
+
buttons: {
|
|
12
|
+
id: string;
|
|
13
|
+
tip: string;
|
|
14
|
+
isOn: () => boolean;
|
|
15
|
+
action: () => void;
|
|
16
|
+
icon: typeof import("../panels/icons").autoCamera;
|
|
17
|
+
style: typeof import("../controlbar/controlBarButton").buttonDefaultStyle;
|
|
18
|
+
}[];
|
|
19
|
+
})[];
|
|
@@ -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 { CameraRef } from '../
|
|
8
|
+
import { CameraRef } from '../state/cameraState';
|
|
9
9
|
import { Container } from '../container';
|
|
10
10
|
import { BimInfoPanelRef } from '../bim/bimInfoData';
|
|
11
11
|
import { ControlBarCustomization } from '../controlbar/controlBar';
|