Skip to content
Shapemetry

Model - Environment

API reference for src/document/environment on @huukhanhnguyen/model, reachable from ..

See the Guide for the ModelJSON / evaluate pipeline.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

resolveEnvironment

function

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.

resolveEnvironment(environment: Environment | undefined): ResolvedEnvironment | undefined
Last updated: 📖 1 min readEdit on GitHub