vim-web 0.3.44-dev.0 → 0.3.44-dev.2
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/utils/math3d.d.ts +11 -51
- package/dist/types/core-viewers/ultra/viewer/renderer.d.ts +3 -1
- package/dist/types/core-viewers/ultra/viewer/rpcSafeClient.d.ts +1 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxGizmo.d.ts +2 -1
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandle.d.ts +3 -0
- package/dist/types/core-viewers/webgl/viewer/gizmos/sectionBox/sectionBoxHandles.d.ts +2 -1
- package/dist/vim-web.iife.js +553 -708
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +571 -726
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,38 +1,14 @@
|
|
|
1
|
-
export { Matrix4 as Matrix44 } from 'three';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
min(v: Vector3): this;
|
|
13
|
-
max(v: Vector3): this;
|
|
14
|
-
isValid(): boolean;
|
|
15
|
-
equals(v: Vector3): boolean;
|
|
16
|
-
toArray(): number[];
|
|
17
|
-
}
|
|
18
|
-
export declare class Vector2 {
|
|
19
|
-
x: number;
|
|
20
|
-
y: number;
|
|
21
|
-
constructor(x?: number, y?: number);
|
|
22
|
-
set(x: number, y: number): this;
|
|
23
|
-
copy(v: Vector2): this;
|
|
24
|
-
add(v: Vector2): this;
|
|
25
|
-
sub(v: Vector2): this;
|
|
26
|
-
multiplyScalar(scalar: number): this;
|
|
27
|
-
min(v: Vector2): this;
|
|
28
|
-
max(v: Vector2): this;
|
|
29
|
-
equals(v: Vector2): boolean;
|
|
30
|
-
isValid(): boolean;
|
|
31
|
-
almostEquals(v: Vector2, tolerance?: number): boolean;
|
|
32
|
-
toArray(): number[];
|
|
33
|
-
distanceTo(v: Vector2): number;
|
|
34
|
-
clamp01(): this;
|
|
35
|
-
}
|
|
1
|
+
export { Matrix4 as Matrix44, } from 'three';
|
|
2
|
+
export { Vector2, Vector3, Box3 } from 'three';
|
|
3
|
+
import { Vector2, Vector3 } 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;
|
|
36
12
|
export declare class Segment {
|
|
37
13
|
origin: Vector3;
|
|
38
14
|
target: Vector3;
|
|
@@ -42,22 +18,6 @@ export declare class Segment {
|
|
|
42
18
|
isValid(): boolean;
|
|
43
19
|
equals(segment: Segment): boolean;
|
|
44
20
|
}
|
|
45
|
-
export declare class Box3 {
|
|
46
|
-
min: Vector3;
|
|
47
|
-
max: Vector3;
|
|
48
|
-
constructor(min?: Vector3, max?: Vector3);
|
|
49
|
-
static fromArray(array: number[]): Box3;
|
|
50
|
-
isValid(): boolean;
|
|
51
|
-
set(min: Vector3, max: Vector3): this;
|
|
52
|
-
setFromPoints(points: Vector3[]): this;
|
|
53
|
-
getCenter(target?: Vector3): Vector3;
|
|
54
|
-
getSize(target?: Vector3): Vector3;
|
|
55
|
-
containsPoint(point: Vector3): boolean;
|
|
56
|
-
intersectsBox(box: Box3): boolean;
|
|
57
|
-
expandByPoint(point: Vector3): this;
|
|
58
|
-
union(box: Box3): this;
|
|
59
|
-
toArray(): number[];
|
|
60
|
-
}
|
|
61
21
|
export declare class RGBA {
|
|
62
22
|
r: number;
|
|
63
23
|
g: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RGBA } from "../utils/math3d";
|
|
1
|
+
import { Box3, RGBA } from "../utils/math3d";
|
|
2
2
|
import { ILogger } from "./logger";
|
|
3
3
|
import { RpcSafeClient, SceneSettings } from "./rpcSafeClient";
|
|
4
4
|
import { ClientStreamError } from "./socketClient";
|
|
@@ -27,6 +27,7 @@ export interface IRenderer {
|
|
|
27
27
|
hdrBackgroundSaturation: number;
|
|
28
28
|
backgroundBlur: number;
|
|
29
29
|
backgroundColor: RGBA;
|
|
30
|
+
getBoundingBox(): Promise<Box3 | undefined>;
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
33
|
* Renderer class that handles 3D scene rendering and settings management
|
|
@@ -135,6 +136,7 @@ export declare class Renderer implements IRenderer {
|
|
|
135
136
|
* @param value - New background color as RGBA
|
|
136
137
|
*/
|
|
137
138
|
set backgroundColor(value: RGBA);
|
|
139
|
+
getBoundingBox(): Promise<Box3 | undefined>;
|
|
138
140
|
/**
|
|
139
141
|
* Requests an update to be performed on the next animation frame.
|
|
140
142
|
* Multiple setting changes will be batched into a single update.
|
|
@@ -57,6 +57,7 @@ export declare class RpcSafeClient {
|
|
|
57
57
|
*/
|
|
58
58
|
RPCSetLighting(settings: SceneSettings): void;
|
|
59
59
|
RPCLockIblRotation(lock: boolean): void;
|
|
60
|
+
RPCGetSceneAABB(): Promise<Box3 | undefined>;
|
|
60
61
|
/*******************************************************************************
|
|
61
62
|
* NODE VISIBILITY METHODS
|
|
62
63
|
* Methods for controlling node visibility, including show/hide, ghosting,
|
|
@@ -3,6 +3,7 @@ import { SectionBoxMesh } from './SectionBoxMesh';
|
|
|
3
3
|
import { SectionBoxOutline } from './sectionBoxOutline';
|
|
4
4
|
import { SectionBoxHandles } from './sectionBoxHandles';
|
|
5
5
|
import { Renderer } from '../../rendering/renderer';
|
|
6
|
+
import { ICamera } from '../../camera/camera';
|
|
6
7
|
export declare class SectionBoxGizmo {
|
|
7
8
|
private _renderer;
|
|
8
9
|
readonly cube: SectionBoxMesh;
|
|
@@ -11,7 +12,7 @@ export declare class SectionBoxGizmo {
|
|
|
11
12
|
private _visible;
|
|
12
13
|
get visible(): boolean;
|
|
13
14
|
set visible(value: boolean);
|
|
14
|
-
constructor(renderer: Renderer);
|
|
15
|
+
constructor(renderer: Renderer, camera: ICamera);
|
|
15
16
|
fitBox(box: THREE.Box3): void;
|
|
16
17
|
dispose(): void;
|
|
17
18
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
+
import { ICamera } from '../../camera/camera';
|
|
2
3
|
export type Axis = 'x' | 'y' | 'z';
|
|
3
4
|
export declare class SectionBoxHandle extends THREE.Mesh {
|
|
4
5
|
readonly axis: Axis;
|
|
@@ -7,7 +8,9 @@ export declare class SectionBoxHandle extends THREE.Mesh {
|
|
|
7
8
|
private _color;
|
|
8
9
|
private _highlightColor;
|
|
9
10
|
private _materials;
|
|
11
|
+
private _camSub;
|
|
10
12
|
constructor(axes: Axis, sign: number, size: number, color?: THREE.Color);
|
|
13
|
+
trackCamera(camera: ICamera): void;
|
|
11
14
|
setPosition(position: THREE.Vector3): void;
|
|
12
15
|
get forward(): THREE.Vector3;
|
|
13
16
|
highlight(value: boolean): void;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as THREE from 'three';
|
|
5
5
|
import { SectionBoxHandle } from './sectionBoxHandle';
|
|
6
|
+
import { ICamera } from '../../camera/camera';
|
|
6
7
|
export declare class SectionBoxHandles {
|
|
7
8
|
readonly up: SectionBoxHandle;
|
|
8
9
|
readonly down: SectionBoxHandle;
|
|
@@ -11,7 +12,7 @@ export declare class SectionBoxHandles {
|
|
|
11
12
|
readonly front: SectionBoxHandle;
|
|
12
13
|
readonly back: SectionBoxHandle;
|
|
13
14
|
readonly meshes: THREE.Group;
|
|
14
|
-
constructor();
|
|
15
|
+
constructor(camera: ICamera);
|
|
15
16
|
get visible(): boolean;
|
|
16
17
|
set visible(value: boolean);
|
|
17
18
|
fitBox(box: THREE.Box3): void;
|