GET /environment
Since 0.6
The sky as it resolved, for an agent that wants to know what it is looking at before it decides whether to change it.
Response
Response: EnvironmentView
GET /environment — the sky as it actually resolved.
| Field | Type | Present | Description |
|---|---|---|---|
kind | string | always | "procedural", "hdr" or "color". |
preset | string | sometimes | The preset name, for a procedural sky. |
asset | string | sometimes | The asset id behind an hdr sky that loaded. |
asset_path | string | sometimes | The file that asset resolved to, as the engine opened it. |
intensity | number | always | Scalar on the whole environment. |
rotation | number | always | Yaw applied to the sky, radians. |
sun_direction | number[3] | sometimes | Travel direction of the sun the sky casts (sun -> scene), when it has one. A color sky has none. |
sun_color | number[3] | sometimes | Linear RGB of that sun. |
sun_intensity | number | sometimes | Its scene-referred irradiance. 0 when the sun is below the horizon. |
sun_from_sky | boolean | always | Whether the scene's directional light is following that sun. |
ambient | number | sometimes | The flat fill added on top of the image-based diffuse, when the scene has no sky field and ambient therefore still means what it meant before this change. |
findings | string[] | sometimes | Why this is not what the scene asked for: a missing panorama, an undecodable file. Empty when the sky is exactly what was written. |
persisted | boolean | always | Always false: this endpoint reports the live sky, and a live sky is never on disk until someone edits the scene file. Present so a client does not have to infer it. |
Example
curl "http://127.0.0.1:7700/environment"
Start a server with argus run --serve; the port is --port (7700 by default). The request and response fields are in the query API guide.