threejs-worldgen
    Preparing search index...

    Interface ChunkData

    A built chunk: plain typed arrays, transferable from a worker. Positions are relative to center.

    interface ChunkData {
        biomeColors: Float32Array;
        center: Vec3;
        climate: Float32Array;
        colors: Float32Array;
        index: Uint32Array;
        key: ChunkKey;
        maxElevation: number;
        minElevation: number;
        normals: Float32Array;
        positions: Float32Array;
        radius: number;
        size: number;
        version: number;
    }
    Index
    biomeColors: Float32Array

    Biome debug-map colour (rgb, sRGB 0…1).

    center: Vec3

    Planet-centred (or flat-world) position of the chunk's centre, float64.

    climate: Float32Array

    Per-vertex inputs for the shader's ground overrides: height above sea level (m), temperature (°C), river strength (0…1) and slope (rise/run).

    colors: Float32Array

    Ground colour (rgb, sRGB 0…1).

    index: Uint32Array

    Triangle indices.

    Which chunk this is.

    maxElevation: number

    Highest elevation in the chunk, metres.

    minElevation: number

    Lowest elevation in the chunk, metres.

    normals: Float32Array

    Vertex normals (xyz).

    positions: Float32Array

    Vertex positions relative to center (xyz). Skirt vertices follow the grid.

    radius: number

    Radius of a bounding sphere around center, metres.

    size: number

    Edge length, metres (approximate on planets).

    version: number

    World version it was built from.