AnimationTimeline.d.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import type { IDocument, IAnimationTimeline, IElement, IAnimation } from '@antv/g-lite';
  2. import { Animation } from './Animation';
  3. export declare function compareAnimations(leftAnimation: IAnimation, rightAnimation: IAnimation): number;
  4. /**
  5. * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/web-animations-js/index.d.ts
  6. */
  7. export declare class AnimationTimeline implements IAnimationTimeline {
  8. private document;
  9. /**
  10. * all active animations
  11. */
  12. animations: Animation[];
  13. private ticking;
  14. private timelineTicking;
  15. private hasRestartedThisFrame;
  16. animationsWithPromises: Animation[];
  17. private inTick;
  18. private pendingEffects;
  19. currentTime: number | null;
  20. private rafId;
  21. private rafCallbacks;
  22. private frameId;
  23. constructor(document: IDocument);
  24. getAnimations(): Animation[];
  25. isTicking(): boolean;
  26. play(target: IElement, keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
  27. applyDirtiedAnimation(animation: Animation): void;
  28. restart(): boolean;
  29. destroy(): void;
  30. applyPendingEffects(): void;
  31. private updateAnimationsPromises;
  32. private discardAnimations;
  33. private restartWebAnimationsNextTick;
  34. private webAnimationsNextTick;
  35. private processRafCallbacks;
  36. private rAF;
  37. private requestAnimationFrame;
  38. tick(t: number, isAnimationFrame: boolean, updatingAnimations: IAnimation[]): Animation[][];
  39. }
  40. //# sourceMappingURL=AnimationTimeline.d.ts.map