You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.6 KiB

4 months ago
import type { IAnimation } from '@antv/g';
import type { AnimationEffectTiming, STDAnimation } from '../animations/types';
import type { GraphOptions } from '../spec';
import type { AnimationStage } from '../spec/element/animation';
import type { ElementType, Keyframe } from '../types';
export declare function createAnimationsProxy(animations: IAnimation[]): IAnimation | null;
export declare function createAnimationsProxy(sourceAnimation: IAnimation, targetAnimations: IAnimation[]): IAnimation;
/**
* <zh/>
*
* <en/> Preprocess keyframes, filter out the properties of useless animations
* @param keyframes - <zh/> | <en/> keyframes
* @returns <zh/> | <en/> keyframes
*/
export declare function preprocessKeyframes(keyframes: Keyframe[]): Keyframe[];
/**
* <zh/>
*
* <en/> Get default value of attribute
* @param name - <zh/> | <en/> Attribute name
* @returns <zh/> | <en/> Attribute default value
* @remarks
* <zh/> G
*
* <en/> During the animation, some attributes do not explicitly specify the attribute value, but in fact there is an attribute value in G, so use this method to get the actual default value
*/
export declare function inferDefaultValue(name: string): false | "visible" | 0 | 1 | never[] | undefined;
/**
* <zh/>
*
* <en/> Get global animation configuration
* @param options - <zh/> G6 | <en/> G6 configuration(used to get global animation configuration)
* @param localAnimation - <zh/> | <en/> local animation configuration
* @returns <zh/> | <en/> animation configuration
*/
export declare function getAnimationOptions(options: GraphOptions, localAnimation: boolean | AnimationEffectTiming | undefined): false | AnimationEffectTiming;
/**
* <zh/>
*
* <en/> Get element animation
* @param options - <zh/> G6 | <en/> G6 configuration
* @param elementType - <zh/> | <en/> element type
* @param stage - <zh/> | <en/> animation stage
* @param localAnimation - <zh/> | <en/> local animation configuration
* @returns <zh/> | <en/> animation timing configuration
*/
export declare function getElementAnimationOptions(options: GraphOptions, elementType: ElementType, stage: AnimationStage, localAnimation?: AnimationEffectTiming | boolean): STDAnimation;