Skip to content

Thunderstorm animation#2993

Draft
huumn wants to merge 2 commits into
masterfrom
thunderstorm
Draft

Thunderstorm animation#2993
huumn wants to merge 2 commits into
masterfrom
thunderstorm

Conversation

@huumn

@huumn huumn commented May 23, 2026

Copy link
Copy Markdown
Member

This is a child of #2981. It adds

  • a thunderstorm animation for use on the wallet send screen
    • variable fog + probabilistic bolts + fade out after duration
  • exposes a strike mode for our zap bolt animation (without fog and flash) reusing the code
  • fixed animation speed coupling to screen refresh rate
  • makes both respect reduced-motion preferences and has the footer toggle follow
storm.mov

@huumn huumn changed the title Thunderstorm Thunderstorm animation May 23, 2026
huumn added 2 commits June 12, 2026 12:01
Replace the old Lightning bolt renderer with the Thunderstorm component,
which now supports both strike mode (single bolt for zaps) and full storm
mode (clouds, fog, multiple bolts for wallet send success).

- Add strike intensity that fires a single bolt without clouds/fog/flash
- Convert StormBolt to ES class with configurable presets (BOLT_STORM vs
  BOLT_STRIKE) matching original visual behavior of each
- Delta-time all animation: bolt growth, fade, flash, cloud drift, and
  strike chance are now frame-rate independent
- Use Path2D for bolt segments instead of replaying all draw calls
- Add ThunderstormProvider/useThunderstrike hook (replaces class-based
  LightningProvider)
- useAnimationEnabled defaults to off when prefers-reduced-motion is
  active; useAnimation respects the same default
- Reduced-motion users get immediate dismiss for all intensities
- Recursive isTreeDone check prevents grandchild bolts from vanishing
  mid-fade
- Stabilize onDone via ref to prevent spurious re-fires
- Delete components/animation/lightning.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant