@cosmos.gl/graph 2.6.2-rc.0 → 2.6.3

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.
Files changed (45) hide show
  1. package/dist/index-CSMQs8iI.js +19876 -0
  2. package/dist/index-CSMQs8iI.js.map +1 -0
  3. package/dist/index.js +14 -14654
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1057 -473
  6. package/dist/index.min.js.map +1 -1
  7. package/dist/{config.d.ts → src/config.d.ts} +11 -18
  8. package/dist/{graph → src/graph}/utils/error-message.d.ts +1 -1
  9. package/dist/src/helper.d.ts +61 -0
  10. package/dist/{index.d.ts → src/index.d.ts} +28 -5
  11. package/dist/{modules → src/modules}/Clusters/index.d.ts +13 -6
  12. package/dist/{modules → src/modules}/ForceCenter/index.d.ts +11 -3
  13. package/dist/src/modules/ForceGravity/index.d.ts +13 -0
  14. package/dist/{modules → src/modules}/ForceLink/index.d.ts +10 -4
  15. package/dist/src/modules/ForceManyBody/index.d.ts +26 -0
  16. package/dist/src/modules/ForceMouse/index.d.ts +13 -0
  17. package/dist/{modules → src/modules}/Lines/index.d.ts +16 -5
  18. package/dist/{modules → src/modules}/Points/index.d.ts +32 -16
  19. package/dist/src/modules/Shared/buffer.d.ts +1 -0
  20. package/dist/src/modules/Shared/texture-utils.d.ts +8 -0
  21. package/dist/src/modules/Shared/uniform-utils.d.ts +11 -0
  22. package/dist/src/modules/Store/index.d.ts +169 -0
  23. package/dist/{modules → src/modules}/core-module.d.ts +3 -3
  24. package/dist/{variables.d.ts → src/variables.d.ts} +0 -2
  25. package/dist/vite.config.d.ts +2 -0
  26. package/dist/webgl-device-QoBMYpnS.js +3933 -0
  27. package/dist/webgl-device-QoBMYpnS.js.map +1 -0
  28. package/package.json +1 -1
  29. package/dist/helper.d.ts +0 -24
  30. package/dist/modules/ForceGravity/index.d.ts +0 -6
  31. package/dist/modules/ForceManyBody/index.d.ts +0 -16
  32. package/dist/modules/ForceManyBody/quadtree-frag-shader.d.ts +0 -1
  33. package/dist/modules/ForceManyBodyQuadtree/index.d.ts +0 -15
  34. package/dist/modules/ForceManyBodyQuadtree/quadtree-frag-shader.d.ts +0 -1
  35. package/dist/modules/ForceMouse/index.d.ts +0 -6
  36. package/dist/modules/Shared/buffer.d.ts +0 -8
  37. package/dist/modules/Store/index.d.ts +0 -75
  38. /package/dist/{modules → src/modules}/Drag/index.d.ts +0 -0
  39. /package/dist/{modules → src/modules}/FPSMonitor/css.d.ts +0 -0
  40. /package/dist/{modules → src/modules}/FPSMonitor/index.d.ts +0 -0
  41. /package/dist/{modules → src/modules}/ForceLink/force-spring.d.ts +0 -0
  42. /package/dist/{modules → src/modules}/GraphData/index.d.ts +0 -0
  43. /package/dist/{modules → src/modules}/Lines/geometry.d.ts +0 -0
  44. /package/dist/{modules → src/modules}/Points/atlas-utils.d.ts +0 -0
  45. /package/dist/{modules → src/modules}/Zoom/index.d.ts +0 -0
@@ -58,6 +58,8 @@ export interface GraphConfigInterface {
58
58
  * if the size value in the array is `undefined` or `null`.
59
59
  * Default value: `4`
60
60
  */
61
+ pointDefaultSize?: number;
62
+ /** @deprecated Use `pointDefaultSize` instead */
61
63
  pointSize?: number;
62
64
  /**
63
65
  * Universal opacity value applied to all points.
@@ -135,6 +137,8 @@ export interface GraphConfigInterface {
135
137
  * The default width value to use for links when no link widths are provided or if the width value in the array is `undefined` or `null`.
136
138
  * Default value: `1`
137
139
  */
140
+ linkDefaultWidth?: number;
141
+ /** @deprecated Use `linkDefaultWidth` instead */
138
142
  linkWidth?: number;
139
143
  /**
140
144
  * The color to use for links when they are hovered.
@@ -185,6 +189,8 @@ export interface GraphConfigInterface {
185
189
  * The default link arrow value that controls whether or not to display link arrows.
186
190
  * Default value: `false`
187
191
  */
192
+ linkDefaultArrows?: boolean;
193
+ /** @deprecated Use `linkDefaultArrows` instead */
188
194
  linkArrows?: boolean;
189
195
  /**
190
196
  * Scale factor for the link arrows size.
@@ -207,13 +213,6 @@ export interface GraphConfigInterface {
207
213
  * Default value: `0.25`
208
214
  */
209
215
  linkVisibilityMinTransparency?: number;
210
- /**
211
- * Use the classic quadtree algorithm for the Many-Body force.
212
- * This property will be applied only on component initialization and it
213
- * can't be changed using the `setConfig` method.
214
- * Default value: `false`
215
- */
216
- useClassicQuadtree?: boolean;
217
216
  /**
218
217
  * Decay coefficient. Use smaller values if you want the simulation to "cool down" slower.
219
218
  * Default value: `5000`
@@ -236,16 +235,9 @@ export interface GraphConfigInterface {
236
235
  simulationRepulsion?: number;
237
236
  /**
238
237
  * Decreases / increases the detalization of the Many-Body force calculations.
239
- * When `useClassicQuadtree` is set to `true`, this property corresponds to the Barnes–Hut approximation criterion.
240
238
  * Default value: `1.15`
241
239
  */
242
240
  simulationRepulsionTheta?: number;
243
- /**
244
- * Barnes–Hut approximation depth.
245
- * Can only be used when `useClassicQuadtree` is set `true`.
246
- * Default value: `12`
247
- */
248
- simulationRepulsionQuadtreeLevels?: number;
249
241
  /**
250
242
  * Link spring force coefficient.
251
243
  * Default value: `1`
@@ -441,8 +433,8 @@ export interface GraphConfigInterface {
441
433
  */
442
434
  showFPSMonitor?: boolean;
443
435
  /**
444
- * Canvas pixel ratio.
445
- * Default value: `2`
436
+ * Pixel ratio for the canvas. Higher values use more GPU memory but provide better quality on high-DPI displays.
437
+ * Default value: `window.devicePixelRatio || 2`
446
438
  */
447
439
  pixelRatio?: number;
448
440
  /**
@@ -553,6 +545,7 @@ export declare class GraphConfig implements GraphConfigInterface {
553
545
  pointGreyoutOpacity: undefined;
554
546
  pointGreyoutColor: undefined;
555
547
  pointSize: number;
548
+ pointDefaultSize: undefined;
556
549
  pointOpacity: number;
557
550
  pointSizeScale: number;
558
551
  hoveredPointCursor: string;
@@ -566,6 +559,7 @@ export declare class GraphConfig implements GraphConfigInterface {
566
559
  linkOpacity: number;
567
560
  linkGreyoutOpacity: number;
568
561
  linkWidth: number;
562
+ linkDefaultWidth: undefined;
569
563
  linkWidthScale: number;
570
564
  hoveredLinkColor: undefined;
571
565
  hoveredLinkWidthIncrease: number;
@@ -575,17 +569,16 @@ export declare class GraphConfig implements GraphConfigInterface {
575
569
  curvedLinkWeight: number;
576
570
  curvedLinkControlPointDistance: number;
577
571
  linkArrows: boolean;
572
+ linkDefaultArrows: undefined;
578
573
  linkArrowsSizeScale: number;
579
574
  scaleLinksOnZoom: boolean;
580
575
  linkVisibilityDistanceRange: number[];
581
576
  linkVisibilityMinTransparency: number;
582
- useClassicQuadtree: boolean;
583
577
  simulationDecay: number;
584
578
  simulationGravity: number;
585
579
  simulationCenter: number;
586
580
  simulationRepulsion: number;
587
581
  simulationRepulsionTheta: number;
588
- simulationRepulsionQuadtreeLevels: number;
589
582
  simulationLinkSpring: number;
590
583
  simulationLinkDistance: number;
591
584
  simulationLinkDistRandomVariationRange: number[];
@@ -3,4 +3,4 @@
3
3
  * @param container The HTML element to append the error message to
4
4
  * @returns The created error div element
5
5
  */
6
- export declare function createWebGLErrorMessage(container: HTMLElement): HTMLDivElement;
6
+ export declare function createWebGLErrorMessage(container: HTMLElement, error: string): HTMLDivElement;
@@ -0,0 +1,61 @@
1
+ import { Device, Framebuffer } from '@luma.gl/core';
2
+ import { default as DOMPurify } from 'dompurify';
3
+ export declare const isFunction: <T>(a: T) => boolean;
4
+ export declare const isArray: <T>(a: unknown | T[]) => a is T[];
5
+ export declare const isObject: <T>(a: T) => boolean;
6
+ export declare const isAClassInstance: <T>(a: T) => boolean;
7
+ export declare const isPlainObject: <T>(a: T) => boolean;
8
+ export declare function getRgbaColor(value: string | [number, number, number, number]): [number, number, number, number];
9
+ export declare function rgbToBrightness(r: number, g: number, b: number): number;
10
+ /**
11
+ * TODO: Migrate from deprecated `readPixelsToArrayWebGL` to CommandEncoder API
12
+ *
13
+ * `readPixelsToArrayWebGL` is deprecated in luma.gl v9. The recommended modern approach is:
14
+ *
15
+ * 1. Create a buffer to hold the pixel data:
16
+ * const buffer = device.createBuffer({
17
+ * byteLength: width * height * 4 * 4, // RGBA, 4 bytes per float
18
+ * usage: Buffer.COPY_DST | Buffer.MAP_READ
19
+ * });
20
+ *
21
+ * 2. Copy texture/framebuffer to buffer using command encoder:
22
+ * const commandEncoder = device.createCommandEncoder();
23
+ * commandEncoder.copyTextureToBuffer({
24
+ * sourceTexture: fbo, // Can be Texture or Framebuffer
25
+ * width: sourceWidth ?? fbo.width,
26
+ * height: sourceHeight ?? fbo.height,
27
+ * origin: [sourceX, sourceY],
28
+ * destinationBuffer: buffer
29
+ * });
30
+ * const commandBuffer = commandEncoder.finish();
31
+ * device.submit(commandBuffer);
32
+ *
33
+ * 3. Read the data from the buffer (async):
34
+ * const pixelData = await buffer.readAsync(); // Returns ArrayBuffer
35
+ * return new Float32Array(pixelData);
36
+ *
37
+ * Note: The modern approach is asynchronous, so this function signature would need to change
38
+ * to return Promise<Float32Array> or we'd need to handle async at all call sites (18 locations).
39
+ *
40
+ * Migration impact:
41
+ * - This function is used in 18 places across the codebase
42
+ * - All call sites would need to be updated to handle async
43
+ * - Consider batching the migration to avoid inconsistencies
44
+ *
45
+ * Current status: Deprecated but still functional. Keeping for now until full migration can be planned.
46
+ */
47
+ export declare function readPixels(device: Device, fbo: Framebuffer, sourceX?: number, sourceY?: number, sourceWidth?: number, sourceHeight?: number): Float32Array;
48
+ export declare function clamp(num: number, min: number, max: number): number;
49
+ export declare function isNumber(value: number | undefined | null | typeof NaN): boolean;
50
+ /**
51
+ * Sanitizes HTML content to prevent XSS attacks using DOMPurify
52
+ *
53
+ * This function is used internally to sanitize HTML content before setting innerHTML,
54
+ * such as in attribution text. It uses a safe default configuration that allows
55
+ * only common safe HTML elements and attributes.
56
+ *
57
+ * @param html The HTML string to sanitize
58
+ * @param options Optional DOMPurify configuration options to override defaults
59
+ * @returns Sanitized HTML string safe for innerHTML usage
60
+ */
61
+ export declare function sanitizeHtml(html: string, options?: DOMPurify.Config): string;
@@ -1,3 +1,4 @@
1
+ import { Device } from '@luma.gl/core';
1
2
  import { GraphConfig, GraphConfigInterface } from './config';
2
3
  import { GraphData } from './modules/GraphData';
3
4
  export declare class Graph {
@@ -6,7 +7,8 @@ export declare class Graph {
6
7
  private canvas;
7
8
  private attributionDivElement;
8
9
  private canvasD3Selection;
9
- private reglInstance;
10
+ private device;
11
+ private deviceInitPromise;
10
12
  private requestAnimationFrameId;
11
13
  private isRightClickMouse;
12
14
  private store;
@@ -52,7 +54,7 @@ export declare class Graph {
52
54
  private isForceCenterUpdateNeeded;
53
55
  private isPointImageSizesUpdateNeeded;
54
56
  private _isDestroyed;
55
- constructor(div: HTMLDivElement, config?: GraphConfigInterface);
57
+ constructor(div: HTMLDivElement, config?: GraphConfigInterface, devicePromise?: Promise<Device>);
56
58
  /**
57
59
  * Returns the current simulation progress
58
60
  */
@@ -511,10 +513,31 @@ export declare class Graph {
511
513
  */
512
514
  pair(pointPositions: number[]): [number, number][];
513
515
  /**
514
- * Updates and recreates the graph visualization based on pending changes.
515
- *
516
- * @param simulationAlpha - Optional alpha value to set. If not provided, keeps current alpha.
516
+ * Ensures device is initialized before executing a method.
517
+ * If device is not ready, queues the method to run after initialization.
518
+ * @param callback - Function to execute once device is ready
519
+ * @returns true if device was not ready and operation was queued, false if device is ready
520
+ */
521
+ private ensureDevice;
522
+ /**
523
+ * Validates that a device has the required HTMLCanvasElement canvas context.
524
+ * Cosmos requires an HTMLCanvasElement canvas context and does not support
525
+ * OffscreenCanvas or compute-only devices.
526
+ * @param device - The device to validate
527
+ * @returns The validated canvas context (guaranteed to be non-null and HTMLCanvasElement type)
528
+ * @throws Error if the device does not meet Cosmos requirements
517
529
  */
530
+ private validateDevice;
531
+ /**
532
+ * Internal device creation method
533
+ * Graph class decides what device to create with sensible defaults
534
+ */
535
+ private createDevice;
536
+ /**
537
+ * Updates and recreates the graph visualization based on pending changes.
538
+ *
539
+ * @param simulationAlpha - Optional alpha value to set. If not provided, keeps current alpha.
540
+ */
518
541
  private update;
519
542
  /**
520
543
  * Runs one step of the simulation (forces, position updates, alpha decay).
@@ -1,12 +1,8 @@
1
- import { default as regl } from 'regl';
1
+ import { Framebuffer } from '@luma.gl/core';
2
2
  import { CoreModule } from '../core-module';
3
3
  export declare class Clusters extends CoreModule {
4
- centermassFbo: regl.Framebuffer2D | undefined;
4
+ centermassFbo: Framebuffer | undefined;
5
5
  clusterCount: number | undefined;
6
- private clusterFbo;
7
- private clusterPositionsFbo;
8
- private clusterForceCoefficientFbo;
9
- private clearCentermassCommand;
10
6
  private calculateCentermassCommand;
11
7
  private applyForcesCommand;
12
8
  private clusterTexture;
@@ -15,8 +11,19 @@ export declare class Clusters extends CoreModule {
15
11
  private centermassTexture;
16
12
  private pointIndices;
17
13
  private clustersTextureSize;
14
+ private applyForcesVertexCoordBuffer;
15
+ private previousPointsTextureSize;
16
+ private previousClustersTextureSize;
17
+ private previousClusterCount;
18
+ private calculateCentermassUniformStore;
19
+ private applyForcesUniformStore;
18
20
  create(): void;
19
21
  initPrograms(): void;
20
22
  calculateCentermass(): void;
21
23
  run(): void;
24
+ /**
25
+ * Destruction order matters
26
+ * Models -> Framebuffers -> Textures -> UniformStores -> Buffers
27
+ */
28
+ destroy(): void;
22
29
  }
@@ -1,12 +1,20 @@
1
1
  import { CoreModule } from '../core-module';
2
2
  export declare class ForceCenter extends CoreModule {
3
+ private centermassTexture;
3
4
  private centermassFbo;
4
- private clearCentermassCommand;
5
+ private pointIndices;
5
6
  private calculateCentermassCommand;
6
7
  private runCommand;
7
- private centermassTexture;
8
- private pointIndices;
8
+ private forceVertexCoordBuffer;
9
+ private calculateUniformStore;
10
+ private forceUniformStore;
11
+ private previousPointsTextureSize;
9
12
  create(): void;
10
13
  initPrograms(): void;
11
14
  run(): void;
15
+ /**
16
+ * Destruction order matters
17
+ * Models -> Framebuffers -> Textures -> UniformStores -> Buffers
18
+ */
19
+ destroy(): void;
12
20
  }
@@ -0,0 +1,13 @@
1
+ import { CoreModule } from '../core-module';
2
+ export declare class ForceGravity extends CoreModule {
3
+ private runCommand;
4
+ private vertexCoordBuffer;
5
+ private uniformStore;
6
+ initPrograms(): void;
7
+ run(): void;
8
+ /**
9
+ * Destruction order matters
10
+ * Models -> Framebuffers -> Textures -> UniformStores -> Buffers
11
+ */
12
+ destroy(): void;
13
+ }
@@ -4,14 +4,15 @@ export declare enum LinkDirection {
4
4
  INCOMING = "incoming"
5
5
  }
6
6
  export declare class ForceLink extends CoreModule {
7
- private linkFirstIndicesAndAmountFbo;
8
- private indicesFbo;
9
- private biasAndStrengthFbo;
10
- private randomDistanceFbo;
11
7
  private linkFirstIndicesAndAmount;
12
8
  private indices;
13
9
  private maxPointDegree;
10
+ private previousMaxPointDegree;
11
+ private previousPointsTextureSize;
12
+ private previousLinksTextureSize;
14
13
  private runCommand;
14
+ private vertexCoordBuffer;
15
+ private uniformStore;
15
16
  private linkFirstIndicesAndAmountTexture;
16
17
  private indicesTexture;
17
18
  private biasAndStrengthTexture;
@@ -19,4 +20,9 @@ export declare class ForceLink extends CoreModule {
19
20
  create(direction: LinkDirection): void;
20
21
  initPrograms(): void;
21
22
  run(): void;
23
+ /**
24
+ * Destruction order matters
25
+ * Models -> Framebuffers -> Textures -> UniformStores -> Buffers
26
+ */
27
+ destroy(): void;
22
28
  }
@@ -0,0 +1,26 @@
1
+ import { CoreModule } from '../core-module';
2
+ export declare class ForceManyBody extends CoreModule {
3
+ private randomValuesTexture;
4
+ private pointIndices;
5
+ private levels;
6
+ private levelTargets;
7
+ private calculateLevelsCommand;
8
+ private forceCommand;
9
+ private forceFromItsOwnCentermassCommand;
10
+ private forceVertexCoordBuffer;
11
+ private calculateLevelsUniformStore;
12
+ private forceUniformStore;
13
+ private forceCenterUniformStore;
14
+ private previousPointsTextureSize;
15
+ private previousSpaceSize;
16
+ create(): void;
17
+ initPrograms(): void;
18
+ run(): void;
19
+ /**
20
+ * Destruction order matters
21
+ * Models -> Framebuffers -> Textures -> UniformStores -> Buffers
22
+ */
23
+ destroy(): void;
24
+ private drawLevels;
25
+ private drawForces;
26
+ }
@@ -0,0 +1,13 @@
1
+ import { CoreModule } from '../core-module';
2
+ export declare class ForceMouse extends CoreModule {
3
+ private runCommand;
4
+ private vertexCoordBuffer;
5
+ private uniformStore;
6
+ initPrograms(): void;
7
+ run(): void;
8
+ /**
9
+ * Destruction order matters
10
+ * Models -> Framebuffers -> Textures -> UniformStores -> Buffers
11
+ */
12
+ destroy(): void;
13
+ }
@@ -1,11 +1,12 @@
1
- import { default as regl } from 'regl';
1
+ import { Framebuffer, RenderPass } from '@luma.gl/core';
2
2
  import { CoreModule } from '../core-module';
3
3
  export declare class Lines extends CoreModule {
4
- linkIndexFbo: regl.Framebuffer2D | undefined;
5
- hoveredLineIndexFbo: regl.Framebuffer2D | undefined;
4
+ linkIndexFbo: Framebuffer | undefined;
5
+ hoveredLineIndexFbo: Framebuffer | undefined;
6
6
  private drawCurveCommand;
7
7
  private hoveredLineIndexCommand;
8
- private pointsBuffer;
8
+ private pointABuffer;
9
+ private pointBBuffer;
9
10
  private colorBuffer;
10
11
  private widthBuffer;
11
12
  private arrowBuffer;
@@ -13,8 +14,13 @@ export declare class Lines extends CoreModule {
13
14
  private curveLineBuffer;
14
15
  private linkIndexBuffer;
15
16
  private quadBuffer;
17
+ private linkIndexTexture;
18
+ private hoveredLineIndexTexture;
19
+ private drawLineUniformStore;
20
+ private hoveredLineIndexUniformStore;
21
+ private previousScreenSize;
16
22
  initPrograms(): void;
17
- draw(): void;
23
+ draw(renderPass: RenderPass): void;
18
24
  updateLinkIndexFbo(): void;
19
25
  updatePointsBuffer(): void;
20
26
  updateColor(): void;
@@ -22,4 +28,9 @@ export declare class Lines extends CoreModule {
22
28
  updateArrow(): void;
23
29
  updateCurveLineGeometry(): void;
24
30
  findHoveredLine(): void;
31
+ /**
32
+ * Destruction order matters
33
+ * Models -> Framebuffers -> Textures -> UniformStores -> Buffers
34
+ */
35
+ destroy(): void;
25
36
  }
@@ -1,26 +1,27 @@
1
- import { default as regl } from 'regl';
1
+ import { Framebuffer, Texture, RenderPass } from '@luma.gl/core';
2
2
  import { CoreModule } from '../core-module';
3
3
  export declare class Points extends CoreModule {
4
- currentPositionFbo: regl.Framebuffer2D | undefined;
5
- previousPositionFbo: regl.Framebuffer2D | undefined;
6
- velocityFbo: regl.Framebuffer2D | undefined;
7
- selectedFbo: regl.Framebuffer2D | undefined;
8
- hoveredFbo: regl.Framebuffer2D | undefined;
9
- greyoutStatusFbo: regl.Framebuffer2D | undefined;
4
+ currentPositionFbo: Framebuffer | undefined;
5
+ previousPositionFbo: Framebuffer | undefined;
6
+ velocityFbo: Framebuffer | undefined;
7
+ selectedFbo: Framebuffer | undefined;
8
+ hoveredFbo: Framebuffer | undefined;
10
9
  scaleX: ((x: number) => number) | undefined;
11
10
  scaleY: ((y: number) => number) | undefined;
12
11
  shouldSkipRescale: boolean | undefined;
13
- imageAtlasTexture: regl.Texture2D | undefined;
12
+ imageAtlasTexture: Texture | undefined;
14
13
  imageCount: number;
14
+ currentPositionTexture: Texture | undefined;
15
+ previousPositionTexture: Texture | undefined;
16
+ velocityTexture: Texture | undefined;
17
+ greyoutStatusTexture: Texture | undefined;
15
18
  private colorBuffer;
16
- private sizeFbo;
17
19
  private sizeBuffer;
18
20
  private shapeBuffer;
19
21
  private imageIndicesBuffer;
20
22
  private imageSizesBuffer;
21
23
  private imageAtlasCoordsTexture;
22
24
  private imageAtlasCoordsTextureSize;
23
- private trackedIndicesFbo;
24
25
  private trackedPositionsFbo;
25
26
  private sampledPointsFbo;
26
27
  private trackedPositions;
@@ -32,23 +33,33 @@ export declare class Points extends CoreModule {
32
33
  private findPointsOnAreaSelectionCommand;
33
34
  private findPointsOnPolygonSelectionCommand;
34
35
  private findHoveredPointCommand;
35
- private clearHoveredFboCommand;
36
- private clearSampledPointsFboCommand;
37
36
  private fillSampledPointsFboCommand;
38
37
  private trackPointsCommand;
38
+ private updatePositionVertexCoordBuffer;
39
+ private dragPointVertexCoordBuffer;
40
+ private findPointsOnAreaSelectionVertexCoordBuffer;
41
+ private findPointsOnPolygonSelectionVertexCoordBuffer;
42
+ private drawHighlightedVertexCoordBuffer;
43
+ private trackPointsVertexCoordBuffer;
39
44
  private trackedIndices;
40
45
  private selectedTexture;
41
- private greyoutStatusTexture;
42
46
  private pinnedStatusTexture;
43
- private pinnedStatusFbo;
44
47
  private sizeTexture;
45
48
  private trackedIndicesTexture;
46
49
  private polygonPathTexture;
47
- private polygonPathFbo;
48
50
  private polygonPathLength;
49
51
  private drawPointIndices;
50
52
  private hoveredPointIndices;
51
53
  private sampledPointIndices;
54
+ private updatePositionUniformStore;
55
+ private dragPointUniformStore;
56
+ private drawUniformStore;
57
+ private findPointsOnAreaSelectionUniformStore;
58
+ private findPointsOnPolygonSelectionUniformStore;
59
+ private findHoveredPointUniformStore;
60
+ private fillSampledPointsUniformStore;
61
+ private drawHighlightedUniformStore;
62
+ private trackPointsUniformStore;
52
63
  updatePositions(): void;
53
64
  initPrograms(): void;
54
65
  updateColor(): void;
@@ -61,7 +72,7 @@ export declare class Points extends CoreModule {
61
72
  createAtlas(): void;
62
73
  updateSampledPointsGrid(): void;
63
74
  trackPoints(): void;
64
- draw(): void;
75
+ draw(renderPass: RenderPass): void;
65
76
  updatePosition(): void;
66
77
  drag(): void;
67
78
  findPointsOnAreaSelection(): void;
@@ -84,6 +95,11 @@ export declare class Points extends CoreModule {
84
95
  positions: number[];
85
96
  };
86
97
  getTrackedPositionsArray(): number[];
98
+ /**
99
+ * Destruction order matters
100
+ * Models -> Framebuffers -> Textures -> UniformStores -> Buffers
101
+ * */
102
+ destroy(): void;
87
103
  private swapFbo;
88
104
  private rescaleInitialNodePositions;
89
105
  }
@@ -0,0 +1 @@
1
+ export declare function createIndexesForBuffer(textureSize: number): Float32Array;
@@ -0,0 +1,8 @@
1
+ import { TextureFormat } from '@luma.gl/core';
2
+ /**
3
+ * Calculates bytesPerRow for texture uploads.
4
+ * @param format - Texture format
5
+ * @param width - Texture width in pixels
6
+ * @returns bytesPerRow in bytes
7
+ */
8
+ export declare function getBytesPerRow(format: TextureFormat, width: number): number;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Validates and normalizes array values to fixed-size tuples for shader uniforms.
3
+ */
4
+ /**
5
+ * Ensures a value is a vec2 tuple [number, number].
6
+ */
7
+ export declare function ensureVec2(arr: number[] | undefined, fallback: [number, number]): [number, number];
8
+ /**
9
+ * Ensures a value is a vec4 tuple [number, number, number, number].
10
+ */
11
+ export declare function ensureVec4(arr: number[] | undefined, fallback: [number, number, number, number]): [number, number, number, number];