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 +3 -1
- package/dist/3d-force-graph.d.ts +2 -1
- package/dist/3d-force-graph.js +19594 -10981
- package/dist/3d-force-graph.js.map +1 -1
- package/dist/3d-force-graph.min.js +3 -3
- package/dist/3d-force-graph.mjs +4 -4
- package/package.json +10 -10
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="//
|
|
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
|
+

|
package/dist/3d-force-graph.d.ts
CHANGED
|
@@ -87,4 +87,5 @@ interface IForceGraph3D<NodeType extends NodeObject = NodeObject, LinkType exten
|
|
|
87
87
|
|
|
88
88
|
declare const ForceGraph3D: IForceGraph3D;
|
|
89
89
|
|
|
90
|
-
export {
|
|
90
|
+
export { ForceGraph3D as default };
|
|
91
|
+
export type { ConfigOptions, ForceGraph3DInstance };
|