Skip to content

Commit 6ad9962

Browse files
committed
Make avatar animations more organic and less repetitive
Organic Animation Improvements: - Reward = Time: Multi-point breathing pattern with scale + opacity variations - Playful: Chaotic dance with scale, rotation, and opacity changes - Scalable: Organic growth pattern with natural scale and opacity variations Key Features: - Multiple keyframes (5-7 points) instead of simple 3-point loops - Combined scale, rotation, and opacity animations for complexity - Varied timing with custom 'times' arrays for irregular rhythms - Different durations and delays between color1 and color2 - More natural, less predictable animation patterns This eliminates the mechanical, repetitive feel and creates more organic, living animations that feel natural and engaging.
1 parent d45e16e commit 6ad9962

File tree

1 file changed

+38
-24
lines changed

1 file changed

+38
-24
lines changed

src/components/Avatar.tsx

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,74 +27,88 @@ const BUZZVIL_VALUE_COLORS = {
2727
// Buzzvil Design Principles - 3 distinct, smooth animations
2828
const BUZZVIL_PRINCIPLE_ANIMATIONS = {
2929
'reward-time': {
30-
// Animation 1: More visible pulse scale for testing
30+
// Animation 1: Organic breathing pattern with varied timing
3131
color1: {
3232
animate: {
33-
scale: [1, 1.2, 1],
33+
scale: [1, 1.15, 0.95, 1.08, 1],
34+
opacity: [1, 0.8, 1, 0.9, 1],
3435
},
3536
transition: {
36-
duration: 1,
37+
duration: 2.3,
3738
repeat: Infinity,
38-
ease: "easeInOut" as const
39+
ease: "easeInOut" as const,
40+
times: [0, 0.3, 0.6, 0.8, 1]
3941
}
4042
},
4143
color2: {
4244
animate: {
43-
scale: [1, 0.8, 1],
45+
scale: [1, 0.85, 1.1, 0.9, 1],
46+
opacity: [1, 0.9, 0.7, 1, 0.8],
4447
},
4548
transition: {
46-
duration: 1,
49+
duration: 1.9,
4750
repeat: Infinity,
48-
ease: "easeInOut" as const,
49-
delay: 0.2
51+
ease: "easeOut" as const,
52+
delay: 0.4,
53+
times: [0, 0.25, 0.55, 0.75, 1]
5054
}
5155
}
5256
},
5357
'playful': {
54-
// Animation 2: More visible bouncy pulse for testing
58+
// Animation 2: Chaotic playful dance with unpredictable patterns
5559
color1: {
5660
animate: {
57-
scale: [1, 1.3, 0.7, 1.1, 1],
61+
scale: [1, 1.2, 0.8, 1.3, 0.9, 1.1, 1],
62+
rotate: [0, 15, -10, 25, -5, 20, 0],
63+
opacity: [1, 0.6, 1, 0.7, 0.9, 0.8, 1],
5864
},
5965
transition: {
60-
duration: 1.5,
66+
duration: 1.2,
6167
repeat: Infinity,
62-
ease: "easeInOut" as const
68+
ease: "easeOut" as const,
69+
times: [0, 0.2, 0.4, 0.6, 0.8, 0.9, 1]
6370
}
6471
},
6572
color2: {
6673
animate: {
67-
scale: [1, 0.7, 1.3, 0.9, 1],
74+
scale: [1, 0.9, 1.25, 0.75, 1.15, 0.85, 1],
75+
rotate: [0, -20, 12, -18, 8, -15, 0],
76+
opacity: [1, 0.8, 0.5, 1, 0.6, 0.9, 1],
6877
},
6978
transition: {
70-
duration: 1.5,
79+
duration: 1.1,
7180
repeat: Infinity,
72-
ease: "easeInOut" as const,
73-
delay: 0.3
81+
ease: "easeIn" as const,
82+
delay: 0.2,
83+
times: [0, 0.15, 0.35, 0.55, 0.75, 0.85, 1]
7484
}
7585
}
7686
},
7787
'scalable': {
78-
// Animation 3: More visible pulse for testing
88+
// Animation 3: Organic growth pattern with natural variations
7989
color1: {
8090
animate: {
81-
scale: [1, 1.15, 1],
91+
scale: [1, 1.12, 0.96, 1.18, 0.94, 1.08, 1],
92+
opacity: [1, 0.85, 1, 0.75, 1, 0.9, 1],
8293
},
8394
transition: {
84-
duration: 2,
95+
duration: 2.8,
8596
repeat: Infinity,
86-
ease: "easeInOut" as const
97+
ease: "easeInOut" as const,
98+
times: [0, 0.2, 0.4, 0.6, 0.8, 0.9, 1]
8799
}
88100
},
89101
color2: {
90102
animate: {
91-
scale: [1, 0.85, 1],
103+
scale: [1, 0.88, 1.14, 0.92, 1.16, 0.86, 1],
104+
opacity: [1, 0.9, 0.7, 1, 0.8, 0.95, 1],
92105
},
93106
transition: {
94-
duration: 2,
107+
duration: 2.1,
95108
repeat: Infinity,
96-
ease: "easeInOut" as const,
97-
delay: 0.4
109+
ease: "easeOut" as const,
110+
delay: 0.5,
111+
times: [0, 0.18, 0.38, 0.58, 0.78, 0.88, 1]
98112
}
99113
}
100114
},

0 commit comments

Comments
 (0)