threejs-worldgen
    Preparing search index...

    Interface ClockOptions

    Settings of a SkyClock. Plain JSON.

    interface ClockOptions {
        date: string | number;
        dayLength: number;
        maxStep: number;
        paused: boolean;
        timeScale: number;
    }
    Index
    date: string | number

    Starting instant, as an ISO 8601 string ('2026-06-21T18:00:00Z') or Unix milliseconds. The clock jumps here when created and whenever this value changes; otherwise it keeps running.

    dayLength: number

    Real seconds one solar day of the home planet should take (e.g. 600 for a 10-minute day/night cycle). Overrides timeScale when above 0.

    maxStep: number

    Longest real frame step the clock accepts, seconds. Stops a background tab from skipping hours.

    paused: boolean

    Freezes simulation time.

    timeScale: number

    Simulated seconds per real second. 1 = real time, 60 = a minute per second. Negative runs backwards.