import { spring, SpringConfig } from 'remotion';

export const COMPONENT_SPRING: Partial<SpringConfig> = {
    stiffness: 200,
    damping: 20,
    mass: 1,
};

export const MOUSE_SPRING: Partial<SpringConfig> = {
    stiffness: 150,
    damping: 15,
    mass: 0.5,
};

export const clickAnimation = (frame: number, clickFrame: number, fps: number) => {
    return spring({
        frame: frame - clickFrame,
        fps,
        config: {
            stiffness: 300,
            damping: 10,
        },
    });
};
