UNPKG

@visactor/vrender-animate

Version:

This module provides a graph-based animation system for VRender.

31 lines (30 loc) 1.39 kB
import type { EasingType, IAnimate, IStep } from '@visactor/vrender-core'; import { ACustomAnimate } from './custom-animate'; export interface IScaleAnimationOptions { direction?: 'x' | 'y' | 'xy'; fromScale?: number; fromScaleX?: number; fromScaleY?: number; options?: Pick<IScaleAnimationOptions, 'direction' | 'fromScale' | 'fromScaleX' | 'fromScaleY'>; } export declare class ScaleIn extends ACustomAnimate<Record<string, number>> { valid: boolean; constructor(from: null, to: null, duration: number, easing: EasingType, params?: IScaleAnimationOptions); _updateFunction: (ratio: number) => void; onBind(): void; onEnd(cb?: (animate: IAnimate, step: IStep) => void): void; updateX(ratio: number): void; updateY(ratio: number): void; updateXY(ratio: number): void; private applyScaleTransientAttrs; deleteSelfAttr(key: string): void; deleteSelfAttrs(keys: string[]): void; onUpdate(end: boolean, ratio: number, out: Record<string, any>): void; } export declare class ScaleOut extends ACustomAnimate<Record<string, number>> { valid: boolean; constructor(from: null, to: null, duration: number, easing: EasingType, params?: IScaleAnimationOptions); onBind(): void; onEnd(cb?: (animate: IAnimate, step: IStep) => void): void; onUpdate(end: boolean, ratio: number, out: Record<string, any>): void; }