Home > @esengine/ecs-framework-monorepo > Interpolation > getPathLength
Interpolation.getPathLength() method
计算路径总长度
Signature:
typescript
static getPathLength(path: Vector2[], closed?: boolean): number;
Parameters
Parameter | Type | Description |
---|---|---|
path | Vector2[] | 路径点数组 |
closed | boolean | (Optional) 是否为闭合路径 |
Returns:
number
路径总长度