@cosmos.gl/graph 2.6.2 → 2.7.0-beta.1

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/index.d.ts CHANGED
@@ -6,7 +6,8 @@ export declare class Graph {
6
6
  private canvas;
7
7
  private attributionDivElement;
8
8
  private canvasD3Selection;
9
- private reglInstance;
9
+ private device;
10
+ private deviceInitPromise;
10
11
  private requestAnimationFrameId;
11
12
  private isRightClickMouse;
12
13
  private store;
@@ -511,10 +512,22 @@ export declare class Graph {
511
512
  */
512
513
  pair(pointPositions: number[]): [number, number][];
513
514
  /**
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.
515
+ * Ensures device is initialized before executing a method.
516
+ * If device is not ready, queues the method to run after initialization.
517
+ * @param callback - Function to execute once device is ready
518
+ * @returns true if device was not ready and operation was queued, false if device is ready
519
+ */
520
+ private ensureDevice;
521
+ /**
522
+ * Internal device creation method
523
+ * Graph class decides what device to create with sensible defaults
517
524
  */
525
+ private createDevice;
526
+ /**
527
+ * Updates and recreates the graph visualization based on pending changes.
528
+ *
529
+ * @param simulationAlpha - Optional alpha value to set. If not provided, keeps current alpha.
530
+ */
518
531
  private update;
519
532
  /**
520
533
  * Runs one step of the simulation (forces, position updates, alpha decay).