@esengine/pathfinding 13.0.0 → 13.1.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.
package/dist/nodes.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import {
2
- PathfindingState,
2
+ PathfindingState
3
+ } from "./chunk-YKA3PWU3.js";
4
+ import {
3
5
  __name
4
- } from "./chunk-GTFFYRZM.js";
6
+ } from "./chunk-T626JPC7.js";
5
7
 
6
8
  // src/nodes/PathfindingNodes.ts
7
9
  var FindPathTemplate = {
package/dist/nodes.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/nodes/PathfindingNodes.ts","../src/nodes/IncrementalPathfindingNodes.ts"],"sourcesContent":["/**\n * @zh 寻路系统蓝图节点\n * @en Pathfinding System Blueprint Nodes\n */\n\nimport type { BlueprintNodeTemplate, BlueprintNode, INodeExecutor, ExecutionResult } from '@esengine/blueprint';\nimport type { IPathResult, IPoint } from '../core/IPathfinding';\n\n// =============================================================================\n// 执行上下文接口 | Execution Context Interface\n// =============================================================================\n\ninterface PathfindingContext {\n evaluateInput(nodeId: string, pinName: string, defaultValue?: unknown): unknown;\n setOutputs(nodeId: string, outputs: Record<string, unknown>): void;\n findPath(startX: number, startY: number, endX: number, endY: number): IPathResult;\n findPathSmooth(startX: number, startY: number, endX: number, endY: number): IPathResult;\n isWalkable(x: number, y: number): boolean;\n getPathDistance(path: IPoint[]): number;\n}\n\n// =============================================================================\n// FindPath 节点 | FindPath Node\n// =============================================================================\n\nexport const FindPathTemplate: BlueprintNodeTemplate = {\n type: 'FindPath',\n title: 'Find Path',\n category: 'custom',\n description: 'Find path from start to end / 从起点到终点寻路',\n keywords: ['path', 'pathfinding', 'astar', 'navigate', 'route'],\n menuPath: ['Pathfinding', 'Find Path'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'startX', displayName: 'Start X', type: 'float' },\n { name: 'startY', displayName: 'Start Y', type: 'float' },\n { name: 'endX', displayName: 'End X', type: 'float' },\n { name: 'endY', displayName: 'End Y', type: 'float' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'found', displayName: 'Found', type: 'bool' },\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'cost', displayName: 'Cost', type: 'float' }\n ],\n color: '#4caf50'\n};\n\nexport class FindPathExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const startX = ctx.evaluateInput(node.id, 'startX', 0) as number;\n const startY = ctx.evaluateInput(node.id, 'startY', 0) as number;\n const endX = ctx.evaluateInput(node.id, 'endX', 0) as number;\n const endY = ctx.evaluateInput(node.id, 'endY', 0) as number;\n\n const result = ctx.findPath(startX, startY, endX, endY);\n\n return {\n outputs: {\n found: result.found,\n path: result.path,\n cost: result.cost\n },\n nextExec: 'exec'\n };\n }\n}\n\n// =============================================================================\n// FindPathSmooth 节点 | FindPathSmooth Node\n// =============================================================================\n\nexport const FindPathSmoothTemplate: BlueprintNodeTemplate = {\n type: 'FindPathSmooth',\n title: 'Find Path (Smooth)',\n category: 'custom',\n description: 'Find path with smoothing / 寻路并平滑路径',\n keywords: ['path', 'pathfinding', 'smooth', 'navigate'],\n menuPath: ['Pathfinding', 'Find Path (Smooth)'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'startX', displayName: 'Start X', type: 'float' },\n { name: 'startY', displayName: 'Start Y', type: 'float' },\n { name: 'endX', displayName: 'End X', type: 'float' },\n { name: 'endY', displayName: 'End Y', type: 'float' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'found', displayName: 'Found', type: 'bool' },\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'cost', displayName: 'Cost', type: 'float' }\n ],\n color: '#4caf50'\n};\n\nexport class FindPathSmoothExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const startX = ctx.evaluateInput(node.id, 'startX', 0) as number;\n const startY = ctx.evaluateInput(node.id, 'startY', 0) as number;\n const endX = ctx.evaluateInput(node.id, 'endX', 0) as number;\n const endY = ctx.evaluateInput(node.id, 'endY', 0) as number;\n\n const result = ctx.findPathSmooth(startX, startY, endX, endY);\n\n return {\n outputs: {\n found: result.found,\n path: result.path,\n cost: result.cost\n },\n nextExec: 'exec'\n };\n }\n}\n\n// =============================================================================\n// IsWalkable 节点 | IsWalkable Node\n// =============================================================================\n\nexport const IsWalkableTemplate: BlueprintNodeTemplate = {\n type: 'IsWalkable',\n title: 'Is Walkable',\n category: 'custom',\n description: 'Check if position is walkable / 检查位置是否可通行',\n keywords: ['walkable', 'obstacle', 'blocked', 'terrain'],\n menuPath: ['Pathfinding', 'Is Walkable'],\n isPure: true,\n inputs: [\n { name: 'x', displayName: 'X', type: 'float' },\n { name: 'y', displayName: 'Y', type: 'float' }\n ],\n outputs: [\n { name: 'walkable', displayName: 'Walkable', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\nexport class IsWalkableExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const x = ctx.evaluateInput(node.id, 'x', 0) as number;\n const y = ctx.evaluateInput(node.id, 'y', 0) as number;\n\n const walkable = ctx.isWalkable(x, y);\n\n return { outputs: { walkable } };\n }\n}\n\n// =============================================================================\n// GetPathLength 节点 | GetPathLength Node\n// =============================================================================\n\nexport const GetPathLengthTemplate: BlueprintNodeTemplate = {\n type: 'GetPathLength',\n title: 'Get Path Length',\n category: 'custom',\n description: 'Get the number of points in path / 获取路径点数量',\n keywords: ['path', 'length', 'count', 'waypoints'],\n menuPath: ['Pathfinding', 'Get Path Length'],\n isPure: true,\n inputs: [\n { name: 'path', displayName: 'Path', type: 'array' }\n ],\n outputs: [\n { name: 'length', displayName: 'Length', type: 'int' }\n ],\n color: '#4caf50'\n};\n\nexport class GetPathLengthExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const path = ctx.evaluateInput(node.id, 'path', []) as IPoint[];\n\n return { outputs: { length: path.length } };\n }\n}\n\n// =============================================================================\n// GetPathDistance 节点 | GetPathDistance Node\n// =============================================================================\n\nexport const GetPathDistanceTemplate: BlueprintNodeTemplate = {\n type: 'GetPathDistance',\n title: 'Get Path Distance',\n category: 'custom',\n description: 'Get total path distance / 获取路径总距离',\n keywords: ['path', 'distance', 'length', 'travel'],\n menuPath: ['Pathfinding', 'Get Path Distance'],\n isPure: true,\n inputs: [\n { name: 'path', displayName: 'Path', type: 'array' }\n ],\n outputs: [\n { name: 'distance', displayName: 'Distance', type: 'float' }\n ],\n color: '#4caf50'\n};\n\nexport class GetPathDistanceExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const path = ctx.evaluateInput(node.id, 'path', []) as IPoint[];\n\n const distance = ctx.getPathDistance(path);\n\n return { outputs: { distance } };\n }\n}\n\n// =============================================================================\n// GetPathPoint 节点 | GetPathPoint Node\n// =============================================================================\n\nexport const GetPathPointTemplate: BlueprintNodeTemplate = {\n type: 'GetPathPoint',\n title: 'Get Path Point',\n category: 'custom',\n description: 'Get point at index in path / 获取路径中指定索引的点',\n keywords: ['path', 'point', 'waypoint', 'index'],\n menuPath: ['Pathfinding', 'Get Path Point'],\n isPure: true,\n inputs: [\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'index', displayName: 'Index', type: 'int' }\n ],\n outputs: [\n { name: 'x', displayName: 'X', type: 'float' },\n { name: 'y', displayName: 'Y', type: 'float' },\n { name: 'valid', displayName: 'Valid', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\nexport class GetPathPointExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const path = ctx.evaluateInput(node.id, 'path', []) as IPoint[];\n const index = ctx.evaluateInput(node.id, 'index', 0) as number;\n\n if (index >= 0 && index < path.length) {\n return {\n outputs: {\n x: path[index].x,\n y: path[index].y,\n valid: true\n }\n };\n }\n\n return {\n outputs: {\n x: 0,\n y: 0,\n valid: false\n }\n };\n }\n}\n\n// =============================================================================\n// MoveAlongPath 节点 | MoveAlongPath Node\n// =============================================================================\n\nexport const MoveAlongPathTemplate: BlueprintNodeTemplate = {\n type: 'MoveAlongPath',\n title: 'Move Along Path',\n category: 'custom',\n description: 'Get position along path at progress / 获取路径上指定进度的位置',\n keywords: ['path', 'move', 'lerp', 'progress', 'interpolate'],\n menuPath: ['Pathfinding', 'Move Along Path'],\n isPure: true,\n inputs: [\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'progress', displayName: 'Progress (0-1)', type: 'float' }\n ],\n outputs: [\n { name: 'x', displayName: 'X', type: 'float' },\n { name: 'y', displayName: 'Y', type: 'float' }\n ],\n color: '#4caf50'\n};\n\nexport class MoveAlongPathExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const path = ctx.evaluateInput(node.id, 'path', []) as IPoint[];\n let progress = ctx.evaluateInput(node.id, 'progress', 0) as number;\n\n if (path.length === 0) {\n return { outputs: { x: 0, y: 0 } };\n }\n\n if (path.length === 1) {\n return { outputs: { x: path[0].x, y: path[0].y } };\n }\n\n // Clamp progress\n progress = Math.max(0, Math.min(1, progress));\n\n // Calculate total distance\n let totalDistance = 0;\n const segmentDistances: number[] = [];\n\n for (let i = 1; i < path.length; i++) {\n const dx = path[i].x - path[i - 1].x;\n const dy = path[i].y - path[i - 1].y;\n const dist = Math.sqrt(dx * dx + dy * dy);\n segmentDistances.push(dist);\n totalDistance += dist;\n }\n\n if (totalDistance === 0) {\n return { outputs: { x: path[0].x, y: path[0].y } };\n }\n\n // Find the segment and position\n const targetDistance = progress * totalDistance;\n let accumulatedDistance = 0;\n\n for (let i = 0; i < segmentDistances.length; i++) {\n const segmentDist = segmentDistances[i];\n\n if (accumulatedDistance + segmentDist >= targetDistance) {\n const segmentProgress = (targetDistance - accumulatedDistance) / segmentDist;\n const x = path[i].x + (path[i + 1].x - path[i].x) * segmentProgress;\n const y = path[i].y + (path[i + 1].y - path[i].y) * segmentProgress;\n return { outputs: { x, y } };\n }\n\n accumulatedDistance += segmentDist;\n }\n\n // Return last point\n const last = path[path.length - 1];\n return { outputs: { x: last.x, y: last.y } };\n }\n}\n\n// =============================================================================\n// HasLineOfSight 节点 | HasLineOfSight Node\n// =============================================================================\n\nexport const HasLineOfSightTemplate: BlueprintNodeTemplate = {\n type: 'HasLineOfSight',\n title: 'Has Line of Sight',\n category: 'custom',\n description: 'Check if there is a clear line between two points / 检查两点之间是否有清晰的视线',\n keywords: ['line', 'sight', 'los', 'visibility', 'raycast'],\n menuPath: ['Pathfinding', 'Has Line of Sight'],\n isPure: true,\n inputs: [\n { name: 'startX', displayName: 'Start X', type: 'float' },\n { name: 'startY', displayName: 'Start Y', type: 'float' },\n { name: 'endX', displayName: 'End X', type: 'float' },\n { name: 'endY', displayName: 'End Y', type: 'float' }\n ],\n outputs: [\n { name: 'hasLOS', displayName: 'Has LOS', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\nexport class HasLineOfSightExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext & {\n hasLineOfSight?(x1: number, y1: number, x2: number, y2: number): boolean;\n };\n\n const startX = ctx.evaluateInput(node.id, 'startX', 0) as number;\n const startY = ctx.evaluateInput(node.id, 'startY', 0) as number;\n const endX = ctx.evaluateInput(node.id, 'endX', 0) as number;\n const endY = ctx.evaluateInput(node.id, 'endY', 0) as number;\n\n const hasLOS = ctx.hasLineOfSight?.(startX, startY, endX, endY) ?? true;\n\n return { outputs: { hasLOS } };\n }\n}\n\n// =============================================================================\n// 节点定义集合 | Node Definition Collection\n// =============================================================================\n\nexport const PathfindingNodeDefinitions = {\n templates: [\n FindPathTemplate,\n FindPathSmoothTemplate,\n IsWalkableTemplate,\n GetPathLengthTemplate,\n GetPathDistanceTemplate,\n GetPathPointTemplate,\n MoveAlongPathTemplate,\n HasLineOfSightTemplate\n ],\n executors: new Map<string, INodeExecutor>([\n ['FindPath', new FindPathExecutor()],\n ['FindPathSmooth', new FindPathSmoothExecutor()],\n ['IsWalkable', new IsWalkableExecutor()],\n ['GetPathLength', new GetPathLengthExecutor()],\n ['GetPathDistance', new GetPathDistanceExecutor()],\n ['GetPathPoint', new GetPathPointExecutor()],\n ['MoveAlongPath', new MoveAlongPathExecutor()],\n ['HasLineOfSight', new HasLineOfSightExecutor()]\n ])\n};\n","/**\n * @zh 增量寻路蓝图节点\n * @en Incremental Pathfinding Blueprint Nodes\n */\n\nimport type { BlueprintNodeTemplate, BlueprintNode, INodeExecutor, ExecutionResult } from '@esengine/blueprint';\nimport type { IPoint } from '../core/IPathfinding';\nimport type { IIncrementalPathfinder, IPathProgress, IIncrementalPathResult } from '../core/IIncrementalPathfinding';\nimport { PathfindingState } from '../core/IIncrementalPathfinding';\n\n// =============================================================================\n// 执行上下文接口 | Execution Context Interface\n// =============================================================================\n\n/**\n * @zh 增量寻路上下文接口\n * @en Incremental pathfinding context interface\n */\ninterface IncrementalPathfindingContext {\n evaluateInput(nodeId: string, pinName: string, defaultValue?: unknown): unknown;\n setOutputs(nodeId: string, outputs: Record<string, unknown>): void;\n\n getPathfinder(): IIncrementalPathfinder | null;\n requestPath(startX: number, startY: number, endX: number, endY: number, priority?: number): number;\n stepPath(requestId: number, maxIterations: number): IPathProgress;\n getPathResult(requestId: number): IIncrementalPathResult | null;\n getPathProgress(requestId: number): IPathProgress | null;\n cancelPath(requestId: number): void;\n setObstacle(x: number, y: number, blocked: boolean): void;\n}\n\n// =============================================================================\n// RequestPathAsync 节点 | RequestPathAsync Node\n// =============================================================================\n\n/**\n * @zh 请求异步寻路节点模板\n * @en Request async pathfinding node template\n */\nexport const RequestPathAsyncTemplate: BlueprintNodeTemplate = {\n type: 'RequestPathAsync',\n title: 'Request Path (Async)',\n category: 'custom',\n description: 'Request incremental pathfinding / 请求增量寻路',\n keywords: ['path', 'pathfinding', 'async', 'incremental', 'request'],\n menuPath: ['Pathfinding', 'Incremental', 'Request Path (Async)'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'startX', displayName: 'Start X', type: 'float' },\n { name: 'startY', displayName: 'Start Y', type: 'float' },\n { name: 'endX', displayName: 'End X', type: 'float' },\n { name: 'endY', displayName: 'End Y', type: 'float' },\n { name: 'priority', displayName: 'Priority', type: 'int' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 请求异步寻路执行器\n * @en Request async pathfinding executor\n */\nexport class RequestPathAsyncExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const startX = ctx.evaluateInput(node.id, 'startX', 0) as number;\n const startY = ctx.evaluateInput(node.id, 'startY', 0) as number;\n const endX = ctx.evaluateInput(node.id, 'endX', 0) as number;\n const endY = ctx.evaluateInput(node.id, 'endY', 0) as number;\n const priority = ctx.evaluateInput(node.id, 'priority', 50) as number;\n\n const requestId = ctx.requestPath(startX, startY, endX, endY, priority);\n\n return {\n outputs: { requestId },\n nextExec: 'exec'\n };\n }\n}\n\n// =============================================================================\n// StepPath 节点 | StepPath Node\n// =============================================================================\n\n/**\n * @zh 推进寻路一步节点模板\n * @en Step pathfinding node template\n */\nexport const StepPathTemplate: BlueprintNodeTemplate = {\n type: 'StepPath',\n title: 'Step Path',\n category: 'custom',\n description: 'Execute one step of pathfinding / 执行一步寻路',\n keywords: ['path', 'pathfinding', 'step', 'iterate', 'incremental'],\n menuPath: ['Pathfinding', 'Incremental', 'Step Path'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'requestId', displayName: 'Request ID', type: 'int' },\n { name: 'maxIterations', displayName: 'Max Iterations', type: 'int' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'state', displayName: 'State', type: 'string' },\n { name: 'progress', displayName: 'Progress', type: 'float' },\n { name: 'nodesSearched', displayName: 'Nodes Searched', type: 'int' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 推进寻路一步执行器\n * @en Step pathfinding executor\n */\nexport class StepPathExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n const maxIterations = ctx.evaluateInput(node.id, 'maxIterations', 100) as number;\n\n const progress = ctx.stepPath(requestId, maxIterations);\n\n return {\n outputs: {\n state: progress.state,\n progress: progress.estimatedProgress,\n nodesSearched: progress.nodesSearched\n },\n nextExec: 'exec'\n };\n }\n}\n\n// =============================================================================\n// GetPathProgress 节点 | GetPathProgress Node\n// =============================================================================\n\n/**\n * @zh 获取寻路进度节点模板\n * @en Get path progress node template\n */\nexport const GetPathProgressTemplate: BlueprintNodeTemplate = {\n type: 'GetPathProgress',\n title: 'Get Path Progress',\n category: 'custom',\n description: 'Get incremental pathfinding progress / 获取增量寻路进度',\n keywords: ['path', 'progress', 'status', 'state'],\n menuPath: ['Pathfinding', 'Incremental', 'Get Path Progress'],\n isPure: true,\n inputs: [\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n outputs: [\n { name: 'state', displayName: 'State', type: 'string' },\n { name: 'progress', displayName: 'Progress (0-1)', type: 'float' },\n { name: 'nodesSearched', displayName: 'Nodes Searched', type: 'int' },\n { name: 'isComplete', displayName: 'Is Complete', type: 'bool' },\n { name: 'isInProgress', displayName: 'Is In Progress', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 获取寻路进度执行器\n * @en Get path progress executor\n */\nexport class GetPathProgressExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n\n const progress = ctx.getPathProgress(requestId);\n\n if (!progress) {\n return {\n outputs: {\n state: PathfindingState.Idle,\n progress: 0,\n nodesSearched: 0,\n isComplete: false,\n isInProgress: false\n }\n };\n }\n\n return {\n outputs: {\n state: progress.state,\n progress: progress.estimatedProgress,\n nodesSearched: progress.nodesSearched,\n isComplete: progress.state === PathfindingState.Completed,\n isInProgress: progress.state === PathfindingState.InProgress\n }\n };\n }\n}\n\n// =============================================================================\n// GetPathResult 节点 | GetPathResult Node\n// =============================================================================\n\n/**\n * @zh 获取寻路结果节点模板\n * @en Get path result node template\n */\nexport const GetPathResultTemplate: BlueprintNodeTemplate = {\n type: 'GetPathResult',\n title: 'Get Path Result',\n category: 'custom',\n description: 'Get completed path result / 获取已完成的寻路结果',\n keywords: ['path', 'result', 'get', 'output'],\n menuPath: ['Pathfinding', 'Incremental', 'Get Path Result'],\n isPure: true,\n inputs: [\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n outputs: [\n { name: 'found', displayName: 'Found', type: 'bool' },\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'cost', displayName: 'Cost', type: 'float' },\n { name: 'framesUsed', displayName: 'Frames Used', type: 'int' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 获取寻路结果执行器\n * @en Get path result executor\n */\nexport class GetPathResultExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n\n const result = ctx.getPathResult(requestId);\n\n if (!result) {\n return {\n outputs: {\n found: false,\n path: [],\n cost: 0,\n framesUsed: 0\n }\n };\n }\n\n return {\n outputs: {\n found: result.found,\n path: result.path,\n cost: result.cost,\n framesUsed: result.framesUsed\n }\n };\n }\n}\n\n// =============================================================================\n// CancelPath 节点 | CancelPath Node\n// =============================================================================\n\n/**\n * @zh 取消寻路节点模板\n * @en Cancel path node template\n */\nexport const CancelPathTemplate: BlueprintNodeTemplate = {\n type: 'CancelPath',\n title: 'Cancel Path',\n category: 'custom',\n description: 'Cancel ongoing pathfinding / 取消正在进行的寻路',\n keywords: ['path', 'cancel', 'stop', 'abort'],\n menuPath: ['Pathfinding', 'Incremental', 'Cancel Path'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' }\n ],\n color: '#f44336'\n};\n\n/**\n * @zh 取消寻路执行器\n * @en Cancel path executor\n */\nexport class CancelPathExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n\n ctx.cancelPath(requestId);\n\n return { nextExec: 'exec' };\n }\n}\n\n// =============================================================================\n// SetObstacle 节点 | SetObstacle Node\n// =============================================================================\n\n/**\n * @zh 设置障碍物节点模板\n * @en Set obstacle node template\n */\nexport const SetObstacleTemplate: BlueprintNodeTemplate = {\n type: 'SetObstacle',\n title: 'Set Obstacle',\n category: 'custom',\n description: 'Set or remove obstacle / 设置或移除障碍物',\n keywords: ['obstacle', 'block', 'walkable', 'terrain'],\n menuPath: ['Pathfinding', 'Incremental', 'Set Obstacle'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'x', displayName: 'X', type: 'int' },\n { name: 'y', displayName: 'Y', type: 'int' },\n { name: 'blocked', displayName: 'Blocked', type: 'bool' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' }\n ],\n color: '#ff9800'\n};\n\n/**\n * @zh 设置障碍物执行器\n * @en Set obstacle executor\n */\nexport class SetObstacleExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const x = ctx.evaluateInput(node.id, 'x', 0) as number;\n const y = ctx.evaluateInput(node.id, 'y', 0) as number;\n const blocked = ctx.evaluateInput(node.id, 'blocked', true) as boolean;\n\n ctx.setObstacle(x, y, blocked);\n\n return { nextExec: 'exec' };\n }\n}\n\n// =============================================================================\n// IsPathComplete 节点 | IsPathComplete Node\n// =============================================================================\n\n/**\n * @zh 检查路径是否完成节点模板\n * @en Check if path is complete node template\n */\nexport const IsPathCompleteTemplate: BlueprintNodeTemplate = {\n type: 'IsPathComplete',\n title: 'Is Path Complete',\n category: 'custom',\n description: 'Check if pathfinding is complete / 检查寻路是否完成',\n keywords: ['path', 'complete', 'done', 'finished'],\n menuPath: ['Pathfinding', 'Incremental', 'Is Path Complete'],\n isPure: true,\n inputs: [\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n outputs: [\n { name: 'isComplete', displayName: 'Is Complete', type: 'bool' },\n { name: 'found', displayName: 'Found', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 检查路径是否完成执行器\n * @en Check if path is complete executor\n */\nexport class IsPathCompleteExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n\n const progress = ctx.getPathProgress(requestId);\n const isComplete = progress?.state === PathfindingState.Completed ||\n progress?.state === PathfindingState.Failed;\n\n const result = ctx.getPathResult(requestId);\n const found = result?.found ?? false;\n\n return {\n outputs: {\n isComplete,\n found\n }\n };\n }\n}\n\n// =============================================================================\n// 节点定义集合 | Node Definitions Collection\n// =============================================================================\n\n/**\n * @zh 增量寻路节点定义集合\n * @en Incremental pathfinding node definitions collection\n */\nexport const IncrementalPathfindingNodeDefinitions = {\n templates: [\n RequestPathAsyncTemplate,\n StepPathTemplate,\n GetPathProgressTemplate,\n GetPathResultTemplate,\n CancelPathTemplate,\n SetObstacleTemplate,\n IsPathCompleteTemplate\n ],\n executors: new Map<string, INodeExecutor>([\n ['RequestPathAsync', new RequestPathAsyncExecutor()],\n ['StepPath', new StepPathExecutor()],\n ['GetPathProgress', new GetPathProgressExecutor()],\n ['GetPathResult', new GetPathResultExecutor()],\n ['CancelPath', new CancelPathExecutor()],\n ['SetObstacle', new SetObstacleExecutor()],\n ['IsPathComplete', new IsPathCompleteExecutor()]\n ])\n};\n"],"mappings":";;;;;;AAyBO,IAAMA,mBAA0C;EACnDC,MAAM;EACNC,OAAO;EACPC,UAAU;EACVC,aAAa;EACbC,UAAU;IAAC;IAAQ;IAAe;IAAS;IAAY;;EACvDC,UAAU;IAAC;IAAe;;EAC1BC,QAAQ;IACJ;MAAEC,MAAM;MAAQC,aAAa;MAAIR,MAAM;IAAO;IAC9C;MAAEO,MAAM;MAAUC,aAAa;MAAWR,MAAM;IAAQ;IACxD;MAAEO,MAAM;MAAUC,aAAa;MAAWR,MAAM;IAAQ;IACxD;MAAEO,MAAM;MAAQC,aAAa;MAASR,MAAM;IAAQ;IACpD;MAAEO,MAAM;MAAQC,aAAa;MAASR,MAAM;IAAQ;;EAExDS,SAAS;IACL;MAAEF,MAAM;MAAQC,aAAa;MAAIR,MAAM;IAAO;IAC9C;MAAEO,MAAM;MAASC,aAAa;MAASR,MAAM;IAAO;IACpD;MAAEO,MAAM;MAAQC,aAAa;MAAQR,MAAM;IAAQ;IACnD;MAAEO,MAAM;MAAQC,aAAa;MAAQR,MAAM;IAAQ;;EAEvDU,OAAO;AACX;AAEO,IAAMC,oBAAN,MAAMA,kBAAAA;EACTC,QAAQC,MAAqBC,SAAmC;AAC5D,UAAMC,MAAMD;AACZ,UAAME,SAASD,IAAIE,cAAcJ,KAAKK,IAAI,UAAU,CAAA;AACpD,UAAMC,SAASJ,IAAIE,cAAcJ,KAAKK,IAAI,UAAU,CAAA;AACpD,UAAME,OAAOL,IAAIE,cAAcJ,KAAKK,IAAI,QAAQ,CAAA;AAChD,UAAMG,OAAON,IAAIE,cAAcJ,KAAKK,IAAI,QAAQ,CAAA;AAEhD,UAAMI,SAASP,IAAIQ,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K,yBAAgD;EACzD7D,MAAM;EACNC,OAAO;EACPC,UAAU;EACVC,aAAa;EACbC,UAAU;IAAC;IAAQ;IAAY;IAAQ;;EACvCC,UAAU;IAAC;IAAe;IAAe;;EACzC8B,QAAQ;EACR7B,QAAQ;IACJ;MAAEC,MAAM;MAAaC,aAAa;MAAcR,MAAM;IAAM;;EAEhES,SAAS;IACL;MAAEF,MAAM;MAAcC,aAAa;MAAeR,MAAM;IAAO;IAC/D;MAAEO,MAAM;MAASC,aAAa;MAASR,MAAM;IAAO;;EAExDU,OAAO;AACX;AAMO,IAAMoD,0BAAN,MAAMA,wBAAAA;EACTlD,QAAQC,MAAqBC,SAAmC;AAC5D,UAAMC,MAAMD;AACZ,UAAMS,YAAYR,IAAIE,cAAcJ,KAAKK,IAAI,aAAa,EAAC;AAE3D,UAAMW,WAAWd,IAAIsB,gBAAgBd,SAAAA;AACrC,UAAMiB,aAAaX,UAAUE,UAAUO,iBAAiBI,aACtCb,UAAUE,UAAUO,iBAAiByB;AAEvD,UAAMjB,SAAS/B,IAAIgC,cAAcxB,SAAAA;AACjC,UAAMyB,QAAQF,QAAQE,SAAS;AAE/B,WAAO;MACHvC,SAAS;QACL+B;QACAQ;MACJ;IACJ;EACJ;AACJ;AAnBac;AAAN,IAAMA,yBAAN;AA6BA,IAAME,wCAAwC;EACjDC,WAAW;IACPlE;IACA2B;IACAQ;IACAU;IACAQ;IACAG;IACAM;;EAEJK,WAAW,oBAAIC,IAA2B;IACtC;MAAC;MAAoB,IAAIxD,yBAAAA;;IACzB;MAAC;MAAY,IAAIgB,iBAAAA;;IACjB;MAAC;MAAmB,IAAIS,wBAAAA;;IACxB;MAAC;MAAiB,IAAIS,sBAAAA;;IACtB;MAAC;MAAc,IAAIQ,mBAAAA;;IACnB;MAAC;MAAe,IAAIG,oBAAAA;;IACpB;MAAC;MAAkB,IAAIM,uBAAAA;;GAC1B;AACL;","names":["FindPathTemplate","type","title","category","description","keywords","menuPath","inputs","name","displayName","outputs","color","FindPathExecutor","execute","node","context","ctx","startX","evaluateInput","id","startY","endX","endY","result","findPath","found","path","cost","nextExec","FindPathSmoothTemplate","FindPathSmoothExecutor","findPathSmooth","IsWalkableTemplate","isPure","IsWalkableExecutor","x","y","walkable","isWalkable","GetPathLengthTemplate","GetPathLengthExecutor","length","GetPathDistanceTemplate","GetPathDistanceExecutor","distance","getPathDistance","GetPathPointTemplate","GetPathPointExecutor","index","valid","MoveAlongPathTemplate","MoveAlongPathExecutor","progress","Math","max","min","totalDistance","segmentDistances","i","dx","dy","dist","sqrt","push","targetDistance","accumulatedDistance","segmentDist","segmentProgress","last","HasLineOfSightTemplate","HasLineOfSightExecutor","hasLOS","hasLineOfSight","PathfindingNodeDefinitions","templates","executors","Map","RequestPathAsyncTemplate","type","title","category","description","keywords","menuPath","inputs","name","displayName","outputs","color","RequestPathAsyncExecutor","execute","node","context","ctx","startX","evaluateInput","id","startY","endX","endY","priority","requestId","requestPath","nextExec","StepPathTemplate","StepPathExecutor","maxIterations","progress","stepPath","state","estimatedProgress","nodesSearched","GetPathProgressTemplate","isPure","GetPathProgressExecutor","getPathProgress","PathfindingState","Idle","isComplete","isInProgress","Completed","InProgress","GetPathResultTemplate","GetPathResultExecutor","result","getPathResult","found","path","cost","framesUsed","CancelPathTemplate","CancelPathExecutor","cancelPath","SetObstacleTemplate","SetObstacleExecutor","x","y","blocked","setObstacle","IsPathCompleteTemplate","IsPathCompleteExecutor","Failed","IncrementalPathfindingNodeDefinitions","templates","executors","Map"]}
1
+ {"version":3,"sources":["../src/nodes/PathfindingNodes.ts","../src/nodes/IncrementalPathfindingNodes.ts"],"sourcesContent":["/**\n * @zh 寻路系统蓝图节点\n * @en Pathfinding System Blueprint Nodes\n */\n\nimport type { BlueprintNodeTemplate, BlueprintNode, INodeExecutor, ExecutionResult } from '@esengine/blueprint';\nimport type { IPathResult, IPoint } from '../core/IPathfinding';\n\n// =============================================================================\n// 执行上下文接口 | Execution Context Interface\n// =============================================================================\n\ninterface PathfindingContext {\n evaluateInput(nodeId: string, pinName: string, defaultValue?: unknown): unknown;\n setOutputs(nodeId: string, outputs: Record<string, unknown>): void;\n findPath(startX: number, startY: number, endX: number, endY: number): IPathResult;\n findPathSmooth(startX: number, startY: number, endX: number, endY: number): IPathResult;\n isWalkable(x: number, y: number): boolean;\n getPathDistance(path: IPoint[]): number;\n}\n\n// =============================================================================\n// FindPath 节点 | FindPath Node\n// =============================================================================\n\nexport const FindPathTemplate: BlueprintNodeTemplate = {\n type: 'FindPath',\n title: 'Find Path',\n category: 'custom',\n description: 'Find path from start to end / 从起点到终点寻路',\n keywords: ['path', 'pathfinding', 'astar', 'navigate', 'route'],\n menuPath: ['Pathfinding', 'Find Path'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'startX', displayName: 'Start X', type: 'float' },\n { name: 'startY', displayName: 'Start Y', type: 'float' },\n { name: 'endX', displayName: 'End X', type: 'float' },\n { name: 'endY', displayName: 'End Y', type: 'float' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'found', displayName: 'Found', type: 'bool' },\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'cost', displayName: 'Cost', type: 'float' }\n ],\n color: '#4caf50'\n};\n\nexport class FindPathExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const startX = ctx.evaluateInput(node.id, 'startX', 0) as number;\n const startY = ctx.evaluateInput(node.id, 'startY', 0) as number;\n const endX = ctx.evaluateInput(node.id, 'endX', 0) as number;\n const endY = ctx.evaluateInput(node.id, 'endY', 0) as number;\n\n const result = ctx.findPath(startX, startY, endX, endY);\n\n return {\n outputs: {\n found: result.found,\n path: result.path,\n cost: result.cost\n },\n nextExec: 'exec'\n };\n }\n}\n\n// =============================================================================\n// FindPathSmooth 节点 | FindPathSmooth Node\n// =============================================================================\n\nexport const FindPathSmoothTemplate: BlueprintNodeTemplate = {\n type: 'FindPathSmooth',\n title: 'Find Path (Smooth)',\n category: 'custom',\n description: 'Find path with smoothing / 寻路并平滑路径',\n keywords: ['path', 'pathfinding', 'smooth', 'navigate'],\n menuPath: ['Pathfinding', 'Find Path (Smooth)'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'startX', displayName: 'Start X', type: 'float' },\n { name: 'startY', displayName: 'Start Y', type: 'float' },\n { name: 'endX', displayName: 'End X', type: 'float' },\n { name: 'endY', displayName: 'End Y', type: 'float' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'found', displayName: 'Found', type: 'bool' },\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'cost', displayName: 'Cost', type: 'float' }\n ],\n color: '#4caf50'\n};\n\nexport class FindPathSmoothExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const startX = ctx.evaluateInput(node.id, 'startX', 0) as number;\n const startY = ctx.evaluateInput(node.id, 'startY', 0) as number;\n const endX = ctx.evaluateInput(node.id, 'endX', 0) as number;\n const endY = ctx.evaluateInput(node.id, 'endY', 0) as number;\n\n const result = ctx.findPathSmooth(startX, startY, endX, endY);\n\n return {\n outputs: {\n found: result.found,\n path: result.path,\n cost: result.cost\n },\n nextExec: 'exec'\n };\n }\n}\n\n// =============================================================================\n// IsWalkable 节点 | IsWalkable Node\n// =============================================================================\n\nexport const IsWalkableTemplate: BlueprintNodeTemplate = {\n type: 'IsWalkable',\n title: 'Is Walkable',\n category: 'custom',\n description: 'Check if position is walkable / 检查位置是否可通行',\n keywords: ['walkable', 'obstacle', 'blocked', 'terrain'],\n menuPath: ['Pathfinding', 'Is Walkable'],\n isPure: true,\n inputs: [\n { name: 'x', displayName: 'X', type: 'float' },\n { name: 'y', displayName: 'Y', type: 'float' }\n ],\n outputs: [\n { name: 'walkable', displayName: 'Walkable', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\nexport class IsWalkableExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const x = ctx.evaluateInput(node.id, 'x', 0) as number;\n const y = ctx.evaluateInput(node.id, 'y', 0) as number;\n\n const walkable = ctx.isWalkable(x, y);\n\n return { outputs: { walkable } };\n }\n}\n\n// =============================================================================\n// GetPathLength 节点 | GetPathLength Node\n// =============================================================================\n\nexport const GetPathLengthTemplate: BlueprintNodeTemplate = {\n type: 'GetPathLength',\n title: 'Get Path Length',\n category: 'custom',\n description: 'Get the number of points in path / 获取路径点数量',\n keywords: ['path', 'length', 'count', 'waypoints'],\n menuPath: ['Pathfinding', 'Get Path Length'],\n isPure: true,\n inputs: [\n { name: 'path', displayName: 'Path', type: 'array' }\n ],\n outputs: [\n { name: 'length', displayName: 'Length', type: 'int' }\n ],\n color: '#4caf50'\n};\n\nexport class GetPathLengthExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const path = ctx.evaluateInput(node.id, 'path', []) as IPoint[];\n\n return { outputs: { length: path.length } };\n }\n}\n\n// =============================================================================\n// GetPathDistance 节点 | GetPathDistance Node\n// =============================================================================\n\nexport const GetPathDistanceTemplate: BlueprintNodeTemplate = {\n type: 'GetPathDistance',\n title: 'Get Path Distance',\n category: 'custom',\n description: 'Get total path distance / 获取路径总距离',\n keywords: ['path', 'distance', 'length', 'travel'],\n menuPath: ['Pathfinding', 'Get Path Distance'],\n isPure: true,\n inputs: [\n { name: 'path', displayName: 'Path', type: 'array' }\n ],\n outputs: [\n { name: 'distance', displayName: 'Distance', type: 'float' }\n ],\n color: '#4caf50'\n};\n\nexport class GetPathDistanceExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const path = ctx.evaluateInput(node.id, 'path', []) as IPoint[];\n\n const distance = ctx.getPathDistance(path);\n\n return { outputs: { distance } };\n }\n}\n\n// =============================================================================\n// GetPathPoint 节点 | GetPathPoint Node\n// =============================================================================\n\nexport const GetPathPointTemplate: BlueprintNodeTemplate = {\n type: 'GetPathPoint',\n title: 'Get Path Point',\n category: 'custom',\n description: 'Get point at index in path / 获取路径中指定索引的点',\n keywords: ['path', 'point', 'waypoint', 'index'],\n menuPath: ['Pathfinding', 'Get Path Point'],\n isPure: true,\n inputs: [\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'index', displayName: 'Index', type: 'int' }\n ],\n outputs: [\n { name: 'x', displayName: 'X', type: 'float' },\n { name: 'y', displayName: 'Y', type: 'float' },\n { name: 'valid', displayName: 'Valid', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\nexport class GetPathPointExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const path = ctx.evaluateInput(node.id, 'path', []) as IPoint[];\n const index = ctx.evaluateInput(node.id, 'index', 0) as number;\n\n if (index >= 0 && index < path.length) {\n return {\n outputs: {\n x: path[index].x,\n y: path[index].y,\n valid: true\n }\n };\n }\n\n return {\n outputs: {\n x: 0,\n y: 0,\n valid: false\n }\n };\n }\n}\n\n// =============================================================================\n// MoveAlongPath 节点 | MoveAlongPath Node\n// =============================================================================\n\nexport const MoveAlongPathTemplate: BlueprintNodeTemplate = {\n type: 'MoveAlongPath',\n title: 'Move Along Path',\n category: 'custom',\n description: 'Get position along path at progress / 获取路径上指定进度的位置',\n keywords: ['path', 'move', 'lerp', 'progress', 'interpolate'],\n menuPath: ['Pathfinding', 'Move Along Path'],\n isPure: true,\n inputs: [\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'progress', displayName: 'Progress (0-1)', type: 'float' }\n ],\n outputs: [\n { name: 'x', displayName: 'X', type: 'float' },\n { name: 'y', displayName: 'Y', type: 'float' }\n ],\n color: '#4caf50'\n};\n\nexport class MoveAlongPathExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext;\n const path = ctx.evaluateInput(node.id, 'path', []) as IPoint[];\n let progress = ctx.evaluateInput(node.id, 'progress', 0) as number;\n\n if (path.length === 0) {\n return { outputs: { x: 0, y: 0 } };\n }\n\n if (path.length === 1) {\n return { outputs: { x: path[0].x, y: path[0].y } };\n }\n\n // Clamp progress\n progress = Math.max(0, Math.min(1, progress));\n\n // Calculate total distance\n let totalDistance = 0;\n const segmentDistances: number[] = [];\n\n for (let i = 1; i < path.length; i++) {\n const dx = path[i].x - path[i - 1].x;\n const dy = path[i].y - path[i - 1].y;\n const dist = Math.sqrt(dx * dx + dy * dy);\n segmentDistances.push(dist);\n totalDistance += dist;\n }\n\n if (totalDistance === 0) {\n return { outputs: { x: path[0].x, y: path[0].y } };\n }\n\n // Find the segment and position\n const targetDistance = progress * totalDistance;\n let accumulatedDistance = 0;\n\n for (let i = 0; i < segmentDistances.length; i++) {\n const segmentDist = segmentDistances[i];\n\n if (accumulatedDistance + segmentDist >= targetDistance) {\n const segmentProgress = (targetDistance - accumulatedDistance) / segmentDist;\n const x = path[i].x + (path[i + 1].x - path[i].x) * segmentProgress;\n const y = path[i].y + (path[i + 1].y - path[i].y) * segmentProgress;\n return { outputs: { x, y } };\n }\n\n accumulatedDistance += segmentDist;\n }\n\n // Return last point\n const last = path[path.length - 1];\n return { outputs: { x: last.x, y: last.y } };\n }\n}\n\n// =============================================================================\n// HasLineOfSight 节点 | HasLineOfSight Node\n// =============================================================================\n\nexport const HasLineOfSightTemplate: BlueprintNodeTemplate = {\n type: 'HasLineOfSight',\n title: 'Has Line of Sight',\n category: 'custom',\n description: 'Check if there is a clear line between two points / 检查两点之间是否有清晰的视线',\n keywords: ['line', 'sight', 'los', 'visibility', 'raycast'],\n menuPath: ['Pathfinding', 'Has Line of Sight'],\n isPure: true,\n inputs: [\n { name: 'startX', displayName: 'Start X', type: 'float' },\n { name: 'startY', displayName: 'Start Y', type: 'float' },\n { name: 'endX', displayName: 'End X', type: 'float' },\n { name: 'endY', displayName: 'End Y', type: 'float' }\n ],\n outputs: [\n { name: 'hasLOS', displayName: 'Has LOS', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\nexport class HasLineOfSightExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as PathfindingContext & {\n hasLineOfSight?(x1: number, y1: number, x2: number, y2: number): boolean;\n };\n\n const startX = ctx.evaluateInput(node.id, 'startX', 0) as number;\n const startY = ctx.evaluateInput(node.id, 'startY', 0) as number;\n const endX = ctx.evaluateInput(node.id, 'endX', 0) as number;\n const endY = ctx.evaluateInput(node.id, 'endY', 0) as number;\n\n const hasLOS = ctx.hasLineOfSight?.(startX, startY, endX, endY) ?? true;\n\n return { outputs: { hasLOS } };\n }\n}\n\n// =============================================================================\n// 节点定义集合 | Node Definition Collection\n// =============================================================================\n\nexport const PathfindingNodeDefinitions = {\n templates: [\n FindPathTemplate,\n FindPathSmoothTemplate,\n IsWalkableTemplate,\n GetPathLengthTemplate,\n GetPathDistanceTemplate,\n GetPathPointTemplate,\n MoveAlongPathTemplate,\n HasLineOfSightTemplate\n ],\n executors: new Map<string, INodeExecutor>([\n ['FindPath', new FindPathExecutor()],\n ['FindPathSmooth', new FindPathSmoothExecutor()],\n ['IsWalkable', new IsWalkableExecutor()],\n ['GetPathLength', new GetPathLengthExecutor()],\n ['GetPathDistance', new GetPathDistanceExecutor()],\n ['GetPathPoint', new GetPathPointExecutor()],\n ['MoveAlongPath', new MoveAlongPathExecutor()],\n ['HasLineOfSight', new HasLineOfSightExecutor()]\n ])\n};\n","/**\n * @zh 增量寻路蓝图节点\n * @en Incremental Pathfinding Blueprint Nodes\n */\n\nimport type { BlueprintNodeTemplate, BlueprintNode, INodeExecutor, ExecutionResult } from '@esengine/blueprint';\nimport type { IPoint } from '../core/IPathfinding';\nimport type { IIncrementalPathfinder, IPathProgress, IIncrementalPathResult } from '../core/IIncrementalPathfinding';\nimport { PathfindingState } from '../core/IIncrementalPathfinding';\n\n// =============================================================================\n// 执行上下文接口 | Execution Context Interface\n// =============================================================================\n\n/**\n * @zh 增量寻路上下文接口\n * @en Incremental pathfinding context interface\n */\ninterface IncrementalPathfindingContext {\n evaluateInput(nodeId: string, pinName: string, defaultValue?: unknown): unknown;\n setOutputs(nodeId: string, outputs: Record<string, unknown>): void;\n\n getPathfinder(): IIncrementalPathfinder | null;\n requestPath(startX: number, startY: number, endX: number, endY: number, priority?: number): number;\n stepPath(requestId: number, maxIterations: number): IPathProgress;\n getPathResult(requestId: number): IIncrementalPathResult | null;\n getPathProgress(requestId: number): IPathProgress | null;\n cancelPath(requestId: number): void;\n setObstacle(x: number, y: number, blocked: boolean): void;\n}\n\n// =============================================================================\n// RequestPathAsync 节点 | RequestPathAsync Node\n// =============================================================================\n\n/**\n * @zh 请求异步寻路节点模板\n * @en Request async pathfinding node template\n */\nexport const RequestPathAsyncTemplate: BlueprintNodeTemplate = {\n type: 'RequestPathAsync',\n title: 'Request Path (Async)',\n category: 'custom',\n description: 'Request incremental pathfinding / 请求增量寻路',\n keywords: ['path', 'pathfinding', 'async', 'incremental', 'request'],\n menuPath: ['Pathfinding', 'Incremental', 'Request Path (Async)'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'startX', displayName: 'Start X', type: 'float' },\n { name: 'startY', displayName: 'Start Y', type: 'float' },\n { name: 'endX', displayName: 'End X', type: 'float' },\n { name: 'endY', displayName: 'End Y', type: 'float' },\n { name: 'priority', displayName: 'Priority', type: 'int' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 请求异步寻路执行器\n * @en Request async pathfinding executor\n */\nexport class RequestPathAsyncExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const startX = ctx.evaluateInput(node.id, 'startX', 0) as number;\n const startY = ctx.evaluateInput(node.id, 'startY', 0) as number;\n const endX = ctx.evaluateInput(node.id, 'endX', 0) as number;\n const endY = ctx.evaluateInput(node.id, 'endY', 0) as number;\n const priority = ctx.evaluateInput(node.id, 'priority', 50) as number;\n\n const requestId = ctx.requestPath(startX, startY, endX, endY, priority);\n\n return {\n outputs: { requestId },\n nextExec: 'exec'\n };\n }\n}\n\n// =============================================================================\n// StepPath 节点 | StepPath Node\n// =============================================================================\n\n/**\n * @zh 推进寻路一步节点模板\n * @en Step pathfinding node template\n */\nexport const StepPathTemplate: BlueprintNodeTemplate = {\n type: 'StepPath',\n title: 'Step Path',\n category: 'custom',\n description: 'Execute one step of pathfinding / 执行一步寻路',\n keywords: ['path', 'pathfinding', 'step', 'iterate', 'incremental'],\n menuPath: ['Pathfinding', 'Incremental', 'Step Path'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'requestId', displayName: 'Request ID', type: 'int' },\n { name: 'maxIterations', displayName: 'Max Iterations', type: 'int' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'state', displayName: 'State', type: 'string' },\n { name: 'progress', displayName: 'Progress', type: 'float' },\n { name: 'nodesSearched', displayName: 'Nodes Searched', type: 'int' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 推进寻路一步执行器\n * @en Step pathfinding executor\n */\nexport class StepPathExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n const maxIterations = ctx.evaluateInput(node.id, 'maxIterations', 100) as number;\n\n const progress = ctx.stepPath(requestId, maxIterations);\n\n return {\n outputs: {\n state: progress.state,\n progress: progress.estimatedProgress,\n nodesSearched: progress.nodesSearched\n },\n nextExec: 'exec'\n };\n }\n}\n\n// =============================================================================\n// GetPathProgress 节点 | GetPathProgress Node\n// =============================================================================\n\n/**\n * @zh 获取寻路进度节点模板\n * @en Get path progress node template\n */\nexport const GetPathProgressTemplate: BlueprintNodeTemplate = {\n type: 'GetPathProgress',\n title: 'Get Path Progress',\n category: 'custom',\n description: 'Get incremental pathfinding progress / 获取增量寻路进度',\n keywords: ['path', 'progress', 'status', 'state'],\n menuPath: ['Pathfinding', 'Incremental', 'Get Path Progress'],\n isPure: true,\n inputs: [\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n outputs: [\n { name: 'state', displayName: 'State', type: 'string' },\n { name: 'progress', displayName: 'Progress (0-1)', type: 'float' },\n { name: 'nodesSearched', displayName: 'Nodes Searched', type: 'int' },\n { name: 'isComplete', displayName: 'Is Complete', type: 'bool' },\n { name: 'isInProgress', displayName: 'Is In Progress', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 获取寻路进度执行器\n * @en Get path progress executor\n */\nexport class GetPathProgressExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n\n const progress = ctx.getPathProgress(requestId);\n\n if (!progress) {\n return {\n outputs: {\n state: PathfindingState.Idle,\n progress: 0,\n nodesSearched: 0,\n isComplete: false,\n isInProgress: false\n }\n };\n }\n\n return {\n outputs: {\n state: progress.state,\n progress: progress.estimatedProgress,\n nodesSearched: progress.nodesSearched,\n isComplete: progress.state === PathfindingState.Completed,\n isInProgress: progress.state === PathfindingState.InProgress\n }\n };\n }\n}\n\n// =============================================================================\n// GetPathResult 节点 | GetPathResult Node\n// =============================================================================\n\n/**\n * @zh 获取寻路结果节点模板\n * @en Get path result node template\n */\nexport const GetPathResultTemplate: BlueprintNodeTemplate = {\n type: 'GetPathResult',\n title: 'Get Path Result',\n category: 'custom',\n description: 'Get completed path result / 获取已完成的寻路结果',\n keywords: ['path', 'result', 'get', 'output'],\n menuPath: ['Pathfinding', 'Incremental', 'Get Path Result'],\n isPure: true,\n inputs: [\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n outputs: [\n { name: 'found', displayName: 'Found', type: 'bool' },\n { name: 'path', displayName: 'Path', type: 'array' },\n { name: 'cost', displayName: 'Cost', type: 'float' },\n { name: 'framesUsed', displayName: 'Frames Used', type: 'int' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 获取寻路结果执行器\n * @en Get path result executor\n */\nexport class GetPathResultExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n\n const result = ctx.getPathResult(requestId);\n\n if (!result) {\n return {\n outputs: {\n found: false,\n path: [],\n cost: 0,\n framesUsed: 0\n }\n };\n }\n\n return {\n outputs: {\n found: result.found,\n path: result.path,\n cost: result.cost,\n framesUsed: result.framesUsed\n }\n };\n }\n}\n\n// =============================================================================\n// CancelPath 节点 | CancelPath Node\n// =============================================================================\n\n/**\n * @zh 取消寻路节点模板\n * @en Cancel path node template\n */\nexport const CancelPathTemplate: BlueprintNodeTemplate = {\n type: 'CancelPath',\n title: 'Cancel Path',\n category: 'custom',\n description: 'Cancel ongoing pathfinding / 取消正在进行的寻路',\n keywords: ['path', 'cancel', 'stop', 'abort'],\n menuPath: ['Pathfinding', 'Incremental', 'Cancel Path'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' }\n ],\n color: '#f44336'\n};\n\n/**\n * @zh 取消寻路执行器\n * @en Cancel path executor\n */\nexport class CancelPathExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n\n ctx.cancelPath(requestId);\n\n return { nextExec: 'exec' };\n }\n}\n\n// =============================================================================\n// SetObstacle 节点 | SetObstacle Node\n// =============================================================================\n\n/**\n * @zh 设置障碍物节点模板\n * @en Set obstacle node template\n */\nexport const SetObstacleTemplate: BlueprintNodeTemplate = {\n type: 'SetObstacle',\n title: 'Set Obstacle',\n category: 'custom',\n description: 'Set or remove obstacle / 设置或移除障碍物',\n keywords: ['obstacle', 'block', 'walkable', 'terrain'],\n menuPath: ['Pathfinding', 'Incremental', 'Set Obstacle'],\n inputs: [\n { name: 'exec', displayName: '', type: 'exec' },\n { name: 'x', displayName: 'X', type: 'int' },\n { name: 'y', displayName: 'Y', type: 'int' },\n { name: 'blocked', displayName: 'Blocked', type: 'bool' }\n ],\n outputs: [\n { name: 'exec', displayName: '', type: 'exec' }\n ],\n color: '#ff9800'\n};\n\n/**\n * @zh 设置障碍物执行器\n * @en Set obstacle executor\n */\nexport class SetObstacleExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const x = ctx.evaluateInput(node.id, 'x', 0) as number;\n const y = ctx.evaluateInput(node.id, 'y', 0) as number;\n const blocked = ctx.evaluateInput(node.id, 'blocked', true) as boolean;\n\n ctx.setObstacle(x, y, blocked);\n\n return { nextExec: 'exec' };\n }\n}\n\n// =============================================================================\n// IsPathComplete 节点 | IsPathComplete Node\n// =============================================================================\n\n/**\n * @zh 检查路径是否完成节点模板\n * @en Check if path is complete node template\n */\nexport const IsPathCompleteTemplate: BlueprintNodeTemplate = {\n type: 'IsPathComplete',\n title: 'Is Path Complete',\n category: 'custom',\n description: 'Check if pathfinding is complete / 检查寻路是否完成',\n keywords: ['path', 'complete', 'done', 'finished'],\n menuPath: ['Pathfinding', 'Incremental', 'Is Path Complete'],\n isPure: true,\n inputs: [\n { name: 'requestId', displayName: 'Request ID', type: 'int' }\n ],\n outputs: [\n { name: 'isComplete', displayName: 'Is Complete', type: 'bool' },\n { name: 'found', displayName: 'Found', type: 'bool' }\n ],\n color: '#4caf50'\n};\n\n/**\n * @zh 检查路径是否完成执行器\n * @en Check if path is complete executor\n */\nexport class IsPathCompleteExecutor implements INodeExecutor {\n execute(node: BlueprintNode, context: unknown): ExecutionResult {\n const ctx = context as IncrementalPathfindingContext;\n const requestId = ctx.evaluateInput(node.id, 'requestId', -1) as number;\n\n const progress = ctx.getPathProgress(requestId);\n const isComplete = progress?.state === PathfindingState.Completed ||\n progress?.state === PathfindingState.Failed;\n\n const result = ctx.getPathResult(requestId);\n const found = result?.found ?? false;\n\n return {\n outputs: {\n isComplete,\n found\n }\n };\n }\n}\n\n// =============================================================================\n// 节点定义集合 | Node Definitions Collection\n// =============================================================================\n\n/**\n * @zh 增量寻路节点定义集合\n * @en Incremental pathfinding node definitions collection\n */\nexport const IncrementalPathfindingNodeDefinitions = {\n templates: [\n RequestPathAsyncTemplate,\n StepPathTemplate,\n GetPathProgressTemplate,\n GetPathResultTemplate,\n CancelPathTemplate,\n SetObstacleTemplate,\n IsPathCompleteTemplate\n ],\n executors: new Map<string, INodeExecutor>([\n ['RequestPathAsync', new RequestPathAsyncExecutor()],\n ['StepPath', new StepPathExecutor()],\n ['GetPathProgress', new GetPathProgressExecutor()],\n ['GetPathResult', new GetPathResultExecutor()],\n ['CancelPath', new CancelPathExecutor()],\n ['SetObstacle', new SetObstacleExecutor()],\n ['IsPathComplete', new IsPathCompleteExecutor()]\n ])\n};\n"],"mappings":";;;;;;;;AAyBO,IAAMA,mBAA0C;EACnDC,MAAM;EACNC,OAAO;EACPC,UAAU;EACVC,aAAa;EACbC,UAAU;IAAC;IAAQ;IAAe;IAAS;IAAY;;EACvDC,UAAU;IAAC;IAAe;;EAC1BC,QAAQ;IACJ;MAAEC,MAAM;MAAQC,aAAa;MAAIR,MAAM;IAAO;IAC9C;MAAEO,MAAM;MAAUC,aAAa;MAAWR,MAAM;IAAQ;IACxD;MAAEO,MAAM;MAAUC,aAAa;MAAWR,MAAM;IAAQ;IACxD;MAAEO,MAAM;MAAQC,aAAa;MAASR,MAAM;IAAQ;IACpD;MAAEO,MAAM;MAAQC,aAAa;MAASR,MAAM;IAAQ;;EAExDS,SAAS;IACL;MAAEF,MAAM;MAAQC,aAAa;M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UAAMyB,QAAQF,QAAQE,SAAS;AAE/B,WAAO;MACHvC,SAAS;QACL+B;QACAQ;MACJ;IACJ;EACJ;AACJ;AAnBac;AAAN,IAAMA,yBAAN;AA6BA,IAAME,wCAAwC;EACjDC,WAAW;IACPlE;IACA2B;IACAQ;IACAU;IACAQ;IACAG;IACAM;;EAEJK,WAAW,oBAAIC,IAA2B;IACtC;MAAC;MAAoB,IAAIxD,yBAAAA;;IACzB;MAAC;MAAY,IAAIgB,iBAAAA;;IACjB;MAAC;MAAmB,IAAIS,wBAAAA;;IACxB;MAAC;MAAiB,IAAIS,sBAAAA;;IACtB;MAAC;MAAc,IAAIQ,mBAAAA;;IACnB;MAAC;MAAe,IAAIG,oBAAAA;;IACpB;MAAC;MAAkB,IAAIM,uBAAAA;;GAC1B;AACL;","names":["FindPathTemplate","type","title","category","description","keywords","menuPath","inputs","name","displayName","outputs","color","FindPathExecutor","execute","node","context","ctx","startX","evaluateInput","id","startY","endX","endY","result","findPath","found","path","cost","nextExec","FindPathSmoothTemplate","FindPathSmoothExecutor","findPathSmooth","IsWalkableTemplate","isPure","IsWalkableExecutor","x","y","walkable","isWalkable","GetPathLengthTemplate","GetPathLengthExecutor","length","GetPathDistanceTemplate","GetPathDistanceExecutor","distance","getPathDistance","GetPathPointTemplate","GetPathPointExecutor","index","valid","MoveAlongPathTemplate","MoveAlongPathExecutor","progress","Math","max","min","totalDistance","segmentDistances","i","dx","dy","dist","sqrt","push","targetDistance","accumulatedDistance","segmentDist","segmentProgress","last","HasLineOfSightTemplate","HasLineOfSightExecutor","hasLOS","hasLineOfSight","PathfindingNodeDefinitions","templates","executors","Map","RequestPathAsyncTemplate","type","title","category","description","keywords","menuPath","inputs","name","displayName","outputs","color","RequestPathAsyncExecutor","execute","node","context","ctx","startX","evaluateInput","id","startY","endX","endY","priority","requestId","requestPath","nextExec","StepPathTemplate","StepPathExecutor","maxIterations","progress","stepPath","state","estimatedProgress","nodesSearched","GetPathProgressTemplate","isPure","GetPathProgressExecutor","getPathProgress","PathfindingState","Idle","isComplete","isInProgress","Completed","InProgress","GetPathResultTemplate","GetPathResultExecutor","result","getPathResult","found","path","cost","framesUsed","CancelPathTemplate","CancelPathExecutor","cancelPath","SetObstacleTemplate","SetObstacleExecutor","x","y","blocked","setObstacle","IsPathCompleteTemplate","IsPathCompleteExecutor","Failed","IncrementalPathfindingNodeDefinitions","templates","executors","Map"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esengine/pathfinding",
3
- "version": "13.0.0",
3
+ "version": "13.1.0",
4
4
  "description": "寻路系统 | Pathfinding System - A*, Grid, NavMesh",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,6 +15,10 @@
15
15
  "types": "./dist/ecs.d.ts",
16
16
  "import": "./dist/ecs.js"
17
17
  },
18
+ "./avoidance": {
19
+ "types": "./dist/avoidance.d.ts",
20
+ "import": "./dist/avoidance.js"
21
+ },
18
22
  "./nodes": {
19
23
  "types": "./dist/nodes.d.ts",
20
24
  "import": "./dist/nodes.js"
@@ -29,8 +33,8 @@
29
33
  "typescript": "^5.8.0",
30
34
  "vitest": "^2.1.9",
31
35
  "@esengine/blueprint": "4.5.0",
32
- "@esengine/ecs-framework-math": "2.11.0",
33
- "@esengine/ecs-framework": "2.7.1"
36
+ "@esengine/ecs-framework": "2.7.1",
37
+ "@esengine/ecs-framework-math": "2.11.0"
34
38
  },
35
39
  "peerDependencies": {
36
40
  "@esengine/ecs-framework-math": "2.11.0",