flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
37
BACK_BACK/node_modules/force-graph/example/curved-links/index.html
generated
vendored
Executable file
37
BACK_BACK/node_modules/force-graph/example/curved-links/index.html
generated
vendored
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
<head>
|
||||
<style> body { margin: 0; } </style>
|
||||
|
||||
<script src="//unpkg.com/force-graph"></script>
|
||||
<!--<script src="../../dist/force-graph.js"></script>-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="graph"></div>
|
||||
|
||||
<script>
|
||||
const gData = {
|
||||
nodes: [...Array(9).keys()].map(i => ({ id: i })),
|
||||
links: [
|
||||
{ source: 1, target: 4, curvature: 0 },
|
||||
{ source: 1, target: 4, curvature: 0.5 },
|
||||
{ source: 1, target: 4, curvature: -0.5 },
|
||||
{ source: 5, target: 2, curvature: 0.3 },
|
||||
{ source: 2, target: 5, curvature: 0.3 },
|
||||
{ source: 0, target: 3, curvature: 0 },
|
||||
{ source: 3, target: 3, curvature: 0.5 },
|
||||
{ source: 0, target: 4, curvature: 0.2 },
|
||||
{ source: 4, target: 5, curvature: 0.5 },
|
||||
{ source: 5, target: 6, curvature: 0.7 },
|
||||
{ source: 6, target: 7, curvature: 1 },
|
||||
{ source: 7, target: 8, curvature: 2 },
|
||||
{ source: 8, target: 0, curvature: 0.5 }
|
||||
]
|
||||
};
|
||||
|
||||
const Graph = ForceGraph()
|
||||
(document.getElementById('graph'))
|
||||
.linkDirectionalParticles(2)
|
||||
.linkCurvature('curvature')
|
||||
.graphData(gData);
|
||||
</script>
|
||||
</body>
|
||||
Loading…
Add table
Add a link
Reference in a new issue