UNPKG

@rxflow/manhattan

Version:

Manhattan routing algorithm for ReactFlow - generates orthogonal paths with obstacle avoidance

36 lines (25 loc) 502 B
# @rxflow/manhattan Manhattan 路由算法,用于 ReactFlow 生成正交路径,支持障碍物避让。 ## 安装 ```bash npm install @rxflow/manhattan # or pnpm add @rxflow/manhattan ``` ## 使用 ```tsx import { getManHattanPath } from '@rxflow/manhattan'; const path = getManHattanPath({ sourceNodeId: 'node-1', targetNodeId: 'node-2', nodeLookup, // ... other options }); ``` ## 特性 - A* 寻路算法 - 正交路径生成 - 障碍物避让 - 高性能计算 ## License MIT