Update index.html
Browse files- index.html +22 -19
index.html
CHANGED
@@ -1,19 +1,22 @@
|
|
1 |
-
|
2 |
-
<
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
1 |
+
<head>
|
2 |
+
<style> body { margin: 0; } </style>
|
3 |
+
|
4 |
+
<script src="//unpkg.com/3d-force-graph"></script>
|
5 |
+
<!-- <script src="../../dist/3d-force-graph.js"></script>-->
|
6 |
+
</head>
|
7 |
+
|
8 |
+
<body>
|
9 |
+
|
10 |
+
<div id="3d-graph"></div>
|
11 |
+
|
12 |
+
<script>
|
13 |
+
const elem = document.getElementById('3d-graph');
|
14 |
+
|
15 |
+
const Graph = new ForceGraph3D(elem)
|
16 |
+
.jsonUrl('./forcegraphdata.json')
|
17 |
+
.nodeAutoColorBy('group')
|
18 |
+
.nodeLabel(
|
19 |
+
node => `${node.group}: ${node.id} - ${node.details}`)
|
20 |
+
;
|
21 |
+
</script>
|
22 |
+
</body>
|