UNPKG

1.78 kBTypeScriptView Raw
1import Path from '../graphic/Path';
2import Element, { ElementAnimateConfig } from '../Element';
3import { split } from './dividePath';
4export declare function alignBezierCurves(array1: number[][], array2: number[][]): number[][][];
5export interface CombineMorphingPath extends Path {
6 childrenRef(): (CombineMorphingPath | Path)[];
7 __isCombineMorphing: boolean;
8}
9export declare function centroid(array: number[]): number[];
10export declare function isCombineMorphing(path: Element): path is CombineMorphingPath;
11export declare function isMorphing(el: Element): boolean;
12export declare function morphPath(fromPath: Path, toPath: Path, animationOpts: ElementAnimateConfig): Path;
13export interface DividePathParams {
14 path: Path;
15 count: number;
16}
17export interface DividePath {
18 (params: DividePathParams): Path[];
19}
20export interface IndividualDelay {
21 (index: number, count: number, fromPath: Path, toPath: Path): number;
22}
23export interface CombineConfig extends ElementAnimateConfig {
24 dividePath?: DividePath;
25 individualDelay?: IndividualDelay;
26}
27export declare function combineMorph(fromList: (CombineMorphingPath | Path)[], toPath: Path, animationOpts: CombineConfig): {
28 fromIndividuals: Path<import("../graphic/Path").PathProps>[];
29 toIndividuals: Path<import("../graphic/Path").PathProps>[];
30 count: number;
31};
32export interface SeparateConfig extends ElementAnimateConfig {
33 dividePath?: DividePath;
34 individualDelay?: IndividualDelay;
35}
36export declare function separateMorph(fromPath: Path, toPathList: Path[], animationOpts: SeparateConfig): {
37 fromIndividuals: Path<import("../graphic/Path").PathProps>[];
38 toIndividuals: Path<import("../graphic/Path").PathProps>[];
39 count: number;
40};
41export { split as defaultDividePath };