UNPKG

html-trajectory

Version:

Animate HTML elements along a curved path from their current position to a target element. Eg. a product photo flying into the cart icon.

17 lines (14 loc) 469 B
// Type definitions for test environment import { HappyDOMWindow } from 'happy-dom'; // Declare global variables in test environment declare global { interface Window { requestAnimationFrame: (callback: FrameRequestCallback) => number; performance: { now: () => number; }; } // Ensure window properties are available globally in tests var requestAnimationFrame: Window['requestAnimationFrame']; var performance: Window['performance']; }