Creates lightning; settings not given use DEFAULT_LIGHTNING.
Strikes visible on the last update.
Camera strikes are shown around.
Current flash brightness 0…1 (drive sky or cloud brightness with it).
Ground height (frame coordinates).
ReadonlylightThe flash light.
ReadonlyobjectAdd this to your scene (bolts and the flash light).
Resolved settings.
ReadonlyuniformsShader uniforms.
Per-bolt brightness.
Bolt colour × intensity.
Weather read for strikes.
Removes the bolts and light and frees GPU resources.
Calls listener once for each strike as time passes it. Returns an unsubscribe function.
Replaces all settings (anything not given goes back to defaults).
Sets the frame position at render-space zero (floating origin), [x, y, z].
Shows the strikes around the camera at time seconds and fires onStrike for new ones.
Lightning bolts and flashes from a Weather's thunderstorms. The strikes come from
weather.strikes, so they are deterministic in time; each bolt's shape (a jagged channel with branches) is seeded by its strike, flickers through a few return strokes and lights the scene with a flash. All visible bolts are one merged geometry and one draw call. Subscribe with Lightning.onStrike to ignite wildfires or play thunder.Example