@rxflow/manhattan
Version:
Manhattan routing algorithm for ReactFlow - generates orthogonal paths with obstacle avoidance
36 lines (25 loc) • 502 B
Markdown
Manhattan 路由算法,用于 ReactFlow 生成正交路径,支持障碍物避让。
```bash
npm install @rxflow/manhattan
pnpm add @rxflow/manhattan
```
```tsx
import { getManHattanPath } from '@rxflow/manhattan';
const path = getManHattanPath({
sourceNodeId: 'node-1',
targetNodeId: 'node-2',
nodeLookup,
// ... other options
});
```
- A* 寻路算法
- 正交路径生成
- 障碍物避让
- 高性能计算
MIT