Margrete RPC

rain

attribute__all__
= ['rain']
funcrain(*, t0, t1, step, x_range, h_range=(DEFAULT_H, DEFAULT_H), length=None, w=1, gap=DEFAULT_AIRCRUSH_GAP, color=ColorValue.DEFAULT, til=0, seed=None) -> list[AirCrush]

Scatter short :class:AirCrush traces across [t0, t1) like falling rain.

A drop starts every step ticks at a random lane within x_range and height within h_range (both inclusive). length is each drop's duration; defaults to step. Drops that would extend past t1 are truncated. Pass seed for a reproducible stream.

paramt0int | PositionLike

Start tick or position; the first drop begins here.

paramt1int | PositionLike

End tick or position; no drop starts at or after it.

paramstepint | DivisionLike

Spacing between drop starts (tick count or beat fraction).

paramx_rangetuple[int, int]

Inclusive (lo, hi) lane bounds for each drop.

paramh_rangetuple[int, int]
= (DEFAULT_H, DEFAULT_H)

Inclusive (lo, hi) height bounds; defaults to a constant :data:DEFAULT_H.

paramlengthint | DivisionLike | None
= None

Drop duration (tick count or beat fraction); defaults to step.

paramwint
= 1

Constant width of every drop.

paramgapint | DivisionLike
= DEFAULT_AIRCRUSH_GAP

Segment gap passed to each :class:AirCrush.

paramcolorColorLike | int
= ColorValue.DEFAULT

Crush color for every drop.

paramtilint
= 0

Timeline (TIL) index assigned to every drop.

paramseedint | None
= None

Seed for the random stream; None is non-deterministic.

Returns

list

The generated drops in time order.