UNPKG

@antv/util

Version:

> AntV 底层依赖的工具库,不建议在自己业务中使用。

14 lines (12 loc) 445 B
import type { PathArray, PathLengthFactoryOptions } from '../types'; import { pathLengthFactory } from './path-length-factory'; /** * Returns [x,y] coordinates of a point at a given length of a shape. */ export function getPointAtLength( pathInput: string | PathArray, distance: number, options?: Partial<PathLengthFactoryOptions>, ) { return pathLengthFactory(pathInput, distance, { ...options, bbox: false, length: true }).point; }