1234567891011121314151617181920212223242526 |
- <head>
- <style> body { margin: 0; } </style>
- <script src="//unpkg.com/3d-force-graph"></script>
- <!-- <script src="../../dist/3d-force-graph.js"></script>-->
- </head>
- <body>
- <div id="3d-graph"></div>
- <script type="module">
- import { UnrealBloomPass } from '//cdn.skypack.dev/three/examples/jsm/postprocessing/UnrealBloomPass.js';
- const Graph = ForceGraph3D()
- (document.getElementById('3d-graph'))
- .jsonUrl('../datasets/miserables.json')
- .nodeLabel('id')
- .nodeAutoColorBy('group');
- const bloomPass = new UnrealBloomPass();
- bloomPass.strength = 3;
- bloomPass.radius = 1;
- bloomPass.threshold = 0.1;
- Graph.postProcessingComposer().addPass(bloomPass);
- </script>
- </body>
|