Skip to content

Commit c8ccdab

Browse files
committed
Fix avatar animation edge artifacts by constraining movements to circular bounds
Animation Improvements: - Reward = Time: Reduced scale (1.05 max) and translation (2px max) to prevent edge artifacts - Playful: Reduced scale (1.15 max) and translation (4px max) for smoother bouncy movement - Scalable: Reduced scale (1.2 max) and translation (5px max) for controlled expansion All animations now stay within the circular mask boundaries to prevent: - Frame/edge artifacts showing inside the thumbnail - Elements extending beyond the circular bounds - Visual glitches during rotation and scaling Animations maintain their distinct personalities while being properly constrained.
1 parent 95c7186 commit c8ccdab

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

src/components/Avatar.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ const BUZZVIL_VALUE_COLORS = {
2727
// Buzzvil Design Principles - 3 distinct, smooth animations
2828
const BUZZVIL_PRINCIPLE_ANIMATIONS = {
2929
'reward-time': {
30-
// Animation 1: Smooth, flowing movements - like time passing
30+
// Animation 1: Smooth, flowing movements - like time passing (constrained to circle)
3131
color1: {
3232
animate: {
33-
scale: [1, 1.1, 1],
33+
scale: [1, 1.05, 1],
3434
rotate: [0, 120, 240, 360],
35-
translateX: [0, 4, 0],
36-
translateY: [0, -3, 0],
35+
translateX: [0, 2, 0],
36+
translateY: [0, -1.5, 0],
3737
},
3838
transition: {
3939
duration: 4,
@@ -43,10 +43,10 @@ const BUZZVIL_PRINCIPLE_ANIMATIONS = {
4343
},
4444
color2: {
4545
animate: {
46-
scale: [1, 0.95, 1],
46+
scale: [1, 0.98, 1],
4747
rotate: [0, -120, -240, -360],
48-
translateX: [0, -3, 0],
49-
translateY: [0, 4, 0],
48+
translateX: [0, -1.5, 0],
49+
translateY: [0, 2, 0],
5050
},
5151
transition: {
5252
duration: 4,
@@ -56,12 +56,12 @@ const BUZZVIL_PRINCIPLE_ANIMATIONS = {
5656
}
5757
},
5858
'playful': {
59-
// Animation 2: Bouncy, energetic movements - like play
59+
// Animation 2: Bouncy, energetic movements - like play (constrained to circle)
6060
color1: {
6161
animate: {
62-
scale: [1, 1.2, 0.9, 1.1, 1],
63-
translateX: [0, 6, -4, 3, 0],
64-
translateY: [0, -4, 6, -3, 0],
62+
scale: [1, 1.15, 0.95, 1.08, 1],
63+
translateX: [0, 4, -3, 2, 0],
64+
translateY: [0, -3, 4, -2, 0],
6565
},
6666
transition: {
6767
duration: 3,
@@ -71,9 +71,9 @@ const BUZZVIL_PRINCIPLE_ANIMATIONS = {
7171
},
7272
color2: {
7373
animate: {
74-
scale: [1, 0.8, 1.1, 0.9, 1],
75-
translateX: [0, -4, 3, -6, 0],
76-
translateY: [0, 3, -6, 4, 0],
74+
scale: [1, 0.85, 1.08, 0.95, 1],
75+
translateX: [0, -3, 2, -4, 0],
76+
translateY: [0, 2, -4, 3, 0],
7777
},
7878
transition: {
7979
duration: 3,
@@ -83,13 +83,13 @@ const BUZZVIL_PRINCIPLE_ANIMATIONS = {
8383
}
8484
},
8585
'scalable': {
86-
// Animation 3: Expanding, growing movements - like scaling up
86+
// Animation 3: Expanding, growing movements - like scaling up (constrained to circle)
8787
color1: {
8888
animate: {
89-
scale: [1, 1.3, 1],
89+
scale: [1, 1.2, 1],
9090
rotate: [0, 180, 360],
91-
translateX: [0, 8, 0],
92-
translateY: [0, -6, 0],
91+
translateX: [0, 5, 0],
92+
translateY: [0, -4, 0],
9393
},
9494
transition: {
9595
duration: 5,
@@ -99,10 +99,10 @@ const BUZZVIL_PRINCIPLE_ANIMATIONS = {
9999
},
100100
color2: {
101101
animate: {
102-
scale: [1, 0.7, 1],
102+
scale: [1, 0.8, 1],
103103
rotate: [0, -180, -360],
104-
translateX: [0, -6, 0],
105-
translateY: [0, 8, 0],
104+
translateX: [0, -4, 0],
105+
translateY: [0, 5, 0],
106106
},
107107
transition: {
108108
duration: 5,

0 commit comments

Comments
 (0)