/** * A subset of SVGGeometryElement: anything that can report its length and sample * a point at a given arc distance. Real ``/``/`` elements * satisfy it natively; tests pass a plain object. */ export interface PathGeometry { getTotalLength(): number; getPointAtLength(distance: number): { x: number; y: number; }; } /** A path source: a CSS selector or any geometry element/object. */ export type PathInput = string | PathGeometry; /** A sampled point on a path: position plus the tangent direction (degrees). */ export interface PathPoint { x: number; y: number; /** tangent direction in degrees, fed to autoRotate */ angle: number; } export interface SamplePathOptions { /** * Distance, as a fraction of total length, used to estimate the tangent angle * from two neighbouring samples. Smaller is sharper but noisier. Default 0.001. */ tangentEpsilon?: number; } export interface PathSampler { /** Total path length, in the path's user units. */ readonly length: number; /** Point at progress t (clamped to 0..1), with the tangent angle. */ at(t: number): PathPoint; } /** Resolve a {@link PathInput} to a geometry source (querySelector for strings). */ export declare function resolvePathGeometry(path: PathInput): PathGeometry; /** * Wrap a path in a length-normalized sampler: feed it t in 0..1 and read back the * point plus tangent angle. Total length is measured once; each `at()` is two * getPointAtLength() reads (the point, and a neighbour for the tangent). */ export declare function samplePath(path: PathInput, options?: SamplePathOptions): PathSampler; //# sourceMappingURL=geometry.d.ts.map