{"_id":"@dzole0311/deck.gl-edge-bundle","name":"@dzole0311/deck.gl-edge-bundle","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@dzole0311/deck.gl-edge-bundle","version":"0.1.0","description":"Edge-bundling layer for deck.gl - GPU-accelerated flow aggregation with centroid, spine, force, and force-gpu algorithms","license":"MIT","type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","require":"./dist/index.cjs","import":"./dist/index.js"}},"publishConfig":{"access":"public"},"keywords":["deck.gl","deckgl","edge-bundling","flow-map","origin-destination","webgl","geospatial"],"repository":{"type":"git","url":"git+https://github.com/dzole0311/deck.gl-edge-bundle.git"},"peerDependencies":{"@deck.gl/core":"^9.0.0","@deck.gl/layers":"^9.0.0"},"devDependencies":{"@deck.gl/core":"^9.2.6","@deck.gl/layers":"^9.2.6","tsup":"^8.x","typescript":"~5.9.x"},"scripts":{"build":"tsup","build:watch":"tsup --watch","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_id":"@dzole0311/deck.gl-edge-bundle@0.1.0","gitHead":"093664871fad58ea48ae0c15a9a744657e9845fd","bugs":{"url":"https://github.com/dzole0311/deck.gl-edge-bundle/issues"},"homepage":"https://github.com/dzole0311/deck.gl-edge-bundle#readme","_nodeVersion":"24.5.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-2GJOOUhQZIMwHFI2n84f0rdqdTCh6gyR6IOSoP0TS893BHBL3A+qsvgYdDz2SYytLiMM+6uxK8KsnayKwXL9JQ==","shasum":"a98f1f2ef0e8adc919f016de6a4996e9da93465f","tarball":"https://registry.npmjs.org/@dzole0311/deck.gl-edge-bundle/-/deck.gl-edge-bundle-0.1.0.tgz","fileCount":12,"unpackedSize":281216,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFbO/joAWSjvS8bXseyDApJ6rbWJAlJIf3bP7wXd09YnAiEA6oaHG2Dn9/vs1sjVFQK16E50o3MHr6JD+fZQiFLnZIc="}]},"_npmUser":{"name":"dzole0311","email":"gjoremilevski@gmail.com"},"directories":{},"maintainers":[{"name":"dzole0311","email":"gjoremilevski@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/deck.gl-edge-bundle_0.1.0_1779824207352_0.16316364467357425"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-26T19:36:46.882Z","0.1.0":"2026-05-26T19:36:47.493Z","modified":"2026-05-26T19:36:47.759Z"},"maintainers":[{"name":"dzole0311","email":"gjoremilevski@gmail.com"}],"description":"Edge-bundling layer for deck.gl - GPU-accelerated flow aggregation with centroid, spine, force, and force-gpu algorithms","homepage":"https://github.com/dzole0311/deck.gl-edge-bundle#readme","keywords":["deck.gl","deckgl","edge-bundling","flow-map","origin-destination","webgl","geospatial"],"repository":{"type":"git","url":"git+https://github.com/dzole0311/deck.gl-edge-bundle.git"},"bugs":{"url":"https://github.com/dzole0311/deck.gl-edge-bundle/issues"},"license":"MIT","readme":"# @dzole0311/deck.gl-edge-bundle\n\nEdge-bundling layer for deck.gl flow maps.\n\n## Install\n\n```bash\nnpm install @dzole0311/deck.gl-edge-bundle @deck.gl/core @deck.gl/layers\n```\n\n`@deck.gl/core` and `@deck.gl/layers` are peer dependencies.\n\n## Usage\n\n```ts\nimport {Deck} from '@deck.gl/core';\nimport {EdgeBundleLayer} from '@dzole0311/deck.gl-edge-bundle';\n\nconst data = [\n  {\n    sourcePosition: [2.3522, 48.8566],\n    targetPosition: [-0.1276, 51.5072],\n    group: 'northwest',\n    weight: 2\n  },\n  {\n    sourcePosition: [4.9041, 52.3676],\n    targetPosition: [-0.1276, 51.5072],\n    group: 'northwest',\n    weight: 1\n  }\n];\n\nnew Deck({\n  initialViewState: {longitude: 7, latitude: 48, zoom: 4},\n  controller: true,\n  layers: [\n    new EdgeBundleLayer({\n      id: 'bundled-flows',\n      data,\n      getSourcePosition: (d) => d.sourcePosition,\n      getTargetPosition: (d) => d.targetPosition,\n      getBundleKey: (d) => d.group,\n      getWeight: (d) => d.weight,\n      bundlingAlgorithm: 'force-gpu',\n      getColor: [34, 113, 179, 210],\n      getWidth: (d) => Math.max(1, d.weight),\n      widthMinPixels: 1,\n      widthMaxPixels: 6\n    })\n  ]\n});\n```\n\n## Props\n\n| Prop | Type | Default | Description |\n| --- | --- | --- | --- |\n| `getSourcePosition` | `Accessor` | `d => d.sourcePosition` | Origin `[lng, lat]`. |\n| `getTargetPosition` | `Accessor` | `d => d.targetPosition` | Destination `[lng, lat]`. |\n| `getBundleKey` | `Accessor` | `index` | Group key for stronger within-group bundling. |\n| `getWeight` | `Accessor` | `1` | Edge weight used for bundle centroids. |\n| `bundleStrength` | `number` | `0.85` | Pull toward the bundle center, from `0` to `1`. |\n| `subdivisionCount` | `number` | `16` | Control points per edge path. |\n| `bundlingAlgorithm` | `'centroid' \\| 'spine' \\| 'force' \\| 'force-gpu'` | `'force-gpu'` | Bundling algorithm. |\n| `forceIterations` | `number` | `8` | Force simulation iteration multiplier. |\n| `forceStepSize` | `number` | `0.15` | Force simulation step size. |\n| `renderMode` | `'path' \\| 'arc'` | `'path'` | Render bundled splines or ArcLayer approximations. |\n\n## Algorithms\n\n`centroid` routes edges through a weighted group centroid. `spine` blends edges toward a shared source-to-target spine. `force` runs a CPU force-directed bundling pass. `force-gpu` runs the force simulation in WebGL2 with floating point textures and falls back to CPU force mode when WebGL2 or `EXT_color_buffer_float` is unavailable.\n\n## Limitations\n\nBundling runs during `updateState` on the main thread. Large edge counts, especially above about 5,000 edges, can cause frame hitches. Worker offloading is not implemented.\n\nBundled paths are origin-destination abstractions. They reduce flow-map clutter, but they are not observed movement trajectories.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-5a2a031d8d1d35037ef62ad685fa0e29"}