OptionalsunOptionallower0 clamps stars to the upper hemisphere (ground scenes); 1 wraps them
over the full sphere (out in space, looking in any direction). Default 1.
OptionalskyAttenuate stars by the luminance of the sky already behind them (handy in
an atmosphere). 0 (default) adds them at full strength everywhere.
OptionalblackFade sky pixels below the horizon to black. Default false.
OptionalcatalogBake 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.
OptionaluseStart in catalog mode (vs procedural) once the bake is ready. Default true when catalog is set. Flip StarsFeature.catalogMode at runtime.
OptionalstarPlace 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.
OptionalmilkyAdd 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.
OptionalauroraAdd 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.
Optionalbrightness?: numberOptionalbandAltitudeDeg?: numberAltitude of the arc base, in degrees above the horizon. Default ~20°.
OptionalbandWidthDeg?: numberVertical 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.
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.