threejs-worldgen
    Preparing search index...

    Interface ChunkKey

    Address of one terrain patch in the LOD quadtree.

    • Flat worlds: face = -1; the patch covers [x, x+1] × [y, y+1] times rootSize / 2^level metres (x → +X, y → +Z).
    • Planets: face 0…5 is a cube face (+X, −X, +Y, −Y, +Z, −Z); the patch covers face coordinates −1 + [x, x+1] × 2/2^level (and the same for y), projected onto the sphere.
    interface ChunkKey {
        face: number;
        level: number;
        x: number;
        y: number;
    }
    Index
    face: number

    −1 on flat worlds, 0…5 cube face on planets.

    level: number

    Quadtree depth (0 = root).

    x: number

    Column at this level.

    y: number

    Row at this level.