Commit e836ae0
committed
feat: Add parameterization and color-morphing to wave animations
Enable full customization of the wave effect in bubbles animation with new
parameters and add a mesmerizing color-morphing gradient option.
New Parameters:
1. wave_speed (default: 2)
- Controls wave cycle duration in seconds
- Lower values = faster waves
- Range: 0.5 to 5 seconds recommended
2. wave_amplitude (default: 3)
- Controls vertical movement height in pixels
- Higher values = bigger waves
- Range: 1 to 10 pixels recommended
3. wave_delay (default: 0.05)
- Controls delay between each character in seconds
- Determines how fast wave travels horizontally
- Range: 0.01 to 0.2 seconds recommended
4. color_morph (default: false)
- Enables color morphing gradient effect
- Letters cycle through theme colors smoothly
- Animation cycle is 3x the wave_speed
Color Morphing Implementation:
- Animates through titleColor → iconColor → textColor → iconColor → titleColor
- Uses CSS fill animation for smooth transitions
- Combines with wave motion for dual-animation effect
- Automatically uses theme colors for perfect integration
Technical Details:
- Parameters passed through API → renderRepoCard → getAnimationStyle
- wrapTextInWave updated to conditionally add wave-char-morph class
- CSS keyframes dynamically generated with user parameters
- Proper type conversion (parseFloat) for numeric params in API
- Maintains backward compatibility with default values
Example Usage:
- Fast big waves: wave_speed=1&wave_amplitude=6&wave_delay=0.03
- Slow gentle: wave_speed=3&wave_amplitude=2&wave_delay=0.08
- Color morph: color_morph=true (combines with any wave params)
Documentation:
- Added Wave Customization Parameters section
- New usage examples showing different combinations
- Parameter reference with ranges and recommendations
- Examples of fast, slow, and color-morphing variations1 parent 63e9583 commit e836ae0
3 files changed
Lines changed: 103 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
88 | 102 | | |
89 | 103 | | |
90 | 104 | | |
| |||
148 | 162 | | |
149 | 163 | | |
150 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
151 | 180 | | |
152 | 181 | | |
153 | 182 | | |
| |||
202 | 231 | | |
203 | 232 | | |
204 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
205 | 256 | | |
206 | 257 | | |
207 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | | - | |
| 42 | + | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
| 55 | + | |
48 | 56 | | |
49 | 57 | | |
50 | | - | |
| 58 | + | |
51 | 59 | | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
| |||
191 | 204 | | |
192 | 205 | | |
193 | 206 | | |
194 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
195 | 215 | | |
196 | 216 | | |
197 | 217 | | |
| |||
208 | 228 | | |
209 | 229 | | |
210 | 230 | | |
211 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
212 | 236 | | |
213 | 237 | | |
214 | 238 | | |
| |||
499 | 523 | | |
500 | 524 | | |
501 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
502 | 530 | | |
503 | 531 | | |
504 | 532 | | |
| |||
687 | 715 | | |
688 | 716 | | |
689 | 717 | | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
690 | 724 | | |
691 | | - | |
| 725 | + | |
692 | 726 | | |
693 | 727 | | |
694 | 728 | | |
| |||
736 | 770 | | |
737 | 771 | | |
738 | 772 | | |
739 | | - | |
| 773 | + | |
740 | 774 | | |
741 | 775 | | |
742 | 776 | | |
| |||
0 commit comments