@samoramachel/netuniverse 1.1.1 → 1.2.0

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
@@ -37,10 +37,11 @@ npm install react react-dom three
37
37
  ### Basic Example
38
38
 
39
39
  ```tsx
40
- import { GraphScene } from 'netuniverse';
40
+ import { GraphScene, generateGraphData } from 'netuniverse';
41
41
  import type { GraphData } from 'netuniverse';
42
42
 
43
- const data: GraphData = {
43
+ // Option 1: Use your own data
44
+ const myData: GraphData = {
44
45
  nodes: [
45
46
  { id: '1', label: 'Node 1', cluster: 'CORE', x: 0, y: 0, z: 0 },
46
47
  { id: '2', label: 'Node 2', cluster: 'FINANCE', x: 100, y: 0, z: 0 },
@@ -50,13 +51,17 @@ const data: GraphData = {
50
51
  ]
51
52
  };
52
53
 
54
+ // Option 2: Prototype with default random data
55
+ const defaultData = generateGraphData();
56
+
53
57
  function App() {
54
58
  const [selectedNode, setSelectedNode] = useState(null);
55
59
 
60
+ // Use myData or defaultData
56
61
  return (
57
62
  <div style={{ width: '100vw', height: '100vh' }}>
58
63
  <GraphScene
59
- data={data}
64
+ data={defaultData}
60
65
  onNodeSelect={setSelectedNode}
61
66
  selectedNodeId={selectedNode?.id || null}
62
67
  />
package/dist/index.es.js CHANGED
@@ -8430,6 +8430,7 @@ const Ay = [
8430
8430
  }
8431
8431
  ) }) });
8432
8432
  export {
8433
+ $t as ClusterId,
8433
8434
  Vd as GalaxyGraph,
8434
8435
  Oy as GraphScene,
8435
8436
  Ny as OverlayUI,