threejs-worldgen
    Preparing search index...

    Interface TerrainOptions

    Every terrain setting (plain data). Change at runtime with WorldTerrain.set.

    interface TerrainOptions {
        buildBudget: number;
        castShadow: boolean;
        jobsPerWorker: number;
        keepAlive: number;
        lodFactor: number;
        material: TerrainMaterialOptions;
        minChunkSize: number;
        origin: Vec3;
        receiveShadow: boolean;
        resolution: number;
        rootSize: number;
        skirt: number;
        viewDistance: number;
    }

    Hierarchy (View Summary)

    Index
    buildBudget: number

    Milliseconds per frame spent building chunks on the main thread (when there are no workers).

    castShadow: boolean

    Terrain casts shadows.

    jobsPerWorker: number

    Chunk jobs in flight per worker.

    keepAlive: number

    Frames an unused chunk stays cached before it is freed.

    lodFactor: number

    A chunk splits when the camera is closer than size × lodFactor (higher = more detail further out).

    Surface look (see TerrainMaterialOptions).

    minChunkSize: number

    Chunks never get smaller than this, metres (0.5 lets an ant walk on centimetre-scale ground).

    origin: Vec3

    Floating origin: the world position that sits at render-space (0, 0, 0). Keep it near the camera (see FloatingOrigin) so float32 GPU precision holds from orbit down to ant scale.

    receiveShadow: boolean

    Terrain receives shadows.

    resolution: number

    Vertices per chunk side (e.g. 33 = 32 × 32 quads).

    rootSize: number

    Edge length of a level-0 chunk on flat worlds, metres.

    skirt: number

    Skirt depth as a fraction of the chunk's edge length (hides cracks between LODs).

    viewDistance: number

    Flat worlds: terrain is drawn out to this distance from the camera, metres. Planets cull by the horizon.