Commit 4fb9737
Abdul Bari
Add scroll-based morphing: Sphere crystallizes as you explore
INTERACTION UPGRADE:
- Sphere gradually morphs into diamond as you scroll toward research cards
- Starts morphing 300px before cards come into view
- Instant full morph when hovering over any research card
- Returns to scroll-based state when leaving cards
Technical implementation:
- Scroll event listener calculates proximity to .research-grid
- Progress mapped linearly from 300px trigger distance
- Card hover detection via .research-card querySelector
- Initial scroll check on page load for correct state
Creates natural connection between visual element and content.
User feedback: 'it can turn into a diamond when you hover over the cards!'1 parent 9b0e8a8 commit 4fb9737
1 file changed
Lines changed: 48 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
269 | 272 | | |
270 | 273 | | |
271 | 274 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | 275 | | |
279 | 276 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
285 | 282 | | |
286 | 283 | | |
287 | 284 | | |
| |||
315 | 312 | | |
316 | 313 | | |
317 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
318 | 355 | | |
319 | 356 | | |
320 | 357 | | |
| |||
0 commit comments