vim-web 0.3.42 → 0.3.44-dev.0
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/index.d.ts +1 -1
- package/dist/types/core-viewers/ultra/viewer/camera.d.ts +1 -13
- package/dist/types/core-viewers/ultra/viewer/marshal.d.ts +37 -24
- package/dist/types/core-viewers/ultra/viewer/rpcClient.d.ts +9 -7
- package/dist/types/core-viewers/ultra/viewer/rpcSafeClient.d.ts +8 -1
- package/dist/types/core-viewers/ultra/viewer/sectionBox.d.ts +31 -0
- package/dist/types/core-viewers/ultra/viewer/socketClient.d.ts +14 -5
- package/dist/types/core-viewers/ultra/viewer/viewer.d.ts +7 -3
- package/dist/types/core-viewers/webgl/loader/materials/ghostMaterial.d.ts +16 -0
- package/dist/types/core-viewers/webgl/loader/materials/simpleMaterial.d.ts +10 -5
- package/dist/types/core-viewers/webgl/loader/materials/viewerMaterials.d.ts +9 -8
- package/dist/types/core-viewers/webgl/loader/mesh.d.ts +2 -1
- package/dist/types/core-viewers/webgl/loader/progressive/insertableMesh.d.ts +2 -1
- package/dist/types/core-viewers/webgl/loader/progressive/instancedMesh.d.ts +3 -1
- package/dist/types/core-viewers/webgl/loader/scene.d.ts +3 -2
- package/dist/types/core-viewers/webgl/viewer/camera/ICamera.d.ts +102 -0
- package/dist/types/core-viewers/webgl/viewer/environment/cameraLight.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/environment/environment.d.ts +1 -7
- package/dist/types/core-viewers/webgl/viewer/environment/skybox.d.ts +1 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/SectionBoxMesh.d.ts +15 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBox.d.ts +55 -21
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxGizmo.d.ts +13 -43
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandle.d.ts +15 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandles.d.ts +19 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxInputs.d.ts +143 -28
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxOutline.d.ts +15 -0
- package/dist/types/core-viewers/webgl/viewer/inputs/input.d.ts +4 -4
- package/dist/types/core-viewers/webgl/viewer/rendering/renderScene.d.ts +8 -4
- package/dist/types/core-viewers/webgl/viewer/rendering/renderer.d.ts +5 -9
- package/dist/types/core-viewers/webgl/viewer/selection.d.ts +1 -0
- package/dist/types/core-viewers/webgl/viewer/settings/viewerSettings.d.ts +4 -39
- package/dist/types/core-viewers/webgl/viewer/viewer.d.ts +1 -1
- package/dist/types/react-viewers/helpers/inputs.d.ts +1 -2
- package/dist/types/react-viewers/helpers/isolation.d.ts +91 -50
- package/dist/types/react-viewers/settings/settings.d.ts +3 -2
- package/dist/vim-web.iife.js +1507 -1199
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +1505 -1197
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/core-viewers/webgl/images.d.ts +0 -4
- package/dist/types/core-viewers/webgl/loader/materials/isolationMaterial.d.ts +0 -12
- package/dist/types/core-viewers/webgl/viewer/environment/groundPlane.d.ts +0 -25
- /package/dist/types/core-viewers/webgl/viewer/inputs/{keyboard.d.ts → keyboardHandler.d.ts} +0 -0
- /package/dist/types/core-viewers/webgl/viewer/inputs/{mouse.d.ts → mouseHandler.d.ts} +0 -0
- /package/dist/types/core-viewers/webgl/viewer/inputs/{touch.d.ts → touchHandler.d.ts} +0 -0
|
@@ -1,87 +1,128 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module viw-webgl-react
|
|
3
|
-
*/
|
|
4
1
|
import * as VIM from '../../core-viewers/webgl/index';
|
|
5
2
|
import { ComponentSettings } from '../settings/settings';
|
|
6
3
|
import { ComponentCamera } from './camera';
|
|
4
|
+
import { ISimpleEvent } from 'ste-simple-events';
|
|
7
5
|
/**
|
|
8
|
-
* Manages the isolation mechanic in the
|
|
6
|
+
* Manages the isolation mechanic in the VIM component.
|
|
7
|
+
*
|
|
8
|
+
* **Isolation** determines which objects are visible (isolated) and which are
|
|
9
|
+
* hidden or displayed as ghosted. This class applies materials, updates object
|
|
10
|
+
* visibility, and ensures the camera view is adjusted when isolation changes.
|
|
9
11
|
*/
|
|
10
12
|
export declare class Isolation {
|
|
11
13
|
private _viewer;
|
|
12
14
|
private _settings;
|
|
13
15
|
private _isolation;
|
|
14
|
-
private _lastIsolation;
|
|
15
16
|
private _camera;
|
|
16
|
-
private _references;
|
|
17
17
|
private _onChanged;
|
|
18
|
-
/** Signal dispatched when the isolation set changes. */
|
|
19
|
-
get onChanged(): import("ste-simple-events").ISimpleEvent<string>;
|
|
20
|
-
constructor(viewer: VIM.Viewer, camera: ComponentCamera, settings: ComponentSettings);
|
|
21
|
-
/**
|
|
22
|
-
* Applies relevant settings to isolation.
|
|
23
|
-
* @param settings The settings to be applied to isolation.
|
|
24
|
-
*/
|
|
25
|
-
applySettings(settings: ComponentSettings): void;
|
|
26
18
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @
|
|
19
|
+
* An event that is dispatched whenever the isolation set changes.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* This can be used by other parts of the application to react to isolation
|
|
23
|
+
* updates (for example, updating UI or triggering additional viewport actions).
|
|
24
|
+
*
|
|
25
|
+
* @returns {ISimpleEvent<string>} Event interface for subscribing to isolation changes.
|
|
30
26
|
*/
|
|
31
|
-
|
|
27
|
+
get onChanged(): ISimpleEvent<string>;
|
|
32
28
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* @
|
|
29
|
+
* Constructs an IsolationManager.
|
|
30
|
+
*
|
|
31
|
+
* @param viewer - The VIM Viewer responsible for managing the 3D scene and objects.
|
|
32
|
+
* @param camera - A component that handles camera control and framing.
|
|
33
|
+
* @param settings - The settings that control isolation and material usage.
|
|
36
34
|
*/
|
|
37
|
-
|
|
35
|
+
constructor(viewer: VIM.Viewer, camera: ComponentCamera, settings: ComponentSettings);
|
|
38
36
|
/**
|
|
39
|
-
*
|
|
37
|
+
* Applies relevant settings to the isolation behavior.
|
|
38
|
+
*
|
|
39
|
+
* @param settings - The new settings to apply.
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* This updates the internal reference to settings and immediately sets
|
|
43
|
+
* the material based on whether isolation is currently active.
|
|
40
44
|
*/
|
|
41
|
-
|
|
45
|
+
applySettings(settings: ComponentSettings): void;
|
|
42
46
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
47
|
+
* Checks if isolation is currently active (i.e., any objects are isolated).
|
|
48
|
+
*
|
|
49
|
+
* @returns True if isolation is active; otherwise, false.
|
|
45
50
|
*/
|
|
46
|
-
|
|
51
|
+
isActive(): boolean;
|
|
47
52
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
53
|
+
* Retrieves the current array of isolated objects.
|
|
54
|
+
*
|
|
55
|
+
* @returns An array of isolated objects, or undefined if isolation is not active.
|
|
50
56
|
*/
|
|
51
|
-
current(): VIM.Object3D[];
|
|
57
|
+
current(): VIM.Object3D[] | undefined;
|
|
52
58
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* @param
|
|
56
|
-
* @
|
|
59
|
+
* Sets the specified objects as isolated, hiding or ghosting the rest.
|
|
60
|
+
*
|
|
61
|
+
* @param objects - The objects to isolate.
|
|
62
|
+
* @param source - A label or identifier indicating the source of this action (e.g., "user").
|
|
57
63
|
*/
|
|
58
|
-
isolate(objects: VIM.Object3D[], source: string):
|
|
64
|
+
isolate(objects: VIM.Object3D[], source: string): void;
|
|
59
65
|
/**
|
|
60
|
-
* Toggles
|
|
61
|
-
*
|
|
66
|
+
* Toggles isolation by using the current selection.
|
|
67
|
+
*
|
|
68
|
+
* @param source - A label or identifier for the isolation action.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* This method replaces the current isolation set with whatever objects are
|
|
72
|
+
* currently selected. If selection is empty, it effectively clears isolation.
|
|
62
73
|
*/
|
|
63
|
-
|
|
74
|
+
toggle(source: string): void;
|
|
64
75
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* @param
|
|
76
|
+
* Hides the specified objects from the isolation set.
|
|
77
|
+
*
|
|
78
|
+
* @param objects - The objects to hide.
|
|
79
|
+
* @param source - A label or identifier for the isolation action.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* If there is no active isolation set (i.e., all objects are visible),
|
|
83
|
+
* the method first treats all objects in the scene as isolated,
|
|
84
|
+
* and then removes the specified objects. This ensures the specified
|
|
85
|
+
* objects become hidden.
|
|
68
86
|
*/
|
|
69
87
|
hide(objects: VIM.Object3D[], source: string): void;
|
|
70
88
|
/**
|
|
71
|
-
* Adds the
|
|
72
|
-
*
|
|
73
|
-
* @param
|
|
89
|
+
* Adds the specified objects to the current isolation set (making them visible).
|
|
90
|
+
*
|
|
91
|
+
* @param objects - The objects to show.
|
|
92
|
+
* @param source - A label or identifier for the isolation action.
|
|
74
93
|
*/
|
|
75
94
|
show(objects: VIM.Object3D[], source: string): void;
|
|
76
95
|
/**
|
|
77
|
-
* Clears the current isolation.
|
|
78
|
-
*
|
|
96
|
+
* Clears the current isolation set, making all objects visible.
|
|
97
|
+
*
|
|
98
|
+
* @param source - A label or identifier for the isolation action.
|
|
79
99
|
*/
|
|
80
100
|
clear(source: string): void;
|
|
81
101
|
/**
|
|
82
|
-
*
|
|
102
|
+
* Constructs the correct material (or array of materials) based on the given settings.
|
|
103
|
+
*
|
|
104
|
+
* @param settings - The current component settings, including isolation rules.
|
|
105
|
+
* @param isolate - Whether or not isolation is active.
|
|
106
|
+
* @returns The material(s) to assign to the renderer, or undefined if default materials should be used.
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* - If isolation is active and `useGhostMaterial` is true, an array containing
|
|
110
|
+
* the simple and ghost materials is returned.
|
|
111
|
+
* - If fast materials are enabled, the simple material is returned.
|
|
112
|
+
* - Otherwise, defaults to undefined, allowing the system to pick a standard material.
|
|
113
|
+
*/
|
|
114
|
+
private getMaterial;
|
|
115
|
+
/**
|
|
116
|
+
* Applies the current isolation state: sets visibility for objects, updates materials,
|
|
117
|
+
* and dispatches the changed event.
|
|
118
|
+
*
|
|
119
|
+
* @param source - A label or identifier for the isolation action.
|
|
120
|
+
*/
|
|
121
|
+
private _apply;
|
|
122
|
+
/**
|
|
123
|
+
* Gathers all objects from all loaded VIM instances.
|
|
124
|
+
*
|
|
125
|
+
* @returns An array of all objects within the loaded VIM scenes.
|
|
83
126
|
*/
|
|
84
|
-
private
|
|
85
|
-
getMaterial(settings: ComponentSettings, isolate: boolean): import("three").Material;
|
|
86
|
-
private _isolate;
|
|
127
|
+
private getAllObjects;
|
|
87
128
|
}
|
|
@@ -32,12 +32,13 @@ export declare function isFalse(value: UserBoolean | boolean): value is false |
|
|
|
32
32
|
* @interface ComponentSettings
|
|
33
33
|
*/
|
|
34
34
|
export type ComponentSettings = {
|
|
35
|
-
|
|
35
|
+
materials: {
|
|
36
36
|
useFastMaterial: boolean;
|
|
37
|
+
useGhostMaterial: boolean;
|
|
38
|
+
smallGhostThreshold: number;
|
|
37
39
|
};
|
|
38
40
|
isolation: {
|
|
39
41
|
enable: boolean;
|
|
40
|
-
useIsolationMaterial: boolean;
|
|
41
42
|
};
|
|
42
43
|
capacity: {
|
|
43
44
|
canFollowUrl: boolean;
|