3d-force-graph 1.73.5 → 1.74.0

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 (38) hide show
  1. package/README.md +2 -3
  2. package/dist/3d-force-graph.d.ts +4 -6
  3. package/dist/3d-force-graph.js +25529 -38300
  4. package/dist/3d-force-graph.js.map +1 -1
  5. package/dist/3d-force-graph.min.js +3 -3
  6. package/example/async-load/index.html +1 -2
  7. package/example/auto-colored/index.html +1 -2
  8. package/example/basic/index.html +1 -2
  9. package/example/bloom-effect/index.html +1 -2
  10. package/example/camera-auto-orbit/index.html +1 -2
  11. package/example/click-to-focus/index.html +1 -2
  12. package/example/collision-detection/index.html +1 -2
  13. package/example/controls-fly/index.html +1 -2
  14. package/example/controls-orbit/index.html +1 -2
  15. package/example/curved-links/index.html +1 -2
  16. package/example/custom-node-geometry/index.html +1 -2
  17. package/example/dag-yarn/index.html +2 -3
  18. package/example/directional-links-arrows/index.html +1 -2
  19. package/example/directional-links-particles/index.html +1 -2
  20. package/example/dynamic/index.html +1 -1
  21. package/example/emit-particles/index.html +1 -2
  22. package/example/expandable-nodes/index.html +1 -1
  23. package/example/fit-to-canvas/index.html +1 -2
  24. package/example/fix-dragged-nodes/index.html +1 -2
  25. package/example/gradient-links/index.html +1 -2
  26. package/example/highlight/index.html +1 -2
  27. package/example/html-nodes/index.html +1 -2
  28. package/example/img-nodes/index.html +1 -2
  29. package/example/large-graph/index.html +1 -1
  30. package/example/manipulate-link-force/index.html +1 -2
  31. package/example/multi-selection/index.html +1 -2
  32. package/example/pause-resume/index.html +1 -2
  33. package/example/responsive/index.html +1 -2
  34. package/example/scene/index.html +1 -2
  35. package/example/text-links/index.html +1 -2
  36. package/example/text-nodes/index.html +1 -2
  37. package/example/tree/index.html +2 -3
  38. package/package.json +6 -6
package/README.md CHANGED
@@ -65,8 +65,7 @@ or using a *script* tag
65
65
  then
66
66
 
67
67
  ```js
68
- const myGraph = ForceGraph3D();
69
- myGraph(<myDOMElement>)
68
+ const myGraph = new ForceGraph3D(<myDOMElement>)
70
69
  .graphData(<myData>);
71
70
  ```
72
71
 
@@ -74,7 +73,7 @@ myGraph(<myDOMElement>)
74
73
 
75
74
  ### Initialisation
76
75
  ```js
77
- ForceGraph3d({ configOptions })(<domElement>)
76
+ new ForceGraph3d(<domElement>, { configOptions })
78
77
  ```
79
78
 
80
79
  | Config options | Description | Default |
@@ -16,9 +16,9 @@ type Coords = { x: number; y: number; z: number; };
16
16
  // don't surface these internal props from inner ThreeForceGraph
17
17
  type ExcludedInnerProps = 'onLoading' | 'onFinishLoading' | 'onUpdate' | 'onFinishUpdate' | 'tickFrame' | 'd3AlphaTarget' | 'resetCountdown';
18
18
 
19
- interface ForceGraph3DGenericInstance<ChainableInstance, N extends NodeObject = NodeObject, L extends LinkObject<N> = LinkObject<N>>
19
+ declare class ForceGraph3DGeneric<ChainableInstance, N extends NodeObject = NodeObject, L extends LinkObject<N> = LinkObject<N>>
20
20
  extends Omit<ThreeForceGraphGeneric<ChainableInstance, N, L>, ExcludedInnerProps> {
21
- (element: HTMLElement): ChainableInstance;
21
+ constructor(element: HTMLElement, configOptions?: ConfigOptions);
22
22
  _destructor(): void;
23
23
 
24
24
  // Container layout
@@ -76,8 +76,6 @@ interface ForceGraph3DGenericInstance<ChainableInstance, N extends NodeObject =
76
76
  screen2GraphCoords(screenX: number, screenY: number, distance: number): Coords;
77
77
  }
78
78
 
79
- type ForceGraph3DInstance<NodeType = NodeObject, LinkType = LinkObject<NodeType>> = ForceGraph3DGenericInstance<ForceGraph3DInstance<NodeType, LinkType>, NodeType, LinkType>;
79
+ declare class ForceGraph3D<NodeType = NodeObject, LinkType = LinkObject<NodeType>> extends ForceGraph3DGeneric<ForceGraph3D<NodeType, LinkType>, NodeType, LinkType> {}
80
80
 
81
- declare function ForceGraph3D<NodeType = NodeObject, LinkType = LinkObject<NodeType>>(configOptions?: ConfigOptions): ForceGraph3DInstance<NodeType, LinkType>;
82
-
83
- export { type ConfigOptions, type ForceGraph3DGenericInstance, type ForceGraph3DInstance, ForceGraph3D as default };
81
+ export { type ConfigOptions, ForceGraph3DGeneric, ForceGraph3D as default };