threejs-worldgen
    Preparing search index...

    Interface LightningConfig

    Construction options for Lightning.

    interface LightningConfig {
        branches?: number;
        branchLength?: number;
        camera: Camera;
        cloudHeight?: number;
        color?: string;
        detail?: number;
        duration?: number;
        flash?: Partial<{ color: string; intensity: number }>;
        ground?: ((x: number, z: number) => number) | null;
        intensity?: number;
        jaggedness?: number;
        maxBolts?: number;
        radius?: number;
        weather: Weather;
        width?: number;
    }

    Hierarchy (View Summary)

    Index
    branches?: number

    Side branches per bolt.

    branchLength?: number

    Branch length as a share of cloudHeight.

    camera: Camera

    Camera strikes are shown around.

    cloudHeight?: number

    Height of the cloud base above the strike point, metres.

    color?: string

    Bolt colour (#rrggbb).

    detail?: number

    Midpoint-displacement levels of the main channel (2^detail segments).

    duration?: number

    How long a strike stays visible (with its return strokes), seconds.

    flash?: Partial<{ color: string; intensity: number }>

    Flash settings to change.

    ground?: ((x: number, z: number) => number) | null

    Ground height (x, z) => y, frame coordinates. Default: the weather's world (or 0).

    intensity?: number

    Bolt brightness (unlit, additive; > 1 blooms).

    jaggedness?: number

    Sideways kinks as a share of segment length.

    maxBolts?: number

    Most bolts drawn at once.

    radius?: number

    Strikes within this distance of the camera are drawn, metres.

    weather: Weather

    Weather whose thunderstorms make the strikes.

    width?: number

    Main channel width, metres.