rainfall
Draws falling rain over this element's content, the way snowfall draws snow: streaks at different depths that lean with gusting wind, thicken and thin in showers, and splash where they land.
The rain is drawn after the content, so it sits on top of it, and it takes no input: taps go through to whatever is underneath. Apply it last in a chain to cover everything the element draws.
Only the draw phase runs per frame. Nothing recomposes or re-measures while rain falls, and the frame loop follows the composition's frame clock, so it stops while the window is in the background. Callers that honour the system's animation setting should pass enabled = false when it is off (see Context.isSystemAnimationDisabled).
Box(Modifier.fillMaxSize().rainfall(RainfallStyle(density = 0.5f, wind = 0.2f)))Parameters
Appearance and motion of the drops.
When false nothing is drawn and no frames are requested.