@huukhanhnguyen/types / model/environment
model/environment
Environment
Environment = {
groundColor?:string;hdri?:EnvironmentHdri;moment?:SunMoment;site?:Site;skyColor?:string;skyLux?:number;sunKelvin?:number;sunLux?:number; }
settings.environment — the surroundings the model is lit by. Every field optional: a document with no environment is lit by its own emitting objects and nothing else.
groundColor?
optionalgroundColor?:string
Colour bounced from below (−Z) — the ground half. Equal to skyColor gives the flat uniform fill a renderer calls "ambient".
hdri?
optionalhdri?:EnvironmentHdri
moment?
optionalmoment?:SunMoment
Which moment — the sun's second input. Without both, there is no sun.
site?
optionalsite?:Site
Where on Earth — the sun's first input.
skyColor?
optionalskyColor?:string
Colour arriving from above (+Z) — the sky half of the outdoor bounce.
skyLux?
optionalskyLux?:number
Illuminance (lux) of that sky/ground fill.
sunKelvin?
optionalsunKelvin?:number
Sun colour temperature (K).
sunLux?
optionalsunLux?:number
Direct-sun illuminance (lux) at the model. Absent = a bright clear midday (the host's documented default).
EnvironmentHdri
EnvironmentHdri = {
intensity?:number;name?:string; }
Image-based lighting. name is a url-method parameter key (an attached HDRI bitmap is an ordinary parameter whose value is its URL) OR a direct https:/data: URI; absent = the host's neutral built-in room, so PBR materials are not pitch black before an HDRI is authored.
intensity?
optionalintensity?:number
name?
optionalname?:string
Site
Site = {
latitude:number;longitude:number;northAngle?:number; }
Where the model stands on Earth. northAngle rotates project north away from +Y, in degrees counter-clockwise looking down. Revit's project location / SketchUp's geo-locate.
latitude
latitude:
number
longitude
longitude:
number
northAngle?
optionalnorthAngle?:number
SunMoment
SunMoment = {
day:number;hour:number;month:number; }
The moment the sun is computed for — a document FACT (which day and hour this shadow study is about), not a clock reading: nothing here ever consults the wall clock, so the same document always produces the same shadows.
hour is LOCAL SOLAR time (12 = the sun crossing the site's meridian): shadow studies are authored against solar noon, so longitude/time-zone conversion is deliberately out of scope.
day
day:
number
hour
hour:
number
month
month:
number