import { Variants } from 'framer-motion';
export const complexAnimations: Array<{
id: number;
name: string;
type: string;
variants: Variants;
transition: {
duration: number;
ease: string | number[];
repeat?: number;
repeatType?: 'loop' | 'reverse' | 'mirror';
delay?: number;
staggerChildren?: number;
damping?: number;
stiffness?: number;
mass?: number;
bounce?: number;
restDelta?: number;
restSpeed?: number;
when?: 'beforeChildren' | 'afterChildren' | 'parallel';
repeatDelay?: number;
yoyo?: boolean | number;
};
keyframes: Array<{
opacity?: number;
scale?: number;
rotate?: number;
x?: number | string;
y?: number | string;
z?: number | string;
skewX?: number;
skewY?: number;
perspective?: number;
transformPerspective?: number;
borderRadius?: string;
boxShadow?: string;
backgroundColor?: string;
color?: string;
filter?: string;
time: number;
easing: string | number[];
}>;
particleSystem?: {
count: number;
speed: number;
direction: number;
spread: number;
lifetime: number;
colors: string[];
shapes: ('circle' | 'square' | 'triangle')[];
emitters: Array<{
x: number;
y: number;
rate: number;
}>;
forces: Array<{
type: 'gravity' | 'wind' | 'vortex';
strength: number;
vector: [number, number];
}>;
turbulence: {
intensity: number;
frequency: number;
octaves: number;
};
collisions: {
enabled: boolean;
bounce: number;
friction: number;
};
rendering: {
blendMode: 'normal' | 'add' | 'multiply' | 'screen';
opacityCurve: number[];
sizeCurve: number[];
colorCurve: { r: number[]; g: number[]; b: number[]; a: number[] };
};
};
pathAnimation?: {
path: string; // SVG path data
length: number;
offset: number;
curve: number[];
segments: Array<{
start: number;
end: number;
tension: number;
}>;
morphTargets: string[];
morphPrecision: number;
};
soundSync?: {
audioUrl: string;
bpm: number;
beatMap: number[];
amplitudeThreshold: number;
frequencyBands: number;
reactivity: number;
effects: Array<{
type: 'scale' | 'rotate' | 'color' | 'move';
min: number;
max: number;
band: number;
}>;
};
interactionTriggers?: Array<{
trigger: 'hover' | 'click' | 'drag' | 'viewport' | 'scroll';
threshold: number;
actions: Array<{
animate: string;
set: { [key: string]: any };
while: boolean;
}>;
gestures: {
dragConstraints?: { top?: number; left?: number; right?: number; bottom?: number };
dragElastic?: number;
dragTransition?: { bounceStiffness?: number; bounceDamping?: number };
tap?: boolean;
doubleTap?: boolean;
};
}>;
nestedAnimations?: Array<{
childId: string;
delay: number;
inherit: boolean;
overrides: Partial<Variants>;
}>;
customProps: { [key: string]: any };
}> = [
{
id: 1,
name: 'Cosmic Explosion',
type: 'particle',
variants: {
initial: { opacity: 0, scale: 0.5, rotate: 0, x: 0, y: 0 },
animate: { opacity: 1, scale: [1, 1.5, 1], rotate: 360, x: [0, 100, -100, 0], y: [0, -50, 50, 0], transition: { duration: 5, times: [0, 0.3, 0.7, 1] } },
exit: { opacity: 0, scale: 0, rotate: -360, x: 200, y: 200 },
hover: { scale: 1.2, rotate: 10, boxShadow: '0px 0px 20px rgba(255,0,0,0.5)' },
tap: { scale: 0.9, rotate: -10, boxShadow: '0px 0px 10px rgba(0,255,0,0.5)' },
drag: { scale: 1.1, rotate: 5, boxShadow: '0px 0px 15px rgba(0,0,255,0.5)' }
},
transition: {
duration: 10,
ease: 'easeInOut',
repeat: Infinity,
repeatType: 'reverse',
delay: 0.5,
staggerChildren: 0.1,
damping: 20,
stiffness: 100,
mass: 1,
bounce: 0.5,
restDelta: 0.01,
restSpeed: 0.01,
when: 'beforeChildren',
repeatDelay: 1,
yoyo: true
},
keyframes: [
{ opacity: 0, scale: 0, rotate: 0, x: 0, y: 0, time: 0, easing: 'linear' },
{ opacity: 0.2, scale: 0.5, rotate: 45, x: 20, y: -20, time: 1, easing: [0.25, 0.1, 0.25, 1] },
{ opacity: 0.4, scale: 1, rotate: 90, x: 40, y: -40, time: 2, easing: 'easeIn' },
{ opacity: 0.6, scale: 1.5, rotate: 135, x: 60, y: -60, time: 3, easing: 'easeOut' },
{ opacity: 0.8, scale: 2, rotate: 180, x: 80, y: -80, time: 4, easing: [0.42, 0, 1, 1] },
{ opacity: 1, scale: 2.5, rotate: 225, x: 100, y: -100, time: 5, easing: [0, 0, 0.58, 1] },
{ opacity: 0.8, scale: 2, rotate: 270, x: 80, y: -80, time: 6, easing: 'linear' },
{ opacity: 0.6, scale: 1.5, rotate: 315, x: 60, y: -60, time: 7, easing: [0.25, 0.1, 0.25, 1] },
{ opacity: 0.4, scale: 1, rotate: 360, x: 40, y: -40, time: 8, easing: 'easeIn' },
{ opacity: 0.2, scale: 0.5, rotate: 405, x: 20, y: -20, time: 9, easing: 'easeOut' },
{ opacity: 0, scale: 0, rotate: 450, x: 0, y: 0, time: 10, easing: [0.42, 0, 1, 1] }
],
particleSystem: {
count: 1000,
speed: 5,
direction: 0,
spread: 360,
lifetime: 2,
colors: ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#ff00ff', '#00ffff'],
shapes: ['circle', 'square', 'triangle'],
emitters: [
{ x: 0, y: 0, rate: 100 },
{ x: 50, y: 50, rate: 50 },
{ x: -50, y: -50, rate: 50 }
],
forces: [
{ type: 'gravity', strength: 9.8, vector: [0, 1] },
{ type: 'wind', strength: 2, vector: [1, 0] },
{ type: 'vortex', strength: 5, vector: [0, 0] }
],
turbulence: {
intensity: 0.5,
frequency: 0.1,
octaves: 4
},
collisions: {
enabled: true,
bounce: 0.8,
friction: 0.5
},
rendering: {
blendMode: 'add',
opacityCurve: [0, 1, 0.5, 0],
sizeCurve: [1, 2, 1.5, 1],
colorCurve: { r: [255, 200, 150, 100], g: [0, 50, 100, 150], b: [0, 0, 50, 100], a: [255, 200, 150, 0] }
}
},
pathAnimation: {
path: 'M 0 0 Q 50 50 100 0 Q 150 -50 200 0 Q 250 50 300 0',
length: 300,
offset: 0,
curve: [0.25, 0.1, 0.25, 1],
segments: [
{ start: 0, end: 100, tension: 0.5 },
{ start: 100, end: 200, tension: 0.7 },
{ start: 200, end: 300, tension: 0.3 }
],
morphTargets: [
'M 0 0 L 100 100 L 200 0 L 300 100',
'M 0 100 L 100 0 L 200 100 L 300 0'
],
morphPrecision: 10
},
soundSync: {
audioUrl: 'https://example.com/audio.mp3',
bpm: 120,
beatMap: [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4],
amplitudeThreshold: 0.5,
frequencyBands: 8,
reactivity: 0.8,
effects: [
{ type: 'scale', min: 0.8, max: 1.2, band: 0 },
{ type: 'rotate', min: -10, max: 10, band: 1 },
{ type: 'color', min: 0, max: 255, band: 2 },
{ type: 'move', min: -50, max: 50, band: 3 }
]
},
interactionTriggers: [
{
trigger: 'hover',
threshold: 0,
actions: [
{ animate: 'hover', set: { scale: 1.2 }, while: true }
],
gestures: {}
},
{
trigger: 'click',
threshold: 0,
actions: [
{ animate: 'tap', set: { rotate: 360 }, while: false }
],
gestures: { tap: true, doubleTap: true }
},
{
trigger: 'drag',
threshold: 10,
actions: [
{ animate: 'drag', set: { x: 'auto' }, while: true }
],
gestures: {
dragConstraints: { top: -100, left: -100, right: 100, bottom: 100 },
dragElastic: 0.5,
dragTransition: { bounceStiffness: 600, bounceDamping: 10 }
}
},
{
trigger: 'viewport',
threshold: 0.5,
actions: [
{ animate: 'animate', set: {}, while: true }
],
gestures: {}
},
{
trigger: 'scroll',
threshold: 0.2,
actions: [
{ animate: 'exit', set: { y: -200 }, while: false }
],
gestures: {}
}
],
nestedAnimations: [
{ childId: 'child1', delay: 0.2, inherit: true, overrides: { scale: 0.8 } },
{ childId: 'child2', delay: 0.4, inherit: false, overrides: { rotate: 180 } },
{ childId: 'child3', delay: 0.6, inherit: true, overrides: { opacity: 0.5 } },
{ childId: 'child4', delay: 0.8, inherit: false, overrides: { x: 50 } },
{ childId: 'child5', delay: 1.0, inherit: true, overrides: { y: -50 } }
],
customProps: {
glowIntensity: 0.8,
fractalNoise: { octaves: 5, persistence: 0.5, lacunarity: 2 },
shaderCode: `
uniform float time;
varying vec2 vUv;
void main() {
gl_FragColor = vec4(sin(time + vUv.x), cos(time + vUv.y), tan(time), 1.0);
}
`,
physics: {
velocity: [0, 0],
acceleration: [0, 9.8],
friction: 0.1,
bounce: 0.7
},
aiBehavior: {
stateMachine: {
states: ['idle', 'active', 'exploding', 'fading'],
transitions: [
{ from: 'idle', to: 'active', condition: 'hover' },
{ from: 'active', to: 'exploding', condition: 'click' },
{ from: 'exploding', to: 'fading', condition: 'timeout' },
{ from: 'fading', to: 'idle', condition: 'complete' }
]
},
decisionTree: {
root: {
question: 'isInteracted?',
yes: { action: 'explode' },
no: { question: 'isVisible?', yes: { action: 'pulse' }, no: { action: 'sleep' } }
}
}
}
}
},
// Animation 2
{
id: 2,
name: 'Quantum Wave Collapse',
type: 'wave',
variants: {
initial: { opacity: 1, scale: 1, rotate: 0, x: 0, y: 0, filter: 'blur(0px)' },
animate: { opacity: [1, 0.5, 1], scale: [1, 1.2, 0.8, 1], rotate: [0, 180, -180, 0], x: [0, 50, -50, 0], y: [0, 30, -30, 0], filter: ['blur(0px)', 'blur(5px)', 'blur(0px)'], transition: { duration: 8, times: [0, 0.25, 0.75, 1] } },
exit: { opacity: 0, scale: 0.1, rotate: 720, x: -200, y: 200, filter: 'blur(10px)' },
hover: { scale: 1.1, rotate: 5, filter: 'brightness(1.2)' },
tap: { scale: 0.95, rotate: -5, filter: 'contrast(1.5)' },
drag: { scale: 1.05, rotate: 2, filter: 'sepia(0.5)' }
},
transition: {
duration: 15,
ease: [0.43, 0.25, 0.23, 1],
repeat: 5,
repeatType: 'mirror',
delay: 1,
staggerChildren: 0.05,
damping: 15,
stiffness: 200,
mass: 0.5,
bounce: 0.3,
restDelta: 0.005,
restSpeed: 0.005,
when: 'afterChildren',
repeatDelay: 2,
yoyo: 3
},
keyframes: [
{ opacity: 1, scale: 1, rotate: 0, x: 0, y: 0, filter: 'blur(0px)', time: 0, easing: 'linear' },
{ opacity: 0.9, scale: 1.1, rotate: 36, x: 10, y: 10, filter: 'blur(1px)', time: 1.5, easing: [0.43, 0.25, 0.23, 1] },
{ opacity: 0.8, scale: 1.2, rotate: 72, x: 20, y: 20, filter: 'blur(2px)', time: 3, easing: 'easeInQuad' },
{ opacity: 0.7, scale: 1.3, rotate: 108, x: 30, y: 30, filter: 'blur(3px)', time: 4.5, easing: 'easeOutQuad' },
{ opacity: 0.6, scale: 1.4, rotate: 144, x: 40, y: 40, filter: 'blur(4px)', time: 6, easing: [0.6, -0.28, 0.735, 0.045] },
{ opacity: 0.5, scale: 1.5, rotate: 180, x: 50, y: 50, filter: 'blur(5px)', time: 7.5, easing: [0.175, 0.885, 0.32, 1] },
{ opacity: 0.6, scale: 1.4, rotate: 216, x: 40, y: 40, filter: 'blur(4px)', time: 9, easing: 'linear' },
{ opacity: 0.7, scale: 1.3, rotate: 252, x: 30, y: 30, filter: 'blur(3px)', time: 10.5, easing: [0.43, 0.25, 0.23, 1] },
{ opacity: 0.8, scale: 1.2, rotate: 288, x: 20, y: 20, filter: 'blur(2px)', time: 12, easing: 'easeInQuad' },
{ opacity: 0.9, scale: 1.1, rotate: 324, x: 10, y: 10, filter: 'blur(1px)', time: 13.5, easing: 'easeOutQuad' },
{ opacity: 1, scale: 1, rotate: 360, x: 0, y: 0, filter: 'blur(0px)', time: 15, easing: [0.6, -0.28, 0.735, 0.045] }
],
particleSystem: {
count: 500,
speed: 3,
direction: 90,
spread: 180,
lifetime: 3,
colors: ['#ff9900', '#ff6600', '#ff3300', '#ff0000', '#cc0000'],
shapes: ['circle', 'triangle'],
emitters: [
{ x: 0, y: 100, rate: 200 },
{ x: 100, y: 0, rate: 100 },
{ x: -100, y: 0, rate: 100 },
{ x: 0, y: -100, rate: 100 }
],
forces: [
{ type: 'gravity', strength: -5, vector: [0, -1] },
{ type: 'wind', strength: 1.5, vector: [-1, 0] },
{ type: 'vortex', strength: 3, vector: [50, 50] },
{ type: 'gravity', strength: 2, vector: [1, 1] }
],
turbulence: {
intensity: 0.3,
frequency: 0.05,
octaves: 6
},
collisions: {
enabled: true,
bounce: 0.6,
friction: 0.3
},
rendering: {
blendMode: 'screen',
opacityCurve: [0, 0.5, 1, 0.5, 0],
sizeCurve: [0.5, 1, 2, 1, 0.5],
colorCurve: { r: [255, 255, 200, 150, 100], g: [153, 102, 51, 0, 0], b: [0, 0, 0, 0, 0], a: [0, 128, 255, 128, 0] }
}
},
pathAnimation: {
path: 'M10 80 Q 52.5 10, 95 80 T 180 80',
length: 200,
offset: 50,
curve: [0.6, 0, 0.735, 0.045],
segments: [
{ start: 0, end: 50, tension: 0.8 },
{ start: 50, end: 100, tension: 0.6 },
{ start: 100, end: 150, tension: 0.4 },
{ start: 150, end: 200, tension: 0.2 }
],
morphTargets: [
'M10 80 L 95 10 L 180 80',
'M10 10 Q 95 80 180 10',
'M10 50 C 52.5 10 137.5 90 180 50'
],
morphPrecision: 20
},
soundSync: {
audioUrl: 'https://example.com/wave.mp3',
bpm: 140,
beatMap: [0, 0.428, 0.857, 1.286, 1.714, 2.143, 2.571, 3, 3.428, 3.857, 4.286],
amplitudeThreshold: 0.6,
frequencyBands: 16,
reactivity: 1.2,
effects: [
{ type: 'scale', min: 0.5, max: 1.5, band: 4 },
{ type: 'rotate', min: -180, max: 180, band: 8 },
{ type: 'color', min: 100, max: 200, band: 12 },
{ type: 'move', min: -100, max: 100, band: 0 },
{ type: 'scale', min: 0.9, max: 1.1, band: 2 }
]
},
interactionTriggers: [
{
trigger: 'hover',
threshold: 0,
actions: [
{ animate: 'hover', set: { filter: 'brightness(1.5)' }, while: true },
{ animate: 'animate', set: { scale: 1.05 }, while: false }
],
gestures: {}
},
{
trigger: 'click',
threshold: 0,
actions: [
{ animate: 'tap', set: { rotate: -360 }, while: false },
{ animate: 'exit', set: { opacity: 0.5 }, while: true }
],
gestures: { tap: true, doubleTap: false }
},
{
trigger: 'drag',
threshold: 20,
actions: [
{ animate: 'drag', set: { y: 'auto' }, while: true }
],
gestures: {
dragConstraints: { top: 0, left: 0, right: 0, bottom: 0 },
dragElastic: 0.3,
dragTransition: { bounceStiffness: 400, bounceDamping: 20 }
}
},
{
trigger: 'viewport',
threshold: 0.3,
actions: [
{ animate: 'initial', set: {}, while: false }
],
gestures: {}
},
{
trigger: 'scroll',
threshold: 0.1,
actions: [
{ animate: 'animate', set: { x: -100 }, while: true },
{ animate: 'exit', set: { scale: 0.5 }, while: false }
],
gestures: {}
}
],
nestedAnimations: [
{ childId: 'wave1', delay: 0.1, inherit: true, overrides: { opacity: 0.8, scale: 1.1 } },
{ childId: 'wave2', delay: 0.2, inherit: false, overrides: { rotate: 90, x: ```
done with the animations it will use
agent GIF - maybe i should make a tutorial seems easy