3d-force-graph 1.76.2 → 1.76.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.
package/README.md CHANGED
@@ -59,7 +59,7 @@ import ForceGraph3D from '3d-force-graph';
59
59
  or using a *script* tag
60
60
 
61
61
  ```html
62
- <script src="//unpkg.com/3d-force-graph"></script>
62
+ <script src="//cdn.jsdelivr.net/npm/3d-force-graph"></script>
63
63
  ```
64
64
 
65
65
  then
@@ -115,6 +115,7 @@ new ForceGraph3d(<domElement>, { configOptions })
115
115
  | <b>nodeResolution</b>([<i>num</i>]) | Getter/setter for the geometric resolution of each node, expressed in how many slice segments to divide the circumference. Higher values yield smoother spheres. | 8 |
116
116
  | <b>nodeThreeObject</b>([<i>Object3d</i>, <i>str</i> or <i>fn</i>]) | Node object accessor function or attribute for generating a custom 3d object to render as graph nodes. Should return an instance of [ThreeJS Object3d](https://threejs.org/docs/index.html#api/core/Object3D). If a <i>falsy</i> value is returned, the default 3d object type will be used instead for that node. | *default node object is a sphere, sized according to `val` and styled according to `color`.* |
117
117
  | <b>nodeThreeObjectExtend</b>([<i>bool</i>, <i>str</i> or <i>fn</i>]) | Node object accessor function, attribute or a boolean value for whether to replace the default node when using a custom `nodeThreeObject` (`false`) or to extend it (`true`). | `false` |
118
+ | <b>nodePositionUpdate</b>([<i>fn(nodeObject, coords, node)</i>]) | Getter/setter for the custom function to call for updating the position of nodes at every render iteration. It receives the respective node `ThreeJS Object3d`, the coordinates of the node (`{x,y,z}` each), and the node's `data`. If the function returns a truthy value, the regular position update function will not run for that node. | |
118
119
 
119
120
  ### Link styling
120
121
 
@@ -245,3 +246,4 @@ new ForceGraph3d(<domElement>, { configOptions })
245
246
  [build-size-url]: https://bundlephobia.com/result?p=3d-force-graph
246
247
  [npm-downloads-img]: https://img.shields.io/npm/dt/3d-force-graph
247
248
  [npm-downloads-url]: https://www.npmtrends.com/3d-force-graph
249
+ ![](https://github.com/vasturiano/3d-force-graph/blob/9376e16343721efd0416710c21db03ce8fa4dfb0/package.json#L57)
@@ -87,4 +87,5 @@ interface IForceGraph3D<NodeType extends NodeObject = NodeObject, LinkType exten
87
87
 
88
88
  declare const ForceGraph3D: IForceGraph3D;
89
89
 
90
- export { type ConfigOptions, type ForceGraph3DInstance, ForceGraph3D as default };
90
+ export { ForceGraph3D as default };
91
+ export type { ConfigOptions, ForceGraph3DInstance };