Skip to content
ParaShape

Settings

ModelJson.settings.

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Environment } from "./Environment.js";
import type { UnitConfig } from "./UnitConfig.js";

/**
 * Model-level settings — one document-config block. Permanent conventions
 * (Z-up, internal mm, display chord deflection as a `render()` argument,
 * never a setting) are not fields here.
 */
export type ModelSettings = { 
/**
 * intent — the length unit a host displays and types values in; absent =
 * mm. Evaluation always runs in mm regardless (`CallContext.unit` is fixed
 * `LengthUnit::Mm`); converting for display is the host's job.
 */
units?: UnitConfig, 
/**
 * intent — the sun, sky and HDRI; absent = the host's neutral default.
 */
environment?: Environment, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { LengthUnit } from "./LengthUnit.js";

/**
 * `length` is REQUIRED, no default: validate is not a normalizer.
 */
export type UnitConfig = { 
/**
 * intent — the display/input unit a surface shows length values in.
 */
length: LengthUnit, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * The display/input unit a surface shows length values in. The document's
 * numbers are ALWAYS millimetres; this names only the edge conversion.
 * DERIVED from `LENGTH_UNITS` (`document/vocabulary.rs`) — the same five
 * units, as a closed enum instead of a string list.
 */
export type LengthUnit = "mm" | "cm" | "m" | "in" | "ft";
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { EnvironmentHdri } from "./EnvironmentHdri.js";
import type { Site } from "./Site.js";
import type { SunMoment } from "./SunMoment.js";

/**
 * The light that has no place in space — the sun, sky and an HDRI. ONE per
 * document. The sun is DERIVED from `site` + `moment`, never authored.
 */
export type Environment = { 
/**
 * intent — where the model stands on Earth; required together with
 * `moment` for any sun at all — `graph::model::sun_of` returns no sun
 * (not even a default direction) when either is absent, so `sun_lux`/
 * `sun_kelvin` go unread without both.
 */
site?: Site, 
/**
 * intent — the moment the sun is computed for; paired with `site` —
 * see its own doc, both or neither.
 */
moment?: SunMoment, 
/**
 * intent — sun illuminance in lux, read only once `site`+`moment` give
 * a sun; absent = the fixed `DEFAULT_SUN_LUX` (10,000 lux, CIE/IES
 * clear-sky reference, `graph::model::sun_of`) — never derived from
 * `site`/`moment`.
 */
sunLux?: number, 
/**
 * intent — sun color temperature in kelvin, read only once `site`+
 * `moment` give a sun; absent = the resolver's default.
 */
sunKelvin?: number, 
/**
 * intent — the sky-fill color; absent = the resolver's default.
 */
skyColor?: string, 
/**
 * intent — the ground-fill color; absent = the resolver's default.
 */
groundColor?: string, 
/**
 * intent — sky illuminance in lux; absent = the resolver's default.
 */
skyLux?: number, 
/**
 * intent — image-based lighting; absent = the host's neutral built-in room.
 */
hdri?: EnvironmentHdri, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * Where the model stands on Earth.
 */
export type Site = { 
/**
 * geometry — degrees north of the equator (WGS84); negative is south.
 * Fails validate outside [-90, 90] (`validate::lanes::environment_errors`).
 */
latitude: number, 
/**
 * geometry — degrees east of Greenwich (WGS84); negative is west.
 * Fails validate outside [-180, 180].
 */
longitude: number, 
/**
 * intent — compass bearing of the model's +Y axis, degrees clockwise
 * from true north. Absent = 0 (+Y points true north).
 */
northAngle?: number, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * The moment the sun is computed for — a document FACT, never the wall
 * clock. `hour` is local solar time. A moment carries no year, so February
 * closes at 28 (`crate::document::vocabulary::days_in_month`).
 */
export type SunMoment = { 
/**
 * intent — 1-12; fails validate outside that range.
 */
month: number, 
/**
 * intent — 1-31; fails validate when it exceeds the given month's real
 * length (no year, so month 2 tops out at 28) — never clamped.
 */
day: number, 
/**
 * intent — local solar time; fails validate outside [0, 24].
 */
hour: number, };
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * Image-based lighting. Absent = the host's neutral built-in room. Exactly
 * one of `parameter`/`url` is set (checked post-deserialize,
 * `validate::lanes::environment_errors`) — H6: the old single `name` field
 * told the two apart by sniffing `https:`/`data:`, an implicit pairing.
 */
export type EnvironmentHdri = { 
/**
 * intent — the KEY of a `url`-method parameter (checked at validate).
 */
parameter?: string, 
/**
 * intent — a direct https:/data: address.
 */
url?: string, 
/**
 * intent — absent = the resolver's own default intensity.
 */
intensity?: number, };

settings is plain data, not a chain: no engine_catalog node carries "settings" in its context, so there is no catalog table to generate here.

📖 1 min read