@cognite/reveal 4.32.1 → 4.32.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.
@@ -53,5 +53,6 @@ export declare class Image360Facade<T extends DataSourceType> {
53
53
  * Clear hovered cluster state for all collections.
54
54
  */
55
55
  clearHoveredClusters(): void;
56
+ setReferenceIcon(worldY: number | undefined): void;
56
57
  dispose(): void;
57
58
  }
@@ -96,6 +96,7 @@ export declare class DefaultImage360Collection<T extends DataSourceType> impleme
96
96
  setSelectedVisibility(visible: boolean): boolean;
97
97
  setCullingScheme(scheme: IconCullingScheme): void;
98
98
  setFloorMode(enabled: boolean): void;
99
+ setReferenceIcon(worldY: number | undefined): void;
99
100
  /**
100
101
  * Get the current cluster distance threshold.
101
102
  * @returns The current distance threshold for clustering
@@ -0,0 +1,46 @@
1
+ /*!
2
+ * Copyright 2026 Cognite AS
3
+ */
4
+ import { CanvasTexture, Matrix4, Texture, Vector3 } from 'three';
5
+ import { SceneHandler } from '../../../utilities';
6
+ import { Overlay3DIcon } from '../../../3d-overlays';
7
+ /**
8
+ * Manages two floor disc meshes (same level, elevated) and the floor hover mesh.
9
+ * Encapsulates all per-frame instance placement and elevation routing.
10
+ */
11
+ export declare class FlooredIconManager {
12
+ /** Total downward offset from icon/camera position to floor disc. */
13
+ static readonly FloorDiscHeightOffset = 1.45;
14
+ /** Height difference (metres) within which two stations are considered on the same floor. */
15
+ private static readonly FloorLevelThreshold;
16
+ /** Max icons shown for elevated (above + below combined) to avoid visual clutter. */
17
+ private static readonly ElevatedIconLimit;
18
+ private readonly _floorDiscMeshSameLevel;
19
+ private readonly _floorDiscMeshElevated;
20
+ private readonly _hoverMesh;
21
+ private readonly _worldPos;
22
+ private readonly _tempMatrix;
23
+ private readonly _sceneHandler;
24
+ private readonly _elevationTexture;
25
+ private readonly _floorDiscMeshColor;
26
+ private readonly _sameLevelCapacity;
27
+ private _referenceWorldY;
28
+ constructor(capacity: number, iconRadius: number, maxPixelSize: number, sameLevelTexture: Texture, hoverIconTexture: CanvasTexture, sceneHandler: SceneHandler);
29
+ set hoverVisible(value: boolean);
30
+ showMeshes(): void;
31
+ hideMeshesAndClearInstances(): void;
32
+ /**
33
+ * Update the floor disc instances.
34
+ * Icons must be sorted closest-first. The method selects up to capacity icons,
35
+ * then writes them in reverse order for correct back-to-front transparency rendering.
36
+ */
37
+ update(icons: Overlay3DIcon[], collectionTransform: Matrix4): void;
38
+ setHoverPosition(worldPos: Vector3): void;
39
+ setReferenceIcon(worldY: number | undefined): void;
40
+ setOpacity(value: number): void;
41
+ setOccludedVisible(value: boolean): void;
42
+ dispose(): void;
43
+ private createFloorDiscMesh;
44
+ private static createHoverMesh;
45
+ private static createElevationDiscTexture;
46
+ }
@@ -31,8 +31,6 @@ export type ClusterIntersectionData = {
31
31
  };
32
32
  export declare class IconCollection {
33
33
  private static readonly MinPixelSize;
34
- /** Total downward offset from icon/camera position to floor disc: camera height minus small floor clearance lift. */
35
- private static readonly FloorDiscHeightOffset;
36
34
  private static readonly DefaultMaxPixelSize;
37
35
  private static readonly DefaultProjectionMatrixElement;
38
36
  private static readonly DefaultRenderHeight;
@@ -43,6 +41,7 @@ export declare class IconCollection {
43
41
  private readonly _maxPixelSize;
44
42
  private readonly _sceneHandler;
45
43
  private readonly _sharedTexture;
44
+ private readonly _hoverIconTexture;
46
45
  private readonly _hoverSprite;
47
46
  private readonly _icons;
48
47
  private readonly _pointsObject;
@@ -65,10 +64,7 @@ export declare class IconCollection {
65
64
  private _maxOctreeDepth;
66
65
  private _activeCullingSchemeEventHandeler;
67
66
  private _iconCullingScheme;
68
- private readonly _floorDiscMesh;
69
- private _activeFloorDiscCount;
70
- private readonly _hiddenMatrix;
71
- private readonly _floorHoverMesh;
67
+ private readonly _floorDiscs;
72
68
  private _floorMode;
73
69
  private _preFloorPointsObjectVisible;
74
70
  private _preFloorCullingScheme;
@@ -155,8 +151,6 @@ export declare class IconCollection {
155
151
  private computeProximityPoints;
156
152
  private initializeImage360Icons;
157
153
  dispose(): void;
158
- private createFloorDiscMesh;
159
- private createFloorHoverMesh;
160
154
  private createHoverSprite;
161
155
  private createOuterRingsTexture;
162
156
  private createHoverIconTexture;
@@ -164,4 +158,5 @@ export declare class IconCollection {
164
158
  setOpacity(value: number): void;
165
159
  isOccludedVisible(): boolean;
166
160
  setOccludedVisible(value: boolean): void;
161
+ setReferenceIcon(worldY: number | undefined): void;
167
162
  }
@@ -12,6 +12,7 @@ export declare class Image360ApiHelper<DataSourceT extends DataSourceType> {
12
12
  private readonly _image360Facade;
13
13
  private readonly _domElement;
14
14
  private _transitionInProgress;
15
+ private readonly _waitCursor;
15
16
  private readonly _raycaster;
16
17
  private _needsRedraw;
17
18
  private readonly _hasEventListeners;
@@ -63,3 +63,4 @@ export * from './src/fdm';
63
63
  export * from './src/assetMappings';
64
64
  export * from './src/shapes';
65
65
  export * from './src/linalg';
66
+ export { WaitCursor } from './src/WaitCursor';
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright 2026 Cognite AS
3
+ */
4
+ export declare class WaitCursor {
5
+ private readonly _container;
6
+ private _refCount;
7
+ private _overlay;
8
+ constructor(_container: HTMLElement);
9
+ refAndUpdate(): void;
10
+ derefAndUpdate(): void;
11
+ dispose(): void;
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognite/reveal",
3
- "version": "4.32.1",
3
+ "version": "4.32.2",
4
4
  "description": "WebGL based 3D viewer for CAD and point clouds processed in Cognite Data Fusion.",
5
5
  "homepage": "https://github.com/cognitedata/reveal/tree/master/viewer",
6
6
  "repository": {