vim-web 0.3.44-dev.47 → 0.3.44-dev.51
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 +16 -1
- package/dist/types/core-viewers/index.d.ts +3 -0
- package/dist/types/core-viewers/shared/baseInputHandler.d.ts +29 -0
- package/dist/types/core-viewers/shared/index.d.ts +9 -0
- package/dist/types/core-viewers/shared/inputHandler.d.ts +115 -28
- package/dist/types/core-viewers/shared/keyboardHandler.d.ts +2 -2
- package/dist/types/core-viewers/shared/mouseHandler.d.ts +9 -9
- package/dist/types/core-viewers/shared/raycaster.d.ts +13 -0
- package/dist/types/core-viewers/shared/selection.d.ts +45 -0
- package/dist/types/core-viewers/shared/touchHandler.d.ts +2 -2
- package/dist/types/core-viewers/shared/vim.d.ts +35 -0
- package/dist/types/core-viewers/ultra/{viewer/camera.d.ts → camera.d.ts} +14 -5
- package/dist/types/core-viewers/ultra/{viewer/colorManager.d.ts → colorManager.d.ts} +6 -6
- package/dist/types/core-viewers/ultra/{viewer/decoder.d.ts → decoder.d.ts} +0 -8
- package/dist/types/core-viewers/ultra/element3d.d.ts +15 -0
- package/dist/types/core-viewers/ultra/index.d.ts +28 -9
- package/dist/types/core-viewers/ultra/inputAdapter.d.ts +5 -0
- package/dist/types/core-viewers/ultra/nodeState.d.ts +113 -0
- package/dist/types/core-viewers/ultra/raycaster.d.ts +52 -0
- package/dist/types/core-viewers/ultra/{viewer/color.d.ts → remoteColor.d.ts} +3 -3
- package/dist/types/core-viewers/ultra/{viewer/renderer.d.ts → renderer.d.ts} +9 -3
- package/dist/types/core-viewers/ultra/{viewer/rpcClient.d.ts → rpcClient.d.ts} +27 -28
- package/dist/types/core-viewers/ultra/rpcMarshal.d.ts +62 -0
- package/dist/types/core-viewers/ultra/{viewer/rpcSafeClient.d.ts → rpcSafeClient.d.ts} +22 -23
- package/dist/types/core-viewers/{utils/math3d.d.ts → ultra/rpcTypes.d.ts} +22 -22
- package/dist/types/core-viewers/ultra/selection.d.ts +4 -0
- package/dist/types/core-viewers/ultra/{viewer/socketClient.d.ts → socketClient.d.ts} +4 -11
- package/dist/types/core-viewers/ultra/{viewer/ultraCoreViewer.d.ts → viewer.d.ts} +18 -15
- package/dist/types/core-viewers/ultra/vim.d.ts +48 -0
- package/dist/types/core-viewers/webgl/index.d.ts +2 -20
- package/dist/types/core-viewers/webgl/loader/{colorAttributes.d.ts → colorAttribute.d.ts} +4 -4
- package/dist/types/core-viewers/webgl/loader/{object3D.d.ts → element3d.d.ts} +12 -9
- package/dist/types/core-viewers/webgl/loader/geometry.d.ts +76 -78
- package/dist/types/core-viewers/webgl/loader/index.d.ts +23 -0
- package/dist/types/core-viewers/webgl/loader/materials/index.d.ts +9 -0
- package/dist/types/core-viewers/webgl/loader/materials/{viewerMaterials.d.ts → materials.d.ts} +4 -4
- package/dist/types/core-viewers/webgl/loader/mesh.d.ts +7 -7
- package/dist/types/core-viewers/webgl/loader/progressive/insertableGeometry.d.ts +2 -2
- package/dist/types/core-viewers/webgl/loader/progressive/insertableMesh.d.ts +1 -1
- package/dist/types/core-viewers/webgl/loader/progressive/insertableSubmesh.d.ts +1 -1
- package/dist/types/core-viewers/webgl/loader/progressive/instancedMesh.d.ts +1 -1
- package/dist/types/core-viewers/webgl/loader/progressive/instancedSubmesh.d.ts +1 -1
- package/dist/types/core-viewers/webgl/loader/progressive/legacyMeshFactory.d.ts +2 -2
- package/dist/types/core-viewers/webgl/loader/progressive/subsetBuilder.d.ts +2 -2
- package/dist/types/core-viewers/webgl/loader/progressive/subsetRequest.d.ts +2 -2
- package/dist/types/core-viewers/webgl/loader/progressive/vimRequest.d.ts +3 -3
- package/dist/types/core-viewers/webgl/loader/scene.d.ts +11 -14
- package/dist/types/core-viewers/webgl/loader/vim.d.ts +15 -19
- package/dist/types/core-viewers/webgl/loader/vimSettings.d.ts +2 -2
- package/dist/types/core-viewers/webgl/loader/{objectAttributes.d.ts → webglAttribute.d.ts} +4 -4
- package/dist/types/core-viewers/webgl/viewer/camera/camera.d.ts +8 -102
- package/dist/types/core-viewers/webgl/viewer/camera/cameraMovement.d.ts +5 -5
- package/dist/types/core-viewers/webgl/viewer/camera/cameraMovementLerp.d.ts +2 -2
- package/dist/types/core-viewers/webgl/viewer/camera/cameraMovementSnap.d.ts +2 -2
- package/dist/types/core-viewers/webgl/viewer/camera/{orthographic.d.ts → cameraOrthographic.d.ts} +1 -1
- package/dist/types/core-viewers/webgl/viewer/camera/{perspective.d.ts → cameraPerspective.d.ts} +1 -1
- package/dist/types/core-viewers/webgl/viewer/camera/index.d.ts +7 -0
- package/dist/types/core-viewers/webgl/viewer/environment/environment.d.ts +5 -5
- package/dist/types/core-viewers/webgl/viewer/environment/index.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/environment/{cameraLight.d.ts → light.d.ts} +2 -2
- package/dist/types/core-viewers/webgl/viewer/environment/skybox.d.ts +3 -3
- package/dist/types/core-viewers/webgl/viewer/gizmos/axes/axesSettings.d.ts +3 -2
- package/dist/types/core-viewers/webgl/viewer/gizmos/axes/gizmoAxes.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/axes/index.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/gizmoOrbit.d.ts +2 -2
- package/dist/types/core-viewers/webgl/viewer/gizmos/gizmos.d.ts +0 -5
- package/dist/types/core-viewers/webgl/viewer/gizmos/index.d.ts +7 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/markers/gizmoMarker.d.ts +63 -15
- package/dist/types/core-viewers/webgl/viewer/gizmos/markers/gizmoMarkers.d.ts +30 -7
- package/dist/types/core-viewers/webgl/viewer/gizmos/markers/index.d.ts +2 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/measure/index.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/measure/measure.d.ts +4 -3
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/index.d.ts +7 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxGizmo.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandle.d.ts +4 -4
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandles.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxInputs.d.ts +1 -7
- package/dist/types/core-viewers/webgl/viewer/index.d.ts +10 -0
- package/dist/types/core-viewers/webgl/viewer/inputsAdapter.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/raycaster.d.ts +34 -43
- package/dist/types/core-viewers/webgl/viewer/rendering/index.d.ts +4 -0
- package/dist/types/core-viewers/webgl/viewer/rendering/mergePass.d.ts +2 -2
- package/dist/types/core-viewers/webgl/viewer/rendering/renderScene.d.ts +7 -7
- package/dist/types/core-viewers/webgl/viewer/rendering/renderer.d.ts +8 -5
- package/dist/types/core-viewers/webgl/viewer/rendering/renderingComposer.d.ts +2 -2
- package/dist/types/core-viewers/webgl/viewer/rendering/renderingSection.d.ts +2 -2
- package/dist/types/core-viewers/webgl/viewer/selection.d.ts +6 -89
- package/dist/types/core-viewers/webgl/viewer/settings/index.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/settings/{defaultViewerSettings.d.ts → viewerDefaultSettings.d.ts} +1 -1
- package/dist/types/core-viewers/webgl/viewer/settings/viewerSettings.d.ts +2 -9
- package/dist/types/core-viewers/webgl/viewer/settings/viewerSettingsParsing.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/viewer.d.ts +13 -13
- package/dist/types/index.d.ts +2 -3
- package/dist/types/react-viewers/bim/bimInfoData.d.ts +2 -2
- package/dist/types/react-viewers/bim/bimInfoObject.d.ts +4 -4
- package/dist/types/react-viewers/bim/bimInfoPanel.d.ts +3 -3
- package/dist/types/react-viewers/bim/bimInfoVim.d.ts +4 -4
- package/dist/types/react-viewers/bim/bimPanel.d.ts +10 -10
- package/dist/types/react-viewers/bim/bimSearch.d.ts +2 -2
- package/dist/types/react-viewers/bim/bimTree.d.ts +8 -6
- package/dist/types/react-viewers/bim/bimTreeData.d.ts +5 -4
- package/dist/types/react-viewers/bim/index.d.ts +8 -0
- package/dist/types/react-viewers/container.d.ts +3 -3
- package/dist/types/react-viewers/controlbar/controlBar.d.ts +0 -4
- package/dist/types/react-viewers/controlbar/controlBarButton.d.ts +1 -4
- package/dist/types/react-viewers/controlbar/controlBarIds.d.ts +36 -30
- package/dist/types/react-viewers/controlbar/controlBarSection.d.ts +2 -4
- package/dist/types/react-viewers/controlbar/index.d.ts +5 -0
- package/dist/types/react-viewers/controlbar/style.d.ts +10 -0
- package/dist/types/react-viewers/errors/index.d.ts +3 -0
- package/dist/types/react-viewers/helpers/cameraObserver.d.ts +2 -2
- package/dist/types/react-viewers/helpers/cursor.d.ts +5 -3
- package/dist/types/react-viewers/helpers/element.d.ts +3 -2
- package/dist/types/react-viewers/helpers/index.d.ts +10 -0
- package/dist/types/react-viewers/helpers/loadRequest.d.ts +6 -6
- package/dist/types/react-viewers/helpers/reactUtils.d.ts +8 -2
- package/dist/types/react-viewers/helpers/utils.d.ts +1 -1
- package/dist/types/react-viewers/{panels/icons.d.ts → icons.d.ts} +7 -0
- package/dist/types/react-viewers/index.d.ts +10 -11
- package/dist/types/react-viewers/panels/axesPanel.d.ts +2 -2
- package/dist/types/react-viewers/panels/contextMenu.d.ts +8 -8
- package/dist/types/react-viewers/panels/genericPanel.d.ts +22 -0
- package/dist/types/react-viewers/panels/index.d.ts +14 -0
- package/dist/types/react-viewers/panels/loadingBox.d.ts +2 -2
- package/dist/types/react-viewers/panels/modal.d.ts +5 -5
- package/dist/types/react-viewers/panels/renderSettingsPanel.d.ts +4 -0
- package/dist/types/react-viewers/panels/restOfScreen.d.ts +1 -1
- package/dist/types/react-viewers/{sidePanel → panels}/sidePanel.d.ts +3 -3
- package/dist/types/react-viewers/panels/toast.d.ts +3 -3
- package/dist/types/react-viewers/settings/index.d.ts +5 -0
- package/dist/types/react-viewers/settings/menuSettings.d.ts +2 -2
- package/dist/types/react-viewers/settings/settings.d.ts +10 -49
- package/dist/types/react-viewers/settings/settingsState.d.ts +8 -8
- package/dist/types/react-viewers/settings/settingsStorage.d.ts +6 -6
- package/dist/types/react-viewers/settings/userBoolean.d.ts +17 -0
- package/dist/types/react-viewers/state/cameraState.d.ts +2 -1
- package/dist/types/react-viewers/state/controlBarState.d.ts +21 -30
- package/dist/types/react-viewers/state/index.d.ts +9 -0
- package/dist/types/react-viewers/state/measureState.d.ts +2 -2
- package/dist/types/react-viewers/state/pointerState.d.ts +5 -5
- package/dist/types/react-viewers/state/sharedIsolation.d.ts +36 -0
- package/dist/types/react-viewers/state/viewerInputs.d.ts +2 -2
- package/dist/types/react-viewers/ultra/camera.d.ts +3 -0
- package/dist/types/react-viewers/ultra/controlBar.d.ts +6 -0
- package/dist/types/react-viewers/ultra/errors/ultraErrors.d.ts +3 -3
- package/dist/types/react-viewers/ultra/index.d.ts +2 -2
- package/dist/types/react-viewers/ultra/isolation.d.ts +3 -0
- package/dist/types/react-viewers/ultra/modal.d.ts +5 -0
- package/dist/types/react-viewers/ultra/sectionBox.d.ts +3 -0
- package/dist/types/react-viewers/ultra/viewer.d.ts +21 -0
- package/dist/types/react-viewers/ultra/{ultraComponentRef.d.ts → viewerRef.d.ts} +9 -7
- package/dist/types/react-viewers/webgl/camera.d.ts +3 -0
- package/dist/types/react-viewers/webgl/index.d.ts +3 -8
- package/dist/types/react-viewers/webgl/inputsBindings.d.ts +8 -0
- package/dist/types/react-viewers/webgl/isolation.d.ts +2 -0
- package/dist/types/react-viewers/webgl/{webglLoading.d.ts → loading.d.ts} +8 -8
- package/dist/types/react-viewers/webgl/sectionBox.d.ts +3 -0
- package/dist/types/react-viewers/webgl/viewer.d.ts +28 -0
- package/dist/types/react-viewers/webgl/{webglComponentRef.d.ts → viewerRef.d.ts} +20 -20
- package/dist/types/react-viewers/webgl/viewerState.d.ts +7 -5
- package/dist/types/utils/index.d.ts +11 -0
- package/dist/types/utils/interfaces.d.ts +3 -0
- package/dist/types/utils/math3d.d.ts +19 -0
- package/dist/types/utils/partial.d.ts +7 -0
- package/dist/types/{core-viewers/utils/requestResult.d.ts → utils/result.d.ts} +1 -1
- package/dist/types/utils/strings.d.ts +7 -0
- package/dist/types/{core-viewers/ultra/viewer → utils}/validation.d.ts +11 -10
- package/dist/vim-web.iife.js +21072 -20980
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +21056 -20964
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/core-viewers/shared/coreInputHandler.d.ts +0 -110
- package/dist/types/core-viewers/ultra/viewer/marshal.d.ts +0 -86
- package/dist/types/core-viewers/ultra/viewer/selection.d.ts +0 -99
- package/dist/types/core-viewers/ultra/viewer/ultraInputsAdapter.d.ts +0 -5
- package/dist/types/core-viewers/ultra/viewer/vim.d.ts +0 -111
- package/dist/types/core-viewers/utils/result.d.ts +0 -11
- package/dist/types/core-viewers/webgl/viewer/gizmos/gizmoRectangle.d.ts +0 -51
- package/dist/types/core-viewers/webgl/viewer/webglInputsAdapter.d.ts +0 -3
- package/dist/types/react-viewers/helpers/isolation.d.ts +0 -128
- package/dist/types/react-viewers/ultra/ultraCameraState.d.ts +0 -3
- package/dist/types/react-viewers/ultra/ultraComponent.d.ts +0 -23
- package/dist/types/react-viewers/ultra/ultraControlBarState.d.ts +0 -8
- package/dist/types/react-viewers/ultra/ultraModal.d.ts +0 -4
- package/dist/types/react-viewers/ultra/ultraSectionBoxState.d.ts +0 -3
- package/dist/types/react-viewers/webgl/webgInputsBindings.d.ts +0 -8
- package/dist/types/react-viewers/webgl/webglCameraState.d.ts +0 -2
- package/dist/types/react-viewers/webgl/webglComponent.d.ts +0 -28
- package/dist/types/react-viewers/webgl/webglSectionBoxState.d.ts +0 -3
- /package/dist/types/core-viewers/ultra/{viewer/decoderWithWorker.d.ts → decoderWithWorker.d.ts} +0 -0
- /package/dist/types/core-viewers/ultra/{viewer/loadRequest.d.ts → loadRequest.d.ts} +0 -0
- /package/dist/types/core-viewers/ultra/{viewer/logger.d.ts → logger.d.ts} +0 -0
- /package/dist/types/core-viewers/ultra/{viewer/protocol.d.ts → protocol.d.ts} +0 -0
- /package/dist/types/core-viewers/ultra/{viewer/sectionBox.d.ts → sectionBox.d.ts} +0 -0
- /package/dist/types/core-viewers/ultra/{viewer/streamLogger.d.ts → streamLogger.d.ts} +0 -0
- /package/dist/types/core-viewers/ultra/{viewer/streamRenderer.d.ts → streamRenderer.d.ts} +0 -0
- /package/dist/types/core-viewers/ultra/{viewer/viewport.d.ts → viewport.d.ts} +0 -0
- /package/dist/types/core-viewers/ultra/{viewer/vimCollection.d.ts → vimCollection.d.ts} +0 -0
- /package/dist/types/core-viewers/webgl/viewer/camera/{ICamera.d.ts → cameraInterface.d.ts} +0 -0
- /package/dist/types/react-viewers/{sidePanel → state}/sideState.d.ts +0 -0
- /package/dist/types/{core-viewers/utils → utils}/array.d.ts +0 -0
- /package/dist/types/{core-viewers/utils → utils}/debounce.d.ts +0 -0
- /package/dist/types/{core-viewers/utils → utils}/promise.d.ts +0 -0
- /package/dist/types/{core-viewers/utils → utils}/threeUtils.d.ts +0 -0
- /package/dist/types/{core-viewers/utils → utils}/url.d.ts +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
import { StateRef } from "../helpers/reactUtils";
|
|
3
|
+
import { ISignal } from "ste-signals";
|
|
4
|
+
export type VisibilityStatus = 'all' | 'allButSelection' | 'onlySelection' | 'some' | 'none';
|
|
5
|
+
export interface IsolationRef {
|
|
6
|
+
adapter: RefObject<IsolationAdapter>;
|
|
7
|
+
visibility: StateRef<VisibilityStatus>;
|
|
8
|
+
autoIsolate: StateRef<boolean>;
|
|
9
|
+
showPanel: StateRef<boolean>;
|
|
10
|
+
showGhost: StateRef<boolean>;
|
|
11
|
+
ghostOpacity: StateRef<string>;
|
|
12
|
+
showRooms: StateRef<boolean>;
|
|
13
|
+
}
|
|
14
|
+
export interface IsolationAdapter {
|
|
15
|
+
onSelectionChanged: ISignal;
|
|
16
|
+
onVisibilityChange: ISignal;
|
|
17
|
+
computeVisibility: () => VisibilityStatus;
|
|
18
|
+
hasSelection(): boolean;
|
|
19
|
+
hasVisibleSelection: () => boolean;
|
|
20
|
+
hasHiddenSelection: () => boolean;
|
|
21
|
+
clearSelection(): void;
|
|
22
|
+
isolateSelection(): void;
|
|
23
|
+
hideSelection(): void;
|
|
24
|
+
showSelection(): void;
|
|
25
|
+
isolate(instances: number[]): void;
|
|
26
|
+
show(instances: number[]): void;
|
|
27
|
+
hide(instances: number[]): void;
|
|
28
|
+
hideAll(): void;
|
|
29
|
+
showAll(): void;
|
|
30
|
+
showGhost(show: boolean): void;
|
|
31
|
+
getGhostOpacity(): number;
|
|
32
|
+
setGhostOpacity(opacity: number): void;
|
|
33
|
+
getShowRooms(): boolean;
|
|
34
|
+
setShowRooms(show: boolean): void;
|
|
35
|
+
}
|
|
36
|
+
export declare function useSharedIsolation(adapter: IsolationAdapter): IsolationRef;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InputHandler } from "../../core-viewers/shared";
|
|
2
2
|
import { CameraRef } from "./cameraState";
|
|
3
|
-
export declare function useViewerInput(handler:
|
|
3
|
+
export declare function useViewerInput(handler: InputHandler, camera: CameraRef): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Core from '../../core-viewers/ultra';
|
|
2
|
+
import { ControlBarCustomization } from '../controlbar/controlBar';
|
|
3
|
+
import { CameraRef } from '../state/cameraState';
|
|
4
|
+
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
5
|
+
import { IsolationRef } from '../state/sharedIsolation';
|
|
6
|
+
export declare function useUltraControlBar(viewer: Core.Viewer, section: SectionBoxRef, isolation: IsolationRef, camera: CameraRef, customization: ControlBarCustomization | undefined): import("../controlbar").IControlBarSection[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
export declare function getErrorMessage(state: Ultra.ClientState): import("../..").MessageBoxProps;
|
|
3
|
-
export declare function getRequestErrorMessage(serverUrl: string, source: Ultra.VimSource, error: Ultra.VimRequestErrorType): import("../..").MessageBoxProps;
|
|
1
|
+
import * as Core from '../../../core-viewers';
|
|
2
|
+
export declare function getErrorMessage(state: Core.Ultra.ClientState): import("../..").MessageBoxProps;
|
|
3
|
+
export declare function getRequestErrorMessage(serverUrl: string, source: Core.Ultra.VimSource, error: Core.Ultra.VimRequestErrorType): import("../..").MessageBoxProps;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './viewer';
|
|
2
|
+
export * from './viewerRef';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ModalRef } from "../panels/modal";
|
|
2
|
+
import * as Core from '../../core-viewers';
|
|
3
|
+
import { RefObject } from "react";
|
|
4
|
+
export declare function updateModal(modal: RefObject<ModalRef>, state: Core.Ultra.ClientState): void;
|
|
5
|
+
export declare function updateProgress(request: Core.Ultra.ILoadRequest, modal: ModalRef): Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as Core from '../../core-viewers';
|
|
2
|
+
import { Container } from '../container';
|
|
3
|
+
import { ViewerRef } from './viewerRef';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a UI container along with a VIM.Viewer and its associated React viewer.
|
|
6
|
+
* @param container An optional container object. If none is provided, a container will be created.
|
|
7
|
+
* @returns An object containing the resulting container, reactRoot, and viewer.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createViewer(container?: Container | HTMLElement): Promise<ViewerRef>;
|
|
10
|
+
/**
|
|
11
|
+
* Represents a React viewer providing UI for the Vim viewer.
|
|
12
|
+
* @param container The container object containing root, gfx, and UI elements for the Vim viewer.
|
|
13
|
+
* @param viewer The Vim viewer instance for which UI is provided.
|
|
14
|
+
* @param onMount A callback function triggered when the viewer is mounted. Receives a reference to the Vim viewer.
|
|
15
|
+
* @param settings Optional settings for configuring the Vim viewer's behavior.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Viewer(props: {
|
|
18
|
+
container: Container;
|
|
19
|
+
viewer: Core.Ultra.Viewer;
|
|
20
|
+
onMount: (viewer: ViewerRef) => void;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as Core from '../../core-viewers/ultra';
|
|
2
2
|
import { ModalRef } from '../panels/modal';
|
|
3
3
|
import { CameraRef } from '../state/cameraState';
|
|
4
4
|
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { IsolationRef } from '../state/sharedIsolation';
|
|
6
|
+
import { ControlBarRef } from '../webgl/viewerRef';
|
|
7
|
+
export type ViewerRef = {
|
|
7
8
|
/**
|
|
8
|
-
* The Vim viewer instance associated with the
|
|
9
|
+
* The Vim viewer instance associated with the viewer.
|
|
9
10
|
*/
|
|
10
|
-
viewer:
|
|
11
|
+
viewer: Core.Viewer;
|
|
11
12
|
/**
|
|
12
13
|
* API to manage the modal dialog.
|
|
13
14
|
*/
|
|
@@ -24,13 +25,14 @@ export type UltraComponentRef = {
|
|
|
24
25
|
* Camera API to interact with the viewer camera at a higher level.
|
|
25
26
|
*/
|
|
26
27
|
camera: CameraRef;
|
|
28
|
+
isolation: IsolationRef;
|
|
27
29
|
/**
|
|
28
|
-
* Disposes of the
|
|
30
|
+
* Disposes of the viewer and its resources.
|
|
29
31
|
*/
|
|
30
32
|
dispose: () => void;
|
|
31
33
|
/**
|
|
32
34
|
* Loads a file into the viewer.
|
|
33
35
|
* @param url The URL of the file to load.
|
|
34
36
|
*/
|
|
35
|
-
load(url:
|
|
37
|
+
load(url: Core.VimSource): Core.ILoadRequest;
|
|
36
38
|
};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export *
|
|
3
|
-
export *
|
|
4
|
-
export * as ControlBar from '../controlbar/controlBar';
|
|
5
|
-
export { LoadRequest } from '../helpers/loadRequest';
|
|
6
|
-
export * as Refs from './webglComponentRef';
|
|
7
|
-
export { getLocalSettings as getLocalSettings } from '../settings/settingsStorage';
|
|
8
|
-
export { type ComponentSettings as Settings, type PartialComponentSettings as PartialSettings, defaultSettings } from '../settings/settings';
|
|
1
|
+
export * from './viewer';
|
|
2
|
+
export * from './viewerRef';
|
|
3
|
+
export type * from './loading';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module viw-webgl-react
|
|
3
|
+
*/
|
|
4
|
+
import * as Core from '../../core-viewers';
|
|
5
|
+
import { SideState } from '../state/sideState';
|
|
6
|
+
import { CameraRef } from '../state/cameraState';
|
|
7
|
+
import { IsolationRef } from '../state/sharedIsolation';
|
|
8
|
+
export declare function applyWebglBindings(viewer: Core.Webgl.Viewer, camera: CameraRef, isolation: IsolationRef, sideState: SideState): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module viw-webgl-react
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Core from '../../core-viewers';
|
|
5
5
|
import { LoadRequest } from '../helpers/loadRequest';
|
|
6
6
|
import { ModalRef } from '../panels/modal';
|
|
7
7
|
type AddSettings = {
|
|
@@ -16,7 +16,7 @@ type AddSettings = {
|
|
|
16
16
|
*/
|
|
17
17
|
loadEmpty?: boolean;
|
|
18
18
|
};
|
|
19
|
-
export type OpenSettings =
|
|
19
|
+
export type OpenSettings = Core.Webgl.VimPartialSettings & AddSettings;
|
|
20
20
|
export type LoadingError = {
|
|
21
21
|
url: string;
|
|
22
22
|
error: string;
|
|
@@ -28,11 +28,11 @@ export type LoadingError = {
|
|
|
28
28
|
export declare class ComponentLoader {
|
|
29
29
|
private _viewer;
|
|
30
30
|
private _modal;
|
|
31
|
-
constructor(viewer:
|
|
31
|
+
constructor(viewer: Core.Webgl.Viewer, modal: React.RefObject<ModalRef>);
|
|
32
32
|
/**
|
|
33
33
|
* Event emitter for progress updates.
|
|
34
34
|
*/
|
|
35
|
-
onProgress(p:
|
|
35
|
+
onProgress(p: Core.Webgl.IProgressLogs): void;
|
|
36
36
|
/**
|
|
37
37
|
* Event emitter for completion notifications.
|
|
38
38
|
*/
|
|
@@ -48,20 +48,20 @@ export declare class ComponentLoader {
|
|
|
48
48
|
* @param onProgress Optional callback function to track progress during opening.
|
|
49
49
|
* Receives progress logs as input.
|
|
50
50
|
*/
|
|
51
|
-
open(source:
|
|
51
|
+
open(source: Core.Webgl.RequestSource, settings: OpenSettings, onProgress?: (p: Core.Webgl.IProgressLogs) => void): Promise<Core.Webgl.Vim>;
|
|
52
52
|
/**
|
|
53
53
|
* Creates a new load request for the provided source and settings.
|
|
54
54
|
* @param source The url to the vim file or a buffer of the file.
|
|
55
55
|
* @param settings Settings to apply to vim file.
|
|
56
56
|
* @returns A new load request instance to track progress and get result.
|
|
57
57
|
*/
|
|
58
|
-
request(source:
|
|
59
|
-
add(vim:
|
|
58
|
+
request(source: Core.Webgl.RequestSource, settings?: Core.Webgl.VimPartialSettings): LoadRequest;
|
|
59
|
+
add(vim: Core.Webgl.Vim, settings?: AddSettings): void;
|
|
60
60
|
/**
|
|
61
61
|
* Removes the vim from the viewer and disposes it.
|
|
62
62
|
* @param vim Vim to remove from the viewer.
|
|
63
63
|
*/
|
|
64
|
-
remove(vim:
|
|
64
|
+
remove(vim: Core.Webgl.Vim): void;
|
|
65
65
|
private initVim;
|
|
66
66
|
}
|
|
67
67
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module public-api
|
|
3
|
+
*/
|
|
4
|
+
import * as Core from '../../core-viewers';
|
|
5
|
+
import { PartialSettings } from '../settings';
|
|
6
|
+
import { Container } from '../container';
|
|
7
|
+
import { ViewerRef } from './viewerRef';
|
|
8
|
+
/**
|
|
9
|
+
* Creates a UI container along with a VIM.Viewer and its associated React viewer.
|
|
10
|
+
* @param container An optional container object. If none is provided, a container will be created.
|
|
11
|
+
* @param settings UI Component settings.
|
|
12
|
+
* @param coreSettings Viewer settings.
|
|
13
|
+
* @returns An object containing the resulting container, reactRoot, and viewer.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createViewer(container?: Container | HTMLElement, settings?: PartialSettings, coreSettings?: Core.Webgl.PartialViewerSettings): Promise<ViewerRef>;
|
|
16
|
+
/**
|
|
17
|
+
* Represents a React viewer providing UI for the Vim viewer.
|
|
18
|
+
* @param container The container object containing root, gfx, and UI elements for the Vim viewer.
|
|
19
|
+
* @param viewer The Vim viewer instance for which UI is provided.
|
|
20
|
+
* @param onMount A callback function triggered when the viewer is mounted. Receives a reference to the Vim viewer.
|
|
21
|
+
* @param settings Optional settings for configuring the Vim viewer's behavior.
|
|
22
|
+
*/
|
|
23
|
+
export declare function Viewer(props: {
|
|
24
|
+
container: Container;
|
|
25
|
+
viewer: Core.Webgl.Viewer;
|
|
26
|
+
onMount: (viewer: ViewerRef) => void;
|
|
27
|
+
settings?: PartialSettings;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module public-api
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Core from '../../core-viewers';
|
|
5
5
|
import { ContextMenuCustomization } from '../panels/contextMenu';
|
|
6
|
-
import {
|
|
7
|
-
import { Isolation } from '../helpers/isolation';
|
|
6
|
+
import { Settings } from '../settings/settings';
|
|
8
7
|
import { CameraRef } from '../state/cameraState';
|
|
9
8
|
import { Container } from '../container';
|
|
10
9
|
import { BimInfoPanelRef } from '../bim/bimInfoData';
|
|
11
10
|
import { ControlBarCustomization } from '../controlbar/controlBar';
|
|
12
|
-
import { ComponentLoader } from './
|
|
11
|
+
import { ComponentLoader } from './loading';
|
|
13
12
|
import { ModalRef } from '../panels/modal';
|
|
14
13
|
import { SectionBoxRef } from '../state/sectionBoxState';
|
|
14
|
+
import { IsolationRef } from '../state/sharedIsolation';
|
|
15
15
|
/**
|
|
16
|
-
* Settings API managing settings applied to the
|
|
16
|
+
* Settings API managing settings applied to the viewer.
|
|
17
17
|
*/
|
|
18
18
|
export type SettingsRef = {
|
|
19
19
|
/**
|
|
20
20
|
* Allows updating settings by providing a callback function.
|
|
21
21
|
* @param updater A function that updates the current settings.
|
|
22
22
|
*/
|
|
23
|
-
update: (updater: (settings:
|
|
23
|
+
update: (updater: (settings: Settings) => void) => void;
|
|
24
24
|
/**
|
|
25
25
|
* Registers a callback function to be notified when settings are updated.
|
|
26
26
|
* @param callback A function to be called when settings are updated, receiving the updated settings.
|
|
27
27
|
*/
|
|
28
|
-
register: (callback: (settings:
|
|
28
|
+
register: (callback: (settings: Settings) => void) => void;
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
|
-
* Reference to manage context menu functionality in the
|
|
31
|
+
* Reference to manage context menu functionality in the viewer.
|
|
32
32
|
*/
|
|
33
33
|
export type ContextMenuRef = {
|
|
34
34
|
/**
|
|
@@ -38,7 +38,7 @@ export type ContextMenuRef = {
|
|
|
38
38
|
customize: (customization: ContextMenuCustomization) => void;
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
|
-
* Reference to manage control bar functionality in the
|
|
41
|
+
* Reference to manage control bar functionality in the viewer.
|
|
42
42
|
*/
|
|
43
43
|
export type ControlBarRef = {
|
|
44
44
|
/**
|
|
@@ -48,7 +48,7 @@ export type ControlBarRef = {
|
|
|
48
48
|
customize: (customization: ControlBarCustomization) => void;
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
|
-
* Reference to manage help message functionality in the
|
|
51
|
+
* Reference to manage help message functionality in the viewer.
|
|
52
52
|
*/
|
|
53
53
|
export type HelpRef = {
|
|
54
54
|
/**
|
|
@@ -64,27 +64,27 @@ export type HelpRef = {
|
|
|
64
64
|
isShow(): boolean;
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
-
* Root-level API of the Vim
|
|
67
|
+
* Root-level API of the Vim viewer.
|
|
68
68
|
*/
|
|
69
|
-
export type
|
|
69
|
+
export type ViewerRef = {
|
|
70
70
|
/**
|
|
71
|
-
* HTML structure containing the
|
|
71
|
+
* HTML structure containing the viewer.
|
|
72
72
|
*/
|
|
73
73
|
container: Container;
|
|
74
74
|
/**
|
|
75
|
-
* Vim WebGL viewer around which the WebGL
|
|
75
|
+
* Vim WebGL viewer around which the WebGL viewer is built.
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
core: Core.Webgl.Viewer;
|
|
78
78
|
/**
|
|
79
79
|
* Vim WebGL loader to download VIMs.
|
|
80
80
|
*/
|
|
81
81
|
loader: ComponentLoader;
|
|
82
82
|
/**
|
|
83
|
-
* Isolation API managing isolation state in the
|
|
83
|
+
* Isolation API managing isolation state in the viewer.
|
|
84
84
|
*/
|
|
85
|
-
isolation:
|
|
85
|
+
isolation: IsolationRef;
|
|
86
86
|
/**
|
|
87
|
-
* Section box API managing the section box in the
|
|
87
|
+
* Section box API managing the section box in the viewer.
|
|
88
88
|
*/
|
|
89
89
|
sectionBox: SectionBoxRef;
|
|
90
90
|
/**
|
|
@@ -96,7 +96,7 @@ export type VimComponentRef = {
|
|
|
96
96
|
*/
|
|
97
97
|
controlBar: ControlBarRef;
|
|
98
98
|
/**
|
|
99
|
-
* Settings API managing settings applied to the
|
|
99
|
+
* Settings API managing settings applied to the viewer.
|
|
100
100
|
*/
|
|
101
101
|
settings: SettingsRef;
|
|
102
102
|
/**
|
|
@@ -112,7 +112,7 @@ export type VimComponentRef = {
|
|
|
112
112
|
*/
|
|
113
113
|
bimInfo: BimInfoPanelRef;
|
|
114
114
|
/**
|
|
115
|
-
* Cleans up and releases resources used by the
|
|
115
|
+
* Cleans up and releases resources used by the viewer.
|
|
116
116
|
*/
|
|
117
117
|
dispose: () => void;
|
|
118
118
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module viw-webgl-react
|
|
3
3
|
*/
|
|
4
|
-
import * as
|
|
4
|
+
import * as Core from '../../core-viewers';
|
|
5
5
|
import { AugmentedElement } from '../helpers/element';
|
|
6
|
+
import { StateRef } from '../helpers';
|
|
6
7
|
export type ViewerState = {
|
|
7
|
-
vim:
|
|
8
|
-
selection:
|
|
9
|
-
elements: AugmentedElement[]
|
|
8
|
+
vim: StateRef<Core.Webgl.Vim>;
|
|
9
|
+
selection: StateRef<Core.Webgl.Element3D[]>;
|
|
10
|
+
elements: StateRef<AugmentedElement[]>;
|
|
11
|
+
filter: StateRef<string>;
|
|
10
12
|
};
|
|
11
|
-
export declare function useViewerState(viewer:
|
|
13
|
+
export declare function useViewerState(viewer: Core.Webgl.Viewer): ViewerState;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './array';
|
|
2
|
+
export * from './debounce';
|
|
3
|
+
export * from './interfaces';
|
|
4
|
+
export * from './math3d';
|
|
5
|
+
export * from './partial';
|
|
6
|
+
export * from './promise';
|
|
7
|
+
export * from './result';
|
|
8
|
+
export * from './strings';
|
|
9
|
+
export * from './threeUtils';
|
|
10
|
+
export * from './url';
|
|
11
|
+
export * from './validation';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { Matrix4 as Matrix44, } from 'three';
|
|
2
|
+
export { Vector2, Vector3, Box3 } from 'three';
|
|
3
|
+
import { Vector2 } from 'three';
|
|
4
|
+
/**
|
|
5
|
+
* Checks if two Vector2 objects are approximately equal.
|
|
6
|
+
* @param v1 - First Vector2.
|
|
7
|
+
* @param v2 - Second Vector2.
|
|
8
|
+
* @param epsilon - Tolerance for floating-point comparisons.
|
|
9
|
+
* @returns True if vectors are almost equal, false otherwise.
|
|
10
|
+
*/
|
|
11
|
+
export declare function almostEqual(v1: Vector2, v2: Vector2, epsilon?: number): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Remaps the given value from the range [0-1] to [0-max].
|
|
14
|
+
*/
|
|
15
|
+
export declare function remap(value: number, max: number): number;
|
|
16
|
+
/**
|
|
17
|
+
* Clamps the given value between the given min and max.
|
|
18
|
+
*/
|
|
19
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Makes all field optional recursively
|
|
3
|
+
* https://stackoverflow.com/questions/41980195/recursive-partialt-in-typescript
|
|
4
|
+
*/
|
|
5
|
+
export type RecursivePartial<T> = {
|
|
6
|
+
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
|
|
7
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import * as Core from '../core-viewers';
|
|
2
3
|
export declare class Validation {
|
|
3
4
|
static isNumber(value: number): boolean;
|
|
4
5
|
static isPositiveNumber(value: number): boolean;
|
|
@@ -9,13 +10,13 @@ export declare class Validation {
|
|
|
9
10
|
static isComponentHandle(handle: number): boolean;
|
|
10
11
|
static areComponentHandles(handles: number[]): boolean;
|
|
11
12
|
static isMaterialHandle(handle: number): boolean;
|
|
12
|
-
static isValidVector2(value: Vector2): boolean;
|
|
13
|
-
static isRelativeVector2(value: Vector2): boolean;
|
|
14
|
-
static isValidVector3(value: Vector3): boolean;
|
|
15
|
-
static isValidBox(box: Box3): boolean;
|
|
16
|
-
static isValidSegment(segment: Segment): boolean;
|
|
17
|
-
static isRelativeRGBA(color: RGBA): boolean;
|
|
18
|
-
static isRelativeRGB(color: RGB): boolean;
|
|
13
|
+
static isValidVector2(value: THREE.Vector2): boolean;
|
|
14
|
+
static isRelativeVector2(value: THREE.Vector2): boolean;
|
|
15
|
+
static isValidVector3(value: THREE.Vector3): boolean;
|
|
16
|
+
static isValidBox(box: THREE.Box3): boolean;
|
|
17
|
+
static isValidSegment(segment: Core.Ultra.Segment): boolean;
|
|
18
|
+
static isRelativeRGBA(color: Core.Ultra.RGBA): boolean;
|
|
19
|
+
static isRelativeRGB(color: Core.Ultra.RGB): boolean;
|
|
19
20
|
static isNonEmptyString(value: string): boolean;
|
|
20
21
|
static isURL(value: string): boolean;
|
|
21
22
|
static areSameLength<T1, T2>(array: T1[], array2: T2[]): boolean;
|
|
@@ -23,6 +24,6 @@ export declare class Validation {
|
|
|
23
24
|
static clamp(min: number, max: number, value: number): number;
|
|
24
25
|
static clamp01(value: number): number;
|
|
25
26
|
static min0(value: number): number;
|
|
26
|
-
static clampRGBA01(value: RGBA): RGBA;
|
|
27
|
-
static clampRGB01(value: RGBA): RGBA;
|
|
27
|
+
static clampRGBA01(value: Core.Ultra.RGBA): Core.Ultra.RGBA;
|
|
28
|
+
static clampRGB01(value: Core.Ultra.RGBA): Core.Ultra.RGBA;
|
|
28
29
|
}
|