# AIM3DViewer Manifest Schema

This document describes the canonical custom manifest block used by the viewer:

The machine-readable schema lives in [AIM3DViewer-schema.json](./AIM3DViewer-schema.json).

```json
{
  "AIM3DViewer": {
    "version": "1.3",
    "generatedAt": "2026-08-11T12:00:00.000Z",
    "camera": {},
    "viewer": {},
    "integration": {},
    "lights": [],
    "rakingLight": {},
    "timeline": {},
    "thumbnails": [],
    "modelTransform": {}
  }
}
```

The runtime currently reads and writes the following fields.

## `AIM3DViewer.version`

The version of the manifest format, `"MAJOR.MINOR"` (now `"1.3"`:
`AIM3D_MANIFEST_VERSION` in [manifest-version.js](./manifest-version.js)).
A manifest is written with the version of the viewer that writes it (the
viewer's export, the Blender add-on, `scripts/build-showcase-examples.mjs`).

- **MINOR** grows with additions an older viewer can do without (a new block,
  a new key, a new value of a key). An older viewer still opens such a
  manifest, without what it does not know, and says that a newer viewer shows
  all of it. If it finds values it cannot read, it does not open the manifest
  and asks for an update, rather than calling the manifest invalid.
- **MAJOR** grows when an older viewer would read the manifest wrongly. An
  older viewer does not open it and asks for an update.
- No version (or one that is not `MAJOR.MINOR`): read as one of the viewer's
  own version.

A manifest made for a newer viewer gets an up arrow (⬆) in the list of example
manifests: amber when the viewer opens it without some of it, red when it does
not open it. Opening such a manifest shows a dialog that offers the update:
reloading the page, or, in an app build, the app's store page.

| Version | Added |
| --- | --- |
| 1.0 | The format as first published |
| 1.1 | `camera.aspect`, `camera.orientation`, `measurements` |
| 1.2 | `sounds` (with `sounds.acoustics`), `image`, `audio`; an annotation's `AIM3DViewer.audio` (narration); a scene showing a `Sound` or an `Image` |
| 1.3 | `data` (live data: a table that drives the model) |

## `AIM3DViewer.camera`

Stores the camera pose and projection state.

```json
{
  "position": [0, 2, 5],
  "target": [0, 0, 0],
  "up": [0, 1, 0],
  "fov": 45,
  "zoom": 1,
  "distance": 5.385,
  "perspectiveMode": "perspective",
  "aspect": 1.78,
  "orientation": "landscape"
}
```

- `position`: camera position as `[x, y, z]`
- `target`: orbit target as `[x, y, z]`
- `up`: camera up vector as `[x, y, z]`
- `fov`: used for perspective camera
- `zoom`: used for orthographic camera
- `distance`: informational only
- `perspectiveMode`: `perspective` or `orthographic`
- `aspect`: width / height of the view (the viewer's canvas) the camera was
  set on; `orientation`: `landscape` or `portrait`, the same view's (enough
  without `aspect`: 16/9 or 9/16). Both are written on export.
- With either of them, what the camera showed there is meant, a model cut
  off at the edge included. Only on a narrower view (a phone held upright
  showing a desktop's camera) does a perspective camera outside the model
  go back along its line of sight, until the model takes no more of the
  width than it did there (or 70% of it, whichever is more).
- With neither, nobody knows what the camera showed: a perspective camera
  outside the model goes back until all of the model is in view (70% of
  the view from its middle, across and up), never closer than it was set.
- Either way it keeps looking at `target`, and a camera inside the model
  (an interior) stays where it is.

## `AIM3DViewer.viewer`

Stores runtime viewer options.

```json
{
  "container": "DFG_3DViewer",
  "mailUrl": "https://example.org",
  "baseNamespace": "https://example.org",
  "metadataUrl": "https://example.org",
  "theme": "dark",
  "language": "en",
  "backgroundColor": "#000000",
  "environmentMap": {
    "intensity": 0.5,
    "preset": "neutral",
    "enabled": true
  },
  "rendering": {
    "toneMapping": "neutral",
    "exposure": 1,
    "postprocessing": {
      "enabled": false,
      "antialias": "msaa",
      "ao": false,
      "aoIntensity": 1
    }
  },
  "tour": {
    "autostart": false,
    "autoplay": false,
    "stepDuration": 6,
    "transitionDuration": 1.5,
    "loop": true
  },
  "presentationMode": false,
  "sandbox": false,
  "autorotate": false,
  "autorotateSpeed": 1.5,
  "disableInteraction": false,
  "hideUi": false,
  "hideMetadata": false,
  "showNotifications": true,
  "scale": { "x": 1, "y": 1 },
  "window": {
    "position": { "x": 120, "y": 80 },
    "size": { "width": 900, "height": 600 }
  },
  "performance": "high-performance",
  "units": 1,
  "gallery": {},
  "editorToolbar": {
    "enabled": true,
    "position": { "x": 0, "y": 0 },
    "expanded": false,
    "visible": true,
    "profile": { "promote": ["hierarchy", "clippingPlanes"], "hide": ["weather"] }
  },
  "menuToolbar": {
    "enabled": true,
    "position": { "x": 0, "y": 0 }
  },
  "clipping": {
    "mode": {
      "x": false,
      "y": false,
      "z": false
    },
    "negated": { "x": false, "y": false, "z": false },
    "constants": [1, 1, 1],
    "outlineVisible": false
  }
}
```

Notes:

- `theme`: `dark` or `light`
- `language`: currently `en`, `pl`, or `de`
- `autorotate` and `autorotateSpeed` map to OrbitControls state
- `disableInteraction` disables rotate, pan, and zoom input
- `hideUi` hides the action menu and editor toolbar
- `hideMetadata` hides the metadata panel
- `rendering` controls how the canvas image is produced (all fields optional; `viewer-settings.json` `viewer.rendering` is the fallback, then the defaults shown above):
  - `toneMapping`: `none`, `linear`, `reinhard`, `cineon`, `aces`, `agx` or `neutral` (default, Khronos PBR Neutral - closest to the material colours)
  - `exposure`: tone mapping exposure, a number `>= 0` (default `1`)
  - `postprocessing.enabled`: renders through a post-processing chain (default `false`); tone mapping looks the same either way
  - `postprocessing.antialias`: anti-aliasing used by that chain - `msaa` (4x multisampling, default), `smaa`, `fxaa` (cheapest) or `none`
  - `postprocessing.ao`: ambient occlusion (GTAO) - darkens crevices and corners so relief reads better (default `false`). It runs the post-processing chain by itself, even with `postprocessing.enabled` off, and costs an extra pass over the model every frame
  - `postprocessing.aoIntensity`: strength of the ambient occlusion, `0` to `2` (default `1`)
- `showNotifications` controls toast/status notices
- `tour`: guided tour through the manifest's annotations, same keys as `viewer-settings.json` `viewer.tour` (each optional, the settings file stays the fallback):
  - `autostart`: start the tour once the model and annotations have loaded (default `false`); a manifest that sets `tour` may autostart it again even if an earlier manifest already did
  - `autoplay`: advance the steps automatically (default `false`)
  - `stepDuration`: seconds on each step while autoplaying, `> 0` (default `6`)
  - `transitionDuration`: camera flight time in seconds, `>= 0` (default `1.5`)
  - `loop`: wrap around after the last step while autoplaying (default `true`)
  - The steps are the annotations in marker order; each one's `AIM3DViewer.view` (`{ position, target, fov }`) is the camera pose shown for it.
- `window` stores the movable viewer host geometry in viewport pixels
- `editorToolbar` is the canonical editor toolbar runtime state used by the current viewer
- `viewer.clipping` is the canonical location for clipping state
  - `mode`: which axes cut; `constants`: each plane's constant in world units (for a flipped plane, minus the cut's position); `negated`: the planes flipped to keep the side above the cut instead of below; `outlineVisible`: the cut faces filled

### Deployment settings (formerly only in `viewer-settings.json`)

These optional `viewer` fields carry values that used to live only in `viewer-settings.json`:

- `mainUrl`: site base URL (`mailUrl` is the older name and is still written for compatibility)
- `baseModulePath`: base path of the viewer module assets
- `background`: CSS `background` value for the canvas (e.g. a `radial-gradient(...)`); `backgroundColor` remains the scene colour
- `credits`: credits footer definition (`visible`, `logo`, `items`), same shape as in `viewer-settings.json`
- `auth`: `{ "enabled": boolean, "allowRegistration": boolean }` - login UI in the upload panel. **This only controls the UI**: whether accounts are required is enforced by the conversion worker (`WORKER_AUTH_MODE`, see `worker/README.md`), because a manifest is client-side data. Unset = follow the worker's `/api/auth/config`; `enabled: false` never shows the login UI; `allowRegistration: false` hides the Register button
- `manifestoForm` / `metadataContainer`: panel geometry as `{ "position": { x, y }, "size": { width, height } }` (`size` values may be `null`)

`scale`, `performance`, `units`, `gallery`, `editorToolbar` and `menuToolbar` were already part of this block and map to the matching `viewer-settings.json` entries.

### Precedence

`viewer-settings.json` is still loaded first and acts as the fallback. When an AIM3D manifest is loaded, every value it defines overrides the loaded configuration; anything it omits keeps the `viewer-settings.json` value. Manifests written before these fields existed therefore keep working unchanged.

`entity.metadata.*` (manifest source and URL) is needed to find the manifest, so it always stays in `viewer-settings.json`.

`viewer.lightweight`, `viewer.editor`, `viewer.sandbox` and `viewer.presentationMode` (booleans) decide how the UI is built, so at startup the viewer peeks at the AIM3D manifest configured in `entity.metadata.url` (whenever `entity.metadata.sourceType` is `AIM3IF`, even in builds that force another model source) and applies them, together with the deployment settings above, before building the UI. If the manifest cannot be fetched or parsed, or omits them, the `viewer-settings.json` values are used. They only apply to the manifest configured as the metadata source, not to manifests loaded later from the manifest form. The viewer never writes `lightweight` or `editor` on export, so a shared manifest cannot enable the editor elsewhere by accident; add them by hand where needed.

`window` fields:

- `position`: top-left viewer offset as `{ x, y }` pixels
- `size`: viewer host dimensions as `{ width, height }` pixels
- The importer clamps the geometry to the current browser viewport; when `window` is absent, the default host layout is preserved.

`editorToolbar` fields:

- `enabled`: whether the toolbar feature is enabled by config
- `position`: current dragged toolbar offset relative to the host container
- `expanded`: whether the secondary tray is expanded
- `visible`: whether the toolbar is currently visible in the UI
- `profile` (optional): the tools for the kind of model shown. The viewer tells the kind (`mesh`, `bim`, `pointcloud`, `splats`, `volume`) from the file and the scene and brings that kind's tools to the top - onto the bar of the classic toolbar, as shortcuts into the navigation of the menus - and leaves out those the kind has no use for. `false` (or `{ "enabled": false }`) keeps the toolbar as it is; `promote` replaces the tools brought to the top (tool names, in order of importance: phones show the first two); `hide` replaces the tools left out. Either list may be given alone; the other keeps the kind's default.

## `AIM3DViewer.integration`

Stores CMS and runtime integration details such as Drupal field names and metadata source settings.

Besides the Drupal field names (`bundle`, `fieldDf`, `exportViewer`, `idUri`, `viewEntityPath`, `attributeId`, `fileUpload`, `fileName`, `imageGeneration`, `metadata`), it may contain:

- `exportViewerUrl`: maps to `entity.exportViewerUrl`
- `api.thumbnailUploadEndpoint`: maps to `api.thumbnailUploadEndpoint`

## `AIM3DViewer.lights`

Stores scene light configuration.

Each light may contain:

```json
{
  "type": "DirectionalLight",
  "position": [0, 100, 50],
  "target": [0, 0, 0],
  "color": "#ffffff",
  "intensity": 1
}
```

`type` is `AmbientLight`, `DirectionalLight`, `HemisphereLight`, `PointLight` or `SpotLight`. The first directional light is the viewer's key light, the second its camera light, the first ambient and hemisphere lights the viewer's own; further lights are added to the scene. Lights added in the editor (Lights > Scene lights, or the Lights folder) are exported as further lights. Optional fields:

- `name`: the light's name in the editor's list of lights
- `visible`: `false` for a light that is switched off (default `true`)
- `castShadow`: whether a directional, point or spot light casts shadows (left out: the viewer's default, on for the key light)
- `groundColor`: ground colour of a `HemisphereLight`
- `distance`, `decay`: range and falloff of a `PointLight` or `SpotLight`
- `angle`, `penumbra`: cone half-angle (radians) and edge softness (0-1) of a `SpotLight`

## `AIM3DViewer.modelTransform`

Stores model transform and rendering flags.

```json
{
  "position": [0, 0, 0],
  "rotation": {
    "x": 0,
    "y": 0,
    "z": 0,
    "order": "XYZ"
  },
  "scale": [1, 1, 1],
  "upAxis": "Z+",
  "wireframe": false,
  "shadingMode": "clay"
}
```

`upAxis` (optional) names the axis of the model file that points up, for
models that do not come in Y-up (three.js and glTF are Y-up). The viewer
turns that axis to +Y when the model is loaded, before placing it on the grid
and before `position`, `rotation` and `scale`, which are those of the upright
model. Left out, the model is used as loaded (`Y+`).

| Value | Model |
|---|---|
| `Y+` | Y-up (the default; not written on export) |
| `Y-` | upside down |
| `Z+` | Z-up: CAD, scans and photogrammetry exports (STL, PLY, OBJ, ...) |
| `Z-` | Z-up, flipped |
| `X+`, `X-` | X-up |

The fix is applied under the model root (an inner pivot node, or the geometry
of a single mesh), so `rotation` stays the rotation set in the editor.
Streamed models (3D Tiles, Potree) are oriented by their loader and do not
take `upAxis`; LAS/LAZ point clouds and Gaussian splats are already turned to
Y-up when loaded, so `upAxis` turns them further. The same setting comes from
the `upAxis` URL parameter (`?upAxis=Z` or `?upAxis=-Y`; a `+` in a URL reads as a space, which is fine, as a bare axis means its + side; the URL wins over the manifest), the
`upAxis` of a model's entry in `viewer-settings.json` / `objectsConfig.models`,
and the model's saved `_viewer.json` metadata.

`shadingMode` (optional) sets how the model's surfaces are drawn; left out,
the model keeps the materials it was loaded with:

| Value | Look |
|---|---|
| `original` | the materials as loaded (the default; not written on export) |
| `standard` | converted to PBR (`MeshStandardMaterial`). Manifests written before `original` existed carry `standard` as their default, so it is read as `original` |
| `phong`, `lambert` | the classic lighting models, textures kept |
| `toon` | cel shading |
| `flat` | the model's own materials with faceted normals: shows the triangles of a scan |
| `clay` | untextured matte clay: the geometry alone, without the photo texture |
| `matcap` | studio clay sphere (matcap), independent of the scene's lights |
| `normals` | surface normals as colours, for checking a mesh |
| `custom` | the GLSL of `customShader` (`vertexShader`, `fragmentShader`); the `clipping_planes` chunks and `USE_COLOR` / `color` let it follow the section planes and vertex colours |

## `AIM3DViewer.rakingLight`

A low light grazing the surface the camera looks at, with the other lights and
the environment dimmed, so shallow relief (inscriptions, tool marks, worn
ornament) casts readable shading. Written only while it is on; a manifest
without it leaves the raking light off.

```json
{
  "enabled": true,
  "direction": 135,
  "height": 12,
  "sweep": false
}
```

It is placed relative to the view, as in RTI viewers, so it keeps grazing the
surface while the camera moves:

- `direction`: where on the screen the light comes from, in degrees (`0` right, `90` top, `180` left, `270` bottom; default `135`)
- `height`: its angle above the surface facing the camera, `1` to `89` degrees; low values graze (default `12`)
- `sweep`: turns the light round the view continuously (default `false`)

## `AIM3DViewer.timeline`

The fourth dimension: the model's states in time. Each stage is a point on
the time axis (a year) with the model nodes that show the object at that
point. Any year can be chosen on the axis; the viewer fades the stages
around it into each other, so jumps and playback run smoothly.

```json
{
  "enabled": true,
  "year": 1730,
  "startYear": 1730,
  "endYear": 1936,
  "label": { "en": ["Weathering 1730-1936"], "pl": ["Starzenie 1730-1936"] },
  "description": { "en": ["Three events are documented; the stages between them are modelled."] },
  "transition": "interpolate",
  "transitionDuration": 0.8,
  "playback": { "autoplay": false, "loop": false, "yearsPerSecond": 10, "pauseAtEvents": 1.5 },
  "stages": [
    {
      "year": 1730,
      "approximate": true,
      "type": "documented",
      "label": { "en": ["Construction"], "pl": ["Budowa"] },
      "description": { "en": ["Fresh, light timber and shingles."] },
      "source": { "en": ["first half of the 18th century"] },
      "nodes": ["Stage_1730"]
    },
    { "year": 1735, "type": "modelled", "label": { "en": ["The timber darkens"] }, "nodes": ["Stage_1735"] }
  ]
}
```

- `enabled`: `false` turns off a timeline the model carries itself (default `true`)
- `year`: year shown when the manifest opens (default `startYear`); exported as the year shown
- `startYear`, `endYear`: ends of the axis (default: the first and last stage)
- `label`, `description`: panel title and the text behind its *i* button (language maps or strings)
- `transition`:
  - `interpolate` (default): a year between two stages blends them in proportion, e.g. 1795 shows 1790 and 1810 half and half. Suits gradual change (weathering, growth)
  - `step`: the last stage reached is shown as it is; changing stage fades over `transitionDuration`. Suits building phases
- `transitionDuration`: seconds a jump to another year (or a `step` fade) takes, `>= 0` (default `0.8`)
- `playback.autoplay`: start playing on open (default `false`)
- `playback.loop`: start over after the end (default `true`)
- `playback.yearsPerSecond`: playback speed (default: the whole axis in 24 seconds)
- `playback.speed`: multiple of `yearsPerSecond`, set in the panel (0.25× to 3×) and exported with the manifest (default `0.5`)
- `playback.pauseAtEvents`: seconds held on each `documented` stage while playing (default `1.5`)
- `showPanel`: `false` hides the panel; the model stays at `year` (a fixed point in time, e.g. for an embed)
- `stages[]`:
  - `year` (required): the point on the axis; fractional and negative years (BCE) are allowed
  - `type`: `documented` (an event from the sources - a diamond on the axis, held while playing) or `modelled` (a state reconstructed between them - a circle)
  - `approximate`: the date is approximate (shown as *c. 1730*); `yearLabel` replaces the year text altogether (e.g. `"1st half of the 18th c."`)
  - `label`, `description`, `source`: shown in the panel's card while the stage is the last one reached
  - `nodes`: names of the model nodes that show the stage. Nodes of the timeline's stages are shown only around their year; everything else in the model stays as it is. Left out, the nodes of the model's own stage of the same year are used. A stage without nodes is only a point on the axis (an event without its own state)

When the manifest lists `stages`, they replace the model's list. Without
`stages` the manifest only sets the playback and texts for the stages the
model carries.

### Timeline in the model (glTF)

A glTF/GLB model can carry its timeline itself, so it also works opened
without a manifest:

- `scenes[n].extras.timeline` with the same fields as above (`stages[].node` may name a single node), or
- `nodes[n].extras.year` (plus optional `label`, `description`, `type`) on each stage node; at least two such nodes make a timeline

Stage nodes hidden by a zero scale (a common way to switch glTF parts) are
shown at their normal scale, and an animation clip that only switches the
stage nodes is left out of the animation player: the timeline drives them.
Labels written as `"ok. 1730 – …"` / `"c. 1730 – …"` lose the year prefix
and mark the stage `approximate`.

Fading draws the earlier stage as it is and the later one over it,
transparent. Stages that share the geometry (the same building with other
textures or vertex colours) blend cleanly; stages with different geometry
cross over, the earlier one leaving at the end of the fade.

## `AIM3DViewer.variants`

Reconstruction variants: alternative hypotheses of the same object (two
roofs, three versions of a lost tower), each a set of model nodes. One
variant is shown at a time, chosen in the variants panel; nodes that belong
to no variant are always shown.

```json
{
  "label": { "en": ["Roof and fourth column: two hypotheses"] },
  "active": "roofed",
  "items": [
    {
      "id": "roofed",
      "label": { "en": ["A: roofed temple"] },
      "description": { "en": ["Gabled roof with a skylight; the fourth column stood complete."] },
      "source": { "en": ["Analogy with temples of the same period"] },
      "certainty": 4,
      "nodes": ["Roof_Hypothesis", "Column_4_Reconstructed"]
    },
    { "id": "open", "label": { "en": ["B: open monopteros"] }, "certainty": 8, "nodes": ["Column_4_Stump", "Fallen_Drum"] }
  ]
}
```

- `enabled`: `false` turns off variants the model carries itself (default `true`)
- `active`: id of the variant shown (default the first); exported as the one shown
- `label`, `description`: panel title and the text under it
- `showPanel`: `false` hides the panel; `active` stays shown
- `items[]` (at least two):
  - `id` (required, unique): used by `active`, `AIM3DViewer.compare` and the `variant` URL parameter
  - `label`, `description`, `source`: shown in the panel
  - `certainty`: a value on the Level of Certainty scale (`AIM3DViewer.certainty`, else the default one), shown as the level's code and symbol in its colour
  - `nodes`: names of the model nodes of the variant. Left out, the nodes of the model's variant with the same id are used

Keep the variants' nodes apart from the timeline's stage nodes: the timeline
shows and hides its own nodes by year, the variants theirs by choice.

### Variants in the model (glTF)

- `scenes[n].extras.variants`: the same object as above, or just its `items` array, or
- `nodes[n].extras.variant`: the variant id on each node of it (optional `variantLabel`, `variantDescription`); at least two ids make a set of variants

## `AIM3DViewer.compare`

The comparison view, open when the manifest loads. The scene is drawn twice
per frame, once for each side: a variant, or a year of the timeline (the last
stage reached in that year).

```json
{ "mode": "swipe", "position": 0.5, "left": { "variant": "roofed" }, "right": { "variant": "open" } }
```

- `mode`: `swipe` (default) - one view split by a divider dragged across the canvas (arrow keys move it once it has focus); `split` - the two sides side by side, the camera shared
- `position`: where the divider stands in `swipe` mode, `0` to `1` across the canvas (default `0.5`)
- `left`, `right`: `{ "variant": "<id>" }` or `{ "year": 1730 }`. Left out: the variant shown and the next one, or the first and last stage of the timeline
- `enabled`: `false` keeps the comparison closed

The comparison is exported while it is open. The URL parameters `compare`
(`swipe` or `split`), `compareLeft`, `compareRight` (a variant id or a year)
and `variant` (the variant shown) override the manifest.

## `AIM3DViewer.location` and `AIM3DViewer.sun`

The sun where it stood at the model's place on a day and hour, casting
shadows on the model and the ground (*Lights > Sun and shadows*). With a 4D
timeline the year is the timeline's, so a building is lit as in its own time.

```json
"location": { "latitude": 41.8894, "longitude": 12.4702, "north": 30, "utcOffset": 1 },
"sun": { "enabled": true, "date": "06-21", "time": "17:30" }
```

- `location.latitude`, `location.longitude` (required): degrees, north and east positive
- `location.north`: where north lies in the scene - degrees clockwise from -Z, seen from above (default `0`: north is -Z, east +X). The model's up is +Y
- `location.utcOffset`: hours the local time is ahead of UTC (default: the longitude / 15, rounded - local mean time)
- `sun.date`: `"MM-DD"`, or `"YYYY-MM-DD"`; `sun.time`: local `"HH:MM"` (default: the day and time now, at the model's place)
- `sun.followTimeline`: take the year from the timeline (default `true`); without a timeline the date's year is used
- `sun.animate`: play the day on open (default `false`)

The panel sets the time of day (or plays the day), the day, the place and
north, and shows the sun's azimuth and elevation, sunrise and sunset. The
solar position is good to a fraction of a degree; dates before 1582 are
taken as proleptic Gregorian. While the sun is on, the other lights and the
environment are dimmed to a sky light (the raking light is switched off).
`location` is exported once a place is set; `sun` while it is on.

## `AIM3DViewer.weather`

The weather around the model (*Look > Weather*): a clear sky, fog, rain,
snow or a thunderstorm, with wind; the rain and the snow stop on the
model's roofs (no rain under them), the rain splashes and bounces there, the
model gets wet and snow settles on what faces up; fog lies in clumps of
mist. At full intensity rain is a downpour. Exported while it is on.

```json
"weather": { "type": "snow", "intensity": 0.6, "wind": 0.2, "windDirection": 230 }
```

- `type` (required): `"clear"`, `"fog"`, `"rain"`, `"snow"` or `"storm"`
- `intensity`: 0 to 1 (default `0.6`)
- `wind`: 0 to 1 (default `0.2`); a storm brings at least some
- `windDirection`: where the wind blows to - degrees clockwise from -Z, seen from above, as `location.north` (default `230`)
- `mistHeight`, `mistDensity`: the mist's height (0 to 1: 0.15 to 1.15 model sizes, default `0.4`) and density (default `0.5`)
- `mistSpread`: 0 lays the mist in clumps with gaps (low clouds), 1 as an even blanket thinning upwards (default `0.6`)
- `season`: a season (*Look > Seasons*) - `spring` (petals), `summer` (pollen), `autumn` (leaves) or `winter` (snow, with `type` `snow`): a colour grade of the model and what falls through the air, as in the intro
- `sky`: show the sky (three's `Sky`, with clouds) around the model (default `true`); the sun stands where the sun study puts it, else where the key light comes from
- `surfaces`: wet surfaces and snow cover on the model (default `true`)

The sound (rain, wind, thunder) is the viewer's own choice and is not
stored. The URL parameter `?weather=<type>` switches it on as well.

## `AIM3DViewer.materials`

The model's materials as edited in the viewer (*Look > Materials*): a
built-in material type and the properties set by hand, per material. The
model's file is not changed; the viewer puts edited copies in place of its
materials when the manifest loads. Exported while any material is edited;
the same list is saved with the model's settings (`_viewer.json`).

```json
"materials": [
  { "index": 2, "name": "glass", "preset": "glass", "keepTexture": true, "params": { "roughness": 0.05 } }
]
```

- `index`: the material's place in the model (the order the viewer meets them in); `name`: its name in the file. A material is found by both, else by a name only one material has
- `preset`: the built-in type applied first - `glass`, `frostedGlass`, `tintedGlass`, `water`, `lightWood`, `darkWood`, `varnishedWood`, `plaster`, `paintedWall`, `concrete`, `brick`, `sandstone`, `marble`, `terracotta`, `ceramic`, `steel`, `aluminium`, `iron`, `brass`, `gold`, `copper`, `bronze`, `mirror`, `plastic`, `rubber`, `fabric`, `clay`, `light` (or `null`)
- `keepTexture`: the type keeps the colour texture and vertex colours (default `true`)
- `params`: the properties over the type - `color`, `emissive` (`"#rrggbb"`), `roughness`, `metalness`, `opacity`, `transmission`, `clearcoat`, `clearcoatRoughness`, `sheen` (0 to 1), `thickness`, `ior`, `emissiveIntensity` (from 0), `doubleSided`

## `AIM3DViewer.measurements`

The measurements placed in the viewer (*Measure*): distances, angles and
areas, drawn again with their labels and listed in the measurements panel
when the manifest loads, after `modelTransform`. Exported while any
measurement is finished; the same list is saved with the model's settings
(`_viewer.json`, the *Measurements* tick of *Save settings*), and the section
planes with it (`clipping`, the *Section cuts* tick).

```json
"measurements": [
  { "mode": "distance", "points": [[-500, 0, 0], [500, 0, 0]] },
  { "mode": "angle", "points": [[-500, 800, 0], [0, 1200, 0], [500, 800, 0]] },
  { "mode": "area", "points": [[-400, 0, -600], [400, 0, -600], [400, 0, 600], [-400, 0, 600]] }
]
```

- `mode`: `distance` (a path through the points: each segment and the total length), `angle` (start, vertex, end: the angle at the vertex) or `area` (the corners of a polygon, closed back to the first point: its area and perimeter)
- `points`: `[x, y, z]` in the model's own coordinates - those of its file, before `modelTransform` - so the measurements stay on the model wherever it is placed. At least 2 for a distance and 3 for an angle or an area; an angle uses the first 3
- Lengths and areas are shown in the model's unit (`spatialScale` of the Scene, else `viewer.measurement.modelUnitInMeters`), metric or imperial as the viewer is set

## `AIM3DViewer.surroundings`

Generated surroundings: a typical setting drawn round the model - a
settlement, fields, a forest, low hills - to say what kind of place the
object stood in (see [docs/surroundings.md](../../docs/surroundings.md)).
They are worked out from these parameters alone, so the same block always
gives the same picture. They are a hypothesis about the kind of place, not a
reconstruction of this one: drawn as plain pale shapes, marked in the view,
and no part of the model (no picking, measuring or export). Exported while
shown.

```json
"surroundings": { "generated": true, "kind": "castle", "period": "medieval", "year": 1350, "season": "summer", "seed": 2339645102, "density": 0.6, "style": "realistic", "water": true, "terrain": "real", "latitude": 54.0396, "longitude": 19.028 }
```

- `kind` (required): `"castle"` (a settlement beside it), `"town"` (streets, a wall), `"church"` or `"village"` (a village round the model), `"monastery"` (its walled precinct with a gate tower, the cloister's ranges beside the church, an orchard, fishponds; a village beyond), `"manor"` (a manor house: an avenue along the drive, a park with a pond behind it, its farm beside it; a village beyond), `"manor-farm"` (a farmyard of barns, a granary and a cowshed round the model, the manor house at its head), `"shtetl"` (a market square of timber houses facing it, roads out from each side, no walls) or `"port"` (a town on the shore: a quay with warehouses, piers into the water)
- `period`: `"early-medieval"` (about 900-1250: timber, a palisade), `"medieval"` (1250-1550), `"early-modern"` (1550-1800: taller town houses, a baroque church, ramparts with bastions), `"industrial"` (1800-1914: tenements, a boulevard where the walls stood, a railway with its station, factories with chimneys, a neo-Gothic church), `"modern"` (1914-1945: the same, with flat-roofed blocks of flats in light render), `"postwar"` (1945-1990: the war's ruins until about 1950, housing estates of prefabricated blocks from the late 1950s, a collective farm's sheds, fields ploughed together) or `"contemporary"` (1990-2025: the estates renovated, detached houses round the edge, a shop with its car park out of town); each from its first year; default: from `year`
- `year`: the year shown (default `1350`)
- `season`: `spring`, `summer`, `autumn` or `winter` (under snow); default `summer`
- `seed`: an integer; another seed gives another layout of the same kind
- `density`: 0 to 1, how built-up the settlement is (default `0.6`)
- `style`: `"schematic"` (default: plain pale shapes) or `"realistic"` (the materials and surface patterns, doors and windows, vegetation and haze of the period, contact shadows and shadows cast by the sun, trees in the wind, smoke from roofs, rippling water, hills on the horizon); marked as generated either way
- `water`: `true` (default): a moat round a castle (with a bridge), a river past a town or a village where the seed gives one (with bridges); `false`: none
- `terrain`: `"generated"` (default: low hills towards the rim) or `"real"`: the place's terrain from elevation data (the open Terrain Tiles, `viewer.surroundings.elevationUrl`), with `latitude` and `longitude` (else the manifest's `location`); generated hills until it is loaded or if it cannot be. On the real terrain no river is generated
- `latitude`, `longitude`: the place, for the real terrain (also of the real water: today's rivers, natural lakes and the coast from OpenStreetMap, `viewer.surroundings.mapUrl`)
- `layoutUrl`: GeoJSON of an old map's roads, fields, buildings and walls (dated) that take the place of the generated ones of their kind (relative: next to the manifest) - see [surroundings](../../docs/surroundings.md), "An old map"
- `mapOverlay`: `{ "url": "https://…/{z}/{x}/{y}.png", "opacity": 0.85, "attribution": "…" }`: an old map's tiles draped over the ground (they must allow cross-origin use); the attribution is shown in the badge
- `waterUrl`: GeoJSON of the water as it was, digitised from an old map (relative: next to the manifest); used before any map on the real terrain - see [surroundings](../../docs/surroundings.md), "Real water"
- `region`: `"central"` (default: Central Europe), `"mediterranean"` (stone and render, low terracotta or flat roofs, narrow streets, a bell tower beside the church, cypresses, holm oaks and olive groves, a drier land), `"nordic"` (timber painted Falu red, ochre and white, turf roofs until about 1800, whitewashed churches, spruce and pine), `"british"` (stone cottages under thatch, red-brick terraces under slate after 1800, churches with square towers, fields in hedgerows after about 1750) or `"eastern"` (log houses gable to the road, half whitewashed, thatch, tin after 1914, wooden churches with onion domes, birch and pine); the Suggested scene picks it by the place
- `masonry`: `"brick"` (default) or `"stone"`: what churches, towers and town walls are built of; the Suggested scene picks it by the region (stone south of the Sudetes and the Carpathians' foothills, in Bohemia, Moravia, southern and western Germany)
- `followTimeline`: `true`: the surroundings follow the 4D timeline's year - its period, and how far the settlement has grown (`growth`); hidden in years outside 900-2025
- `growth`: 0 to 1, the share of the settlement's houses built (default `1`); a house that stands at a lower growth stands at a higher one too
- `generated`: always `true` in exports; it tells whoever reads the manifest what the block is
- `life`: people walking the settlement's streets, carts (cars from the 1920s) on its roads, rowing boats, sailing boats in a port and motorboats after 1945 on its water - in the realistic look; fewer in winter, no boats on the ice, half as many on a phone (default `true`; `false`: none)
- `pastTerrain`: on the real terrain, what was made later - reservoirs, dams, quarries, landfills, spoil heaps, embankments (OpenStreetMap, their `start_date`, else a typical year) - is taken away for the years before (default `true`; `false`: today's terrain whatever the year)
- `open`: `true`: their window open on load - the year's slider with its milestones, and play through the years (exported while it is open)

## `AIM3DViewer.sceneSuggest`

The Suggested scene window (*Look > Suggested scene*) open when the manifest
loads: what the rules make of the model's texts, place, year, size and shape
(see [docs/ai.md](../../docs/ai.md), section 5). Nothing changes until the
user applies the suggestions.

```json
"sceneSuggest": { "open": true, "purpose": "documentation" }
```

- `open`: open the window on load (default `false`)
- `purpose`: `"documentation"` or `"presentation"`, the purpose shown first (default: the one the rules pick)

It is not exported. The examples `*-scene-*.json` use it: each sets the
texts, the place or the camera the rules read, and leaves the lighting to
the suggestions.

## `AIM3DViewer.photos`

Historical photographs (or drawings, paintings) laid over the model from the
camera they were taken from, so the reconstruction can be checked against
its sources. Opening a photo in the panel (*Annotations > Historical photos*)
flies the camera to its view and shows the photo over the canvas, faded in,
or cut by a divider. Moving the camera hides the photo until its view is
restored.

```json
[
  {
    "id": "postcard-1912",
    "src": "./examples/tempietto/photos/Tempietto_1912.webp",
    "label": { "en": ["Postcard, about 1912"] },
    "source": { "en": ["Private collection"] },
    "year": 1912,
    "opacity": 0.6,
    "view": { "position": [9.1, 3.2, 11.4], "target": [0, 1.6, 0], "fov": 38, "roll": 0 }
  },
  { "service": "https://iiif.example.org/iiif/3/photo-17", "label": { "en": ["Survey photo"] } }
]
```

- `src`: image URL; a URL ending in `info.json`, or `service` (a IIIF Image API service, its URL or `{ "id": ... }`), asks the service for the image at up to 2000 px
- `label`, `description`, `source`: shown in the panel
- `year`: the 4D timeline goes to this year when the photo opens
- `opacity`: how strongly the photo covers the model, `0` to `1` (default `0.6`)
- `view`: the camera the photo was taken from, in scene coordinates: `position`, `target`, `fov` (vertical field of view, degrees) and `roll` (the photo's tilt, degrees clockwise). The photo is fitted to the canvas height, which the vertical field of view spans, so it lines up at any canvas width. Without a view the photo is shown over whatever the camera sees

A photo is added in the panel from a URL or a file and taken from the
current view; *Align* keeps it on screen while the camera, the lens and the
tilt are matched to it, *Save view* keeps that pose. Photos from a file are
shown for the session only and are left out of an export (they have no URL).

## `AIM3DViewer.sounds`

Sound in the scene, heard from where the camera is (*Look > Sounds*). Each
source plays a sound file in a loop (or once) at its volume:

- `ambient`: everywhere at the same level (wind, a room's hum);
- `point`: from `position`, at full volume up to `distance` (scene units),
  halving with each doubling of the distance beyond it;
- `spot`: from `position` towards `lookAt`: full volume inside half of its
  cone `angle` (degrees), 15% outside it.

```json
{
  "autoplay": true,
  "volume": 0.8,
  "sources": [
    { "id": "wind", "type": "ambient", "src": "./examples/audio/wind.ogg", "label": "Wind", "volume": 0.4 },
    { "id": "bell", "type": "point", "src": "./examples/audio/bell.ogg", "label": "Bell", "position": [0, 4.2, 0], "distance": 3 },
    { "id": "voice", "type": "spot", "src": "https://example.org/voice.mp3", "position": [0, 1.6, 2], "lookAt": [0, 1.6, 8], "angle": 70, "loop": false },
    { "id": "rebuilt", "type": "ambient", "src": "./examples/audio/works.ogg", "years": [1880, 1910] }
  ]
}
```

- `autoplay`: play from the first click or key press in the page (browsers
  allow sound only after one); without it, from the window's play button
- `volume`: of all of them; each source has its own `volume` too (`0` to `1`,
  default `1`)
- `loop` (default `true`), `on` (default `true`: `false` lists it unheard)
- `years`: `[from, to]` (either `null`): heard only while the 4D timeline
  shows a year between them, faded in and out
- Relative URLs (`./...`) resolve like the manifest's model URLs; a sound on
  another site must allow it (CORS)

The same sources are written as IIIF Presentation 4 audio emitters painted
into the scene - `AmbientAudio` targeting the scene, `PointAudio` and
`SpotAudio` at a `PointSelector`, with `source` (the `Audio` file), `volume`
(`Quantity`, `relative`), `SpotAudio`'s `lookAt` and `angle`, and
`timeMode` (`loop` or `trim`) - so other viewers hear them too. A manifest
with only those (no `AIM3DViewer.sounds`) is read from them.

### `AIM3DViewer.sounds.acoustics`

The room's acoustics: the sounds heard with the reverberation of the
reconstructed room, worked out from the model's geometry at a listening
point (see [docs/audio.md](../../docs/audio.md#room-acoustics)). The result
is not kept: it is worked out again when the sounds play.

```json
"acoustics": { "on": true, "position": [0, 270, 250], "material": "wood", "floor": "pews", "amount": 1 }
```

- `on`: hear the sounds in the room (default `false`)
- `position`: the listening point, in scene coordinates (default: where the
  camera is when it is worked out)
- `material`: the surfaces whose material's name does not say what they are:
  `stone`, `plaster` (default), `brick`, `wood`, `glass`, `fabric`, `ground`
- `floor`: what covers the floors (surfaces facing up): `material` (their
  own, default), `pews` (empty benches), `people` (benches with people)
- `amount`: the reverberation louder or quieter than worked out, `0` to `2`
  (default `1`)

A source's `acoustics` (boolean) says whether it is heard in the room:
by default point and spot sources are, ambient ones are not (wind is
outside).

## `AIM3DViewer.data`

Live data ([docs/live-data.md](../../docs/live-data.md)): a table that drives
the model. Each row belongs to the part of the model its key cell names, and
its other cells give the part's look. The table stays connected: what changes
in it moves to its new look without the model being loaded again.

```json
"data": {
  "src": "./examples/tempietto/data/monitoring.csv",
  "refresh": 2,
  "key": "part",
  "color": { "column": "moisture", "ramp": "heat", "min": 5, "max": 35 },
  "label": { "column": "moisture", "unit": "%" },
  "alert": { "column": "moisture", "above": 28 },
  "visible": "standing",
  "strength": 0.75,
  "transition": 0.9
}
```

- `src`: the table's URL - CSV or TSV with the column names in its first line
  (comma, semicolon or tab; a decimal comma is read), or JSON: an array of
  objects, `{ "rows": [...] }`, or an object of objects keyed by the part's
  name. Relative to the manifest
- `refresh`: seconds between two reads of `src` (0.5 to 3600). Without it the
  table is read once. An unchanged table changes nothing
- `rows`: the table itself, one object per row, instead of `src`. A table
  opened from a file, edited in the window or pushed by the page is saved
  this way
- `key`: the column with the part's name - an object's name in the model,
  compared without case, spaces and punctuation (`Column_1`, `column 1`), or
  an IFC element's `GlobalId`. A row naming a group paints all of it; a row
  naming one of its objects wins there. Default: the column that names most
  objects
- `color`: a column's name, or `{ column, ramp, reverse, min, max,
  categories }`. A numeric column runs along the ramp (`heat`, `viridis`,
  `blue`, `green`, `traffic`, `diverging`, or a list of colours) from `min`
  to `max` (default: the column's lowest and highest). A text column gets a
  colour per value: those in `categories` (`{ "good": "#1a9850" }`), the
  others from a palette. A cell that is a colour (`#c0392b`) is used as it is
- `label`: a column's name, or `{ column, unit, name }`: the cell above the
  part, with its unit, after the part's name when `name` is true
- `alert`: `{ column, above, below, equals }`: the part pulses while its cell
  is above or below the limit, or says `equals`
- `visible`: a column's name: the part is hidden while its cell says `0`,
  `false`, `no` or `off` (an empty cell hides nothing)
- `strength`: how much of the colour covers the part's own material (0 to 1,
  default `0.75`)
- `transition`: seconds a change takes to show (default `0.9`)
- `open`: `false` keeps the Live data window closed on load

## `AIM3DViewer.image` and `AIM3DViewer.audio`

A manifest's scene may show an audio file or a 2D image instead of a model:
its painting annotation's body is a `Sound` (or `Audio`) or an `Image` with
the file's URL, e.g. `{ "id": "./examples/images/rock-art.jpg", "type":
"Image", "format": "image/jpeg" }`. Then these blocks keep how it is shown -
only the settings that are not the defaults:

```json
{
  "image": { "dstretch": true, "compare": true, "split": 0.35 },
  "audio": {
    "frequencyScale": "linear",
    "range": 70,
    "playback": { "loop": true, "region": { "start": 3, "end": 5.4 }, "reverb": "church", "reverbMix": 0.4 }
  }
}
```

- `image` ([docs/images.md](../../docs/images.md)): `brightness` (-0.5..0.5),
  `contrast`, `gamma`, `saturation`, `invert`, `channel` (`rgb`, `red`,
  `green`, `blue`, `luminance`), `autoLevels`, `equalize`, `sharpen` (0..2),
  `relief` (0..1) and `reliefAngle` (degrees), `edges`, `dstretch`,
  `falseColor` (`none`, `inferno`, `viridis`, `turbo`), `compare` and
  `split` (0..1)
- `audio` ([docs/audio.md](../../docs/audio.md)): the 3D view -
  `frequencyScale` (`log`, `linear`), `range` (dB), `heightScale`,
  `showTerrain`, `showWaveform` - and `playback`: `volume`, `rate`,
  `preservePitch`, `loop`, `region` (`{ start, end }`, seconds),
  `channelMode`, `filter` (`{ type, frequency, q }`), `compressor`,
  `reverb` (`room`, `hall`, `church`) and `reverbMix`. The sound starts
  with a click (browsers allow sound only after one).

## `AIM3DViewer.thumbnails`

Renders of the model shown in the thumbnail gallery, in this order. The list
may have any length. Each entry is a URL or an object with `src` and an
optional `label` (a string or a language map, used as the image's alt text).

```json
[
  "./examples/gallery/tempietto/Tempietto_side0.png",
  { "src": "./examples/gallery/tempietto/Tempietto_top.png", "label": { "en": ["Top view"], "pl": ["Widok z góry"] } }
]
```

- Relative URLs (`./...`) resolve like the manifest's model URLs.
- A manifest without `thumbnails` (or with an empty list) shows the viewer's
  generic placeholder images, never the renders of a previous manifest.
- An image that fails to load is replaced by a generic placeholder.

See [tempietto-aim3d-thumbnails.json](./examples/tempietto-aim3d-thumbnails.json).

## `AIM3DViewer.certainty`

The Level of Certainty (LoC) scale of a reconstruction. Annotations assess the
object (or group) they target against it; the viewer's LoC view (editor
toolbar, *Show Level of Certainty*) paints every assessed object in its
level's colour, the rest in `unassessedColor`, and shows a legend.

Levels are told apart by three things, so the view also reads without colour
vision and in greyscale prints: a distinct `color`, a short `code` (a letter)
and a `symbol`. Annotation badges in the view show the code and symbol
instead of their number.

```json
{
  "min": 0,
  "max": 10,
  "unassessedColor": "#9ca3af",
  "opacity": 0.4,
  "visible": false,
  "levels": [
    { "value": 10, "code": "A", "symbol": "✓", "color": "#1a9850", "label": { "en": ["Preserved / surveyed"], "pl": ["Stan zachowany / pomiar"] } },
    { "value": 8,  "code": "B", "symbol": "■", "color": "#2166ac", "label": { "en": ["Direct documentation"], "pl": ["Dokumentacja bezpośrednia"] } },
    { "value": 6,  "code": "C", "symbol": "▲", "color": "#ffd400", "label": { "en": ["Indirect sources"], "pl": ["Źródła pośrednie"] } },
    { "value": 4,  "code": "D", "symbol": "≈", "color": "#f46d00", "label": { "en": ["Analogy"], "pl": ["Analogia"] } },
    { "value": 0,  "code": "E", "symbol": "?", "color": "#c51b7d", "label": { "en": ["Hypothesis"], "pl": ["Hipoteza"] } }
  ]
}
```

- `levels`: required. A level's `value` is its lower bound: an assessment
  belongs to the highest level whose value is not above it (on the scale
  above, 7 is level C). `value`, `code` and `color` must be unique.
- `label`, `description`: IIIF language maps (or plain strings).
- `min`, `max`: the range assessments must fall in (default: the lowest and
  highest level).
- `opacity`: opacity of the colour overlays, 0-1 (default 0.4). The colours
  are laid over the model's own materials, which show through; 1 hides them.
  Set in the view from the legend's slider and exported with the scale.
- `visible`: open the manifest in the LoC view.
- Without this block the viewer uses the scale above. It is exported when a
  manifest gave it or an annotation is assessed.

### Assessments on annotations

An assessed annotation adds the W3C Web Annotation motivation `assessing` and
carries the assessment in its own `AIM3DViewer` block; its body is the
justification (sources, reasoning).

```json
{
  "type": "Annotation",
  "motivation": ["commenting", "assessing"],
  "label": { "en": ["Roof"] },
  "body": { "type": "TextualBody", "value": "Reconstructed from a 1920 photograph.", "format": "text/plain" },
  "AIM3DViewer": {
    "targetId": "m0:0.12",
    "faceNumbers": [0],
    "certainty": { "value": 6, "code": "C", "scope": "object", "targetId": "m0:0.12" }
  }
}
```

- `value` (or `code` alone, resolved against the scale): the level.
- `scope`: `object` paints the annotated object, `group` its parent object
  (e.g. every part of a building element).
- `targetId`: the object painted, resolved when the annotation was saved.

The XML export for Drupal (`iiif:annotations`) carries the same as
`<iiif:certainty value="6" code="C" scope="object" target="m0:0.12"/>`.

## Compatibility

- `AIM3DViewer.viewer.clipping` is the preferred schema.
- `AIM3DViewer.viewer.editorToolbar` is the preferred schema for editor toolbar state.
- `AIM3DViewer.viewer.menuToolbar` is kept as a backward-compatibility field for older manifests.
- The importer also accepts `AIM3DViewer.clipping` as a backward-compatibility fallback.
- `camera.zoom` is read from the camera state and should be treated as the source of truth for orthographic view restoration.
## Inspection: what a manifest contains, value by value

`manifest-inspection.js` (`inspectAIM3DManifest(manifest)`) checks every
attribute of a manifest - every leaf of the JSON, the IIIF part as well as
`AIM3DViewer` - and groups them into features, one icon each in the manifest
lists (`manifestFeatureIcons(inspection)`):

`model`, `metadata`, `rights`, `annotations`, `camera`, `lights`,
`raking-light`, `clipping`, `timeline`, `variants`, `compare`, `photos`,
`location`, `sun`, `weather`, `surroundings`, `materials`, `measurements`, `certainty`, `thumbnails`, `transform`, `rendering`,
`tour`, `settings`, `manifest` (the IIIF structure itself).

Each attribute gets a level:

- `error` - the viewer cannot use the value: wrong type, out of range, an
  unknown enum value, a required key missing. Everything
  `validateAIM3DManifest` rejects is an error here too.
- `warning` - it loads, but is probably wrong: an empty text, a URL with
  spaces or pointing at `localhost`, a colour the browser does not know, a
  date that is not ISO 8601, a language key that is not a language code, a
  media type like `glb`, a zero `camera.up` or `modelTransform.scale`, a
  compared variant that does not exist, an annotation targeting a scene the
  manifest does not have, a duplicate IIIF id, a stage outside the timeline.
- `info` - worth knowing: an attribute the viewer does not know and ignores,
  a recommended one not set (`summary`, `rights`, labels of photos and
  variants), `rights` that is neither Creative Commons nor
  RightsStatements.org, a file served over http.

```json
{
  "status": "warning",
  "summary": { "errors": 0, "warnings": 1, "infos": 2, "attributes": 154, "unknown": 0 },
  "features": [{ "id": "timeline", "icon": "timeline", "label": "4D timeline", "present": true, "count": 3, "status": "ok", "errors": 0, "warnings": 0 }],
  "attributes": [{ "path": "$.AIM3DViewer.viewer.backgroundColor", "value": "#12345", "level": "warning", "feature": "rendering", "known": true, "issues": [{ "level": "warning", "message": "is not a colour (#rrggbb expected)" }] }]
}
```

From the command line: `node scripts/inspect-manifest.mjs manifest.json`
(issues and the features it contains), `--all` for every attribute, `--json`
for the full report; it exits 1 when a manifest has errors. Models
themselves are checked by the conversion worker (`validation.json`, see
`worker/README.md`).
