weather
library
Functions
-
bayer(double x, double y)
→ double
-
Ordered-dither threshold of a local pixel (0..1):
a > bayer(x, y) draws it.
-
boxOf(EffectMeta meta)
→ CanvasBox
-
-
clip(Painter p, EffectMeta meta)
→ ClippedWeatherPainter
-
-
crown(Painter q, double x, double z, double age, double size, ({int cool, int hot, int white}) c, double h)
→ bool
-
A crisp splash on a floor line. Returns false once finished.
-
noiseField(int seed, [int w = 256, int h = 128, List<int> cells = const [4, 8, 16, 32]])
→ NoiseField
-
A baked fractal noise that tiles cleanly for seamless loops.
-
pass(Painter p, EffectMeta meta, double y0d, double y1d, void fn(double x, double y, PassOut out))
→ void
-
Per-pixel shader over canvas rows
y0..y1 (local, clipped to canvas).
-
rows(Painter p, EffectMeta meta, double y0d, double y1d, void fn(double y, RowBuffer r))
→ void
-
Fast whole-sky row shader over local rows
y0d..y1d.
-
sampleField(NoiseField f, double u, double v)
→ double
-
-
splash(Painter q, double x, double z, double age, double size, ({int cool, int hot}) c, double h)
→ void
-
Raindrop splash on the floor,
age seconds after landing at (x, z).
-
tree(Rng r, double x0, double y0, double x1, double y1, [double jag = 0.3, double forks = 0.4, double w = 1.0, int depth = 0])
→ List<BoltBranch>
-
Branching lightning path from
(x0, y0) to (x1, y1).
-
trips(double t, double d, int n, int seed, int m0, int m1, void fn(double u, int k, int m, int i))
→ void
-
-
wave(double t, double d, double c, [double ph = 0.0])
→ double
-