@samoramachel/netuniverse 1.2.1 → 1.3.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.
Files changed (2) hide show
  1. package/README.md +14 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A beautiful 3D graph visualization library for React built with Three.js and React Three Fiber.
4
4
 
5
- ![Network Universe](https://img.shields.io/badge/version-1.0.0-blue.svg)
5
+ ![Network Universe](https://img.shields.io/badge/version-1.3.0-blue.svg)
6
6
 
7
7
  ## Features
8
8
 
@@ -228,19 +228,25 @@ You can customize the graph behavior by importing and modifying the default conf
228
228
  | **Animation** | `bounce.enabled` | Bool | `true` | Enable boundary bounce effect. |
229
229
  | | `highlight.scale_hover` | Float | `1.5` | Scale factor on hover. |
230
230
 
231
- ```tsx
232
- import { defaultConfig } from 'netuniverse';
231
+ ```
232
+
233
+ ### Overriding Config via Props (New in v1.3.0)
233
234
 
234
- const myConfig = {
235
- ...defaultConfig,
235
+ You can override any specific configuration value by passing a `config` prop to `GraphScene`. This will be merged with the default configuration.
236
+
237
+ ```tsx
238
+ const customConfig = {
236
239
  graph: {
237
- ...defaultConfig.graph,
238
240
  colors: {
239
- ...defaultConfig.graph.colors,
240
- background: '#0f172a',
241
+ background: '#000000', // Override background color
241
242
  }
243
+ },
244
+ controls: {
245
+ enableZoom: false // Disable zoom
242
246
  }
243
247
  };
248
+
249
+ <GraphScene data={data} config={customConfig} />
244
250
  ```
245
251
 
246
252
  ## Development
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@samoramachel/netuniverse",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",