Files
lan-manager/web/node_modules/@antv/g6-element/lib/edges/router.d.ts
openclaw 0a5f6a8047 Initial commit: Lan-manager project code
- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs

Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
2026-04-20 00:52:58 +08:00

24 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 通过配置不同的 costFunc, distFunc, constraints 可以得到不同效果的 router
* generalRouter: 不限制搜索时的移动方向,避开障碍即可
* orthogonal: 线必须沿着竖直或水平方向4个方向
* octolinearRouter: 线沿着竖直、水平、对角线方向8个方向
*/
import { INode, Item } from '@antv/g6-core';
import { PolyPoint } from './polyline-util';
export interface RouterCfg {
offset?: number;
gridSize?: number;
obstacles?: Item[];
maxAllowedDirectionChange?: number;
directions?: any[];
startDirections?: string[];
penalties?: {};
simple?: boolean;
distFunc?: (p1: PolyPoint, p2: PolyPoint) => number;
fallbackRoute?: (p1: PolyPoint, p2: PolyPoint, startNode?: INode, endNode?: INode, cfg?: RouterCfg) => PolyPoint[];
maximumLoops?: number;
}
export declare const octolinearCfg: RouterCfg;
export declare const pathFinder: (startPoint: PolyPoint, endPoint: PolyPoint, startNode: INode, endNode: INode, routerCfg?: RouterCfg) => PolyPoint[];