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.
12 lines (11 loc) • 325 B
TypeScript
export default function cannonBall(flyingId: string, targetId: string, options?: {
moveX?: boolean;
moveY?: boolean;
duration?: number;
acceleration?: number;
scale?: number;
fly3D?: boolean;
onTransitionEnd?: () => void;
removeOriginal?: boolean;
resetTransformation?: boolean;
}): void;