Cool effect build review and files changed
That thread built a shimmering illumination effect for the "Welcome to Amp" splash screen text that makes the text glow in sync with the animated orb behind it.
Key files touched:
cli/src/widgets/orb-glow.ts- New sharedOrbGlowclass for noise sampling and color interpolationcli/src/widgets/illuminated-text.ts- New widget that renders text with per-character glow samplingcli/src/widgets/animated-orb.ts- Updated to accept externalglowandtpropscli/src/widgets/splash-screen.ts- Converted to StatefulWidget to share animation state between orb and text
How it works: The SplashScreen owns the animation time (t) and an OrbGlow instance. Both AnimatedOrb and IlluminatedText receive these, so each character samples the orb's glow at offset positions, creating a ripple/shimmer effect with distance-based falloff.
All tests pass. Here's a summary of the changes:
What I did:
animated-orb.ts - Exported
Shockwaveinterface and constants, addedshockwavesandonShockwaveprops so the parent can manage shockwaves externallyilluminated-text.ts - Added
shockwavesprop and shockwave sampling logic inpaint()that calculates each character's distance from the expanding wave front and boosts its glow accordinglysplash-screen.ts - Lifted shockwave state up, passes shockwaves to both
AnimatedOrbandIlluminatedText, handles cleanup in the animation loop
Now when you click on the orb, the ripples will propagate outward and wash over the "Welcome to Amp" text, making each character light up as the wave passes through it.
Changed the text's perceived X position from orbWidth + 2 to orbWidth * 0.7, so the wave "sees" the text as being closer to the orb's edge, making ripples arrive faster.