diff --git a/viewer/package.json b/viewer/package.json index a1b4ec08b70..2dd1447f01e 100644 --- a/viewer/package.json +++ b/viewer/package.json @@ -1,6 +1,6 @@ { "name": "@cognite/reveal", - "version": "4.15.0", + "version": "4.15.1", "description": "WebGL based 3D viewer for CAD and point clouds processed in Cognite Data Fusion.", "homepage": "https://github.com/cognitedata/reveal/tree/master/viewer", "repository": { diff --git a/viewer/packages/3d-overlays/src/Overlay3DCollection.ts b/viewer/packages/3d-overlays/src/Overlay3DCollection.ts index 86434470c70..52dbea367f5 100644 --- a/viewer/packages/3d-overlays/src/Overlay3DCollection.ts +++ b/viewer/packages/3d-overlays/src/Overlay3DCollection.ts @@ -57,6 +57,14 @@ export class Overlay3DCollection private readonly _rayCaster = new Raycaster(); private readonly _cameraChangeDebouncer = new CameraChangeThrottler(); + /** + * Construct a collection of 3D overlay icons + * + * @param overlayInfos Initializes the collection with the list of overlays. The length + * of the list will be the maximum allowed number of icons in this collection, unless it's empty, + * in which case a default maximum limit will be used instead + * @param options Additional options for this overlay collection + */ constructor(overlayInfos: OverlayInfo[], options?: Overlay3DCollectionOptions) { super(); @@ -69,7 +77,7 @@ export class Overlay3DCollection }; this._overlayPoints = new OverlayPointsObject( - overlayInfos ? overlayInfos.length : this.DefaultMaxPoints, + overlayInfos.length > 0 ? overlayInfos.length : this.DefaultMaxPoints, { spriteTexture: this._sharedTextures.color, maskTexture: this._sharedTextures.mask,