@huukhanhnguyen/model / document/environment
document/environment
resolveEnvironment()
resolveEnvironment(
environment):ResolvedEnvironment|undefined
Resolve settings.environment for a consumer. Returns undefined when the document has no environment at all — a model lit only by its own emitting objects, which is a legitimate state and not a missing default.
The SUN is present only when BOTH its inputs are: with no site, or no moment, there is no sun to compute, and inventing one would be exactly the fabricated answer this design removed. A sun below the horizon is NOT absent — it comes back with direction[2] < 0, and the consumer decides what night means.
Parameters
environment
Environment | undefined
Returns
ResolvedEnvironment | undefined