lightning.module
README.md
lightning
Thunderstorms that every player sees the same: strikes come from a schedule computed from the shared session clock and the weather's seed, so the same strike lands at the same moment on every machine, late joiners included. Styles: close forked strike, flash inside the clouds, distant silent heat lightning, or a storm mixing forked and in-cloud strikes. A strike lights the whole scene, the rain and the clouds; its thunder arrives distance / 343 m/s later, louder and sharper the closer it struck.
Flash safety. At most one flash every 2.6 s; each flash is one soft pulse (90 ms rise, ~0.8 s
fall, no strobing return strokes) with capped brightness. setComfort(0..1) lowers flashes
further for one player (0 = none). onStrike(fn) tells other code about every strike.