Taos API Reference
    Preparing search index...

    Interface StarsFeatureOptions

    interface StarsFeatureOptions {
        sunDirection?: () => { x: number; y: number; z: number };
        lowerHemisphere?: number;
        skyExtinction?: number;
        blackLowerHemisphere?: boolean;
        catalog?: boolean | StarCatalogTextureOptions;
        useCatalog?: boolean;
        starOrientation?: { latitudeDeg?: number; siderealTime?: () => number };
        milkyWay?: boolean | { brightness?: number; width?: number };
        aurora?:
            | boolean
            | {
                brightness?: number;
                bandAltitudeDeg?: number;
                bandWidthDeg?: number;
                colorLow?: { x: number; y: number; z: number };
                colorHigh?: { x: number; y: number; z: number };
            };
    }
    Index

    Properties

    sunDirection?: () => { x: number; y: number; z: number }

    Unit vector pointing TOWARD the sun. The stars pass hides stars when the sun is above the horizon (sunDir.y > ~0), so for a space scene the default (0, -1, 0) forces perpetual night and the stars are always visible. For a ground/atmosphere scene, feed the real toward-sun vector (-light.direction) so stars fade in at dusk.

    lowerHemisphere?: number

    0 clamps stars to the upper hemisphere (ground scenes); 1 wraps them over the full sphere (out in space, looking in any direction). Default 1.

    skyExtinction?: number

    Attenuate stars by the luminance of the sky already behind them (handy in an atmosphere). 0 (default) adds them at full strength everywhere.

    blackLowerHemisphere?: boolean

    Fade sky pixels below the horizon to black. Default false.

    catalog?: boolean | StarCatalogTextureOptions

    Bake the real Yale Bright Star Catalog (BSC5, ~9k stars) into an equirect and render those instead of the procedural field. true bakes with defaults; pass options to tune resolution/brightness. The bake is async, so stars are procedural for a frame or two until it completes. Toggle live via catalogMode. Omit to keep the (cheaper, no-asset) procedural field.

    useCatalog?: boolean

    Start in catalog mode (vs procedural) once the bake is ready. Default true when catalog is set. Flip StarsFeature.catalogMode at runtime.

    starOrientation?: { latitudeDeg?: number; siderealTime?: () => number }

    Place the catalog sky geographically: observer latitudeDeg (+N) puts the north celestial pole at that altitude, and siderealTime (radians, animatable — advances ~2π per sidereal day) spins the sky about the pole. Omit for identity orientation (equatorial frame == world). Catalog mode only.

    milkyWay?: boolean | { brightness?: number; width?: number }

    Add a procedural Milky Way band, fixed in galactic coordinates (default-off). true enables it with default brightness/width; pass an object to tune. Shares the night/horizon fade with the rest of the starfield, so it only shows at night and respects the horizon. Toggle live via StarsFeature.pass's milkyWay.

    aurora?:
        | boolean
        | {
            brightness?: number;
            bandAltitudeDeg?: number;
            bandWidthDeg?: number;
            colorLow?: { x: number; y: number; z: number };
            colorHigh?: { x: number; y: number; z: number };
        }

    Add a procedural aurora borealis (default-off): rippling vertical curtains in an arc above the horizon with a green→magenta gradient, animated from frame.time. true enables it with defaults; pass an object to tune. Shares the night/horizon fade with the rest of the starfield, so it only glows at night and respects the horizon. Toggle live via StarsFeature.pass's aurora.

    Type Declaration

    • boolean
    • {
          brightness?: number;
          bandAltitudeDeg?: number;
          bandWidthDeg?: number;
          colorLow?: { x: number; y: number; z: number };
          colorHigh?: { x: number; y: number; z: number };
      }
      • Optionalbrightness?: number
      • OptionalbandAltitudeDeg?: number

        Altitude of the arc base, in degrees above the horizon. Default ~20°.

      • OptionalbandWidthDeg?: number

        Vertical softness of the arc base, in degrees. Default ~7°.

      • OptionalcolorLow?: { x: number; y: number; z: number }

        Base colour (linear RGB). Default oxygen green.

      • OptionalcolorHigh?: { x: number; y: number; z: number }

        Top colour (linear RGB). Default red/magenta.