Ratatoskr/scripts/ridge-bake/ridge-bake.schema.json
Meta Vens cd81f85d05
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m32s
Sky menu fixes: one owner of the drawn place, Night is tonight's, named moments roll
- skyPlace.ts is the only writer of the sky's place: the manifest's when the cards load, FALLBACK_VIEW's
  when the manifest or cards fail; the scene draws the view it told the store, so sky, weather, ink and
  Auto agree on every drawn state (Auto ticks on the fallback).
- useSkyPlace removed: only a scene start fetches the manifest.
- Old-key migration writes the new key first; a refused write keeps the pick for the page load.
- A named moment re-resolves when the place-local day rolls over (the one timer); Night is the nearest
  solar midnight (before the day's noon the one just passed or coming), keyed by the instant drawn.
- Baker validate/schema check place.tz as load_preset does; Vienna manifest baker_version 3 (it carries tz).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 00:07:01 +01:00

312 lines
5.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ridge-bake manifest v2 and index v1",
"$defs": {
"manifest": {
"type": "object",
"required": [
"schema",
"baker_version",
"bake_id",
"place",
"view",
"curvature",
"encoding",
"camera",
"cards",
"w",
"h",
"bytes",
"attribution"
],
"additionalProperties": false,
"properties": {
"schema": {
"const": 2
},
"baker_version": {
"type": "integer"
},
"bake_id": {
"type": "string"
},
"place": {
"type": "object",
"required": [
"id",
"name",
"lat",
"lon",
"altitude_km",
"eye_m",
"tz"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"lat": {
"type": "number"
},
"lon": {
"type": "number"
},
"altitude_km": {
"type": "number"
},
"eye_m": {
"type": "number"
},
"tz": {
"type": "string",
"format": "iana-tz"
}
}
},
"view": {
"type": "object",
"required": [
"look_az_deg",
"window_deg",
"plane_w",
"plane_h",
"px_per_deg_h",
"px_per_deg_v",
"exaggeration",
"horizon_row",
"sky_row",
"near_row"
],
"additionalProperties": false,
"properties": {
"look_az_deg": {
"type": "number"
},
"window_deg": {
"const": 72
},
"plane_w": {
"type": "integer",
"maximum": 4096
},
"plane_h": {
"type": "integer"
},
"px_per_deg_h": {
"type": "number"
},
"px_per_deg_v": {
"type": "number"
},
"exaggeration": {
"type": "number"
},
"horizon_row": {
"type": "number"
},
"sky_row": {
"type": "number"
},
"near_row": {
"type": "number"
}
}
},
"curvature": {
"type": "object",
"required": [
"r_earth_m",
"k_ref"
],
"additionalProperties": false,
"properties": {
"r_earth_m": {
"type": "number"
},
"k_ref": {
"type": "number"
}
}
},
"encoding": {
"type": "object",
"required": [
"log_d_min",
"log_d_max",
"normal"
],
"additionalProperties": false,
"properties": {
"log_d_min": {
"type": "number"
},
"log_d_max": {
"type": "number"
},
"normal": {
"const": "rt8"
}
}
},
"camera": {
"type": "object",
"required": [
"r_m",
"heading_max_deg"
],
"additionalProperties": false,
"properties": {
"r_m": {
"type": "number"
},
"heading_max_deg": {
"type": "number"
}
}
},
"cards": {
"type": "array",
"minItems": 1,
"maxItems": 6,
"items": {
"type": "object",
"required": [
"top",
"h",
"near_m",
"far_m",
"median_m",
"distance_m",
"scale",
"colour",
"geometry"
],
"additionalProperties": false,
"properties": {
"top": {
"type": "integer"
},
"h": {
"type": "integer"
},
"near_m": {
"type": [
"number",
"null"
]
},
"far_m": {
"type": [
"number",
"null"
]
},
"median_m": {
"type": "number"
},
"distance_m": {
"type": "number"
},
"scale": {
"type": "number"
},
"colour": {
"type": "object",
"required": [
"file",
"bytes"
],
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
},
"bytes": {
"type": "integer"
}
}
},
"geometry": {
"type": "object",
"required": [
"file",
"bytes"
],
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
},
"bytes": {
"type": "integer"
}
}
}
},
"description": "nearest first; the runtime paints the list last to first. top and h place the card back at its rows of the frame; near_m and far_m are the median seam depths, null at the ends; median_m and distance_m are the median distance of the card's solid pixels that are not wall; scale = distance_m / (distance_m - camera.r_m) is the card's pan rate per unit of heading and its static size."
}
},
"w": {
"type": "integer"
},
"h": {
"type": "integer"
},
"bytes": {
"type": "integer"
},
"attribution": {
"type": "object",
"required": [
"credit_line",
"licence",
"dem_source",
"url"
],
"additionalProperties": false,
"properties": {
"credit_line": {
"type": "string"
},
"licence": {
"type": "string"
},
"dem_source": {
"type": "string"
},
"url": {
"type": "string"
}
}
}
}
},
"index": {
"type": "object",
"required": [
"schema",
"default",
"places"
],
"additionalProperties": false,
"properties": {
"schema": {
"const": 1
},
"default": {
"type": "string"
},
"places": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}