threejs-worldgen
    Preparing search index...

    Interface FishPattern

    Colour pattern, drawn in the shader (no textures). Colours are #rrggbb.

    interface FishPattern {
        back: string;
        belly: string;
        countershade: number;
        eye: string;
        fin: string;
        iridescence: number;
        metalness: number;
        roughness: number;
        shadeLine: number;
        spots: {
            color: string;
            density: number;
            region: [number, number];
            size: number;
        };
        stripes: {
            color: string;
            count: number;
            direction: number;
            edge: number;
            region: [number, number];
            width: number;
            wobble: number;
        };
    }
    Index
    back: string

    Back colour.

    belly: string

    Belly colour.

    countershade: number

    0…1 countershading (dark back, light belly). 0 = all back.

    eye: string

    Iris colour.

    fin: string

    Fin colour.

    iridescence: number

    0…1 thin-film iridescence on the flanks.

    metalness: number

    0…1 silvery sheen.

    roughness: number

    Surface roughness.

    shadeLine: number

    Where back meets belly, −1 … 1.

    spots: {
        color: string;
        density: number;
        region: [number, number];
        size: number;
    }

    Spots.

    Type Declaration

    • color: string

      Spot colour.

    • density: number

      Spots per body length (0 = none).

    • region: [number, number]

      Height range where spots appear.

    • size: number

      Spot radius as a fraction of the spot spacing (≤ 0.25).

    stripes: {
        color: string;
        count: number;
        direction: number;
        edge: number;
        region: [number, number];
        width: number;
        wobble: number;
    }

    Stripes or bars.

    Type Declaration

    • color: string

      Stripe colour.

    • count: number

      Stripes per body length (0 = none).

    • direction: number

      0 = vertical bars, 1 = lengthwise lines.

    • edge: number

      0…1 dark outline around stripes (clownfish).

    • region: [number, number]

      Height range [−1…1, −1…1] (belly…back) where stripes appear.

    • width: number

      0…1 share of each period that is stripe.

    • wobble: number

      Waviness (mackerel).