Skip to content
Shapemetry

@huukhanhnguyen/types / evaluate/environment

evaluate/environment

ResolvedEnvironment

ResolvedEnvironment = { groundColor?: string; hdri?: EnvironmentHdri; skyColor?: string; skyLux?: number; sun?: Sun; }

groundColor?

optional groundColor?: string

hdri?

optional hdri?: EnvironmentHdri

skyColor?

optional skyColor?: string

skyLux?

optional skyLux?: number

sun?

optional sun?: Sun


Sun

Sun = { direction: Vector; kelvin?: number; lux: number; }

The sun as a lit direction — COMPUTED from Environment.site + moment, never stored. Absent from a ResolvedEnvironment whenever either input is missing; present with direction[2] < 0 when the site's sun is below the horizon at that moment, which is a night study, not an error.

direction

direction: Vector

Unit vector TOWARD the sun, Z-up world space.

kelvin?

optional kelvin?: number

Colour temperature (K).

lux

lux: number

Direct illuminance (lux) at the model.

Last updated: 📖 1 min readEdit on GitHub