diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 9d5a27d9..d2a138cf 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,3 +1,8 @@ +// Airbnb's own bans, kept: a `no-restricted-syntax` entry below replaces the whole list. +const airbnbRestrictedSyntax = require('eslint-config-airbnb-base/rules/style').rules[ + 'no-restricted-syntax' +]; + module.exports = { env: { browser: true, @@ -62,6 +67,21 @@ module.exports = { "@typescript-eslint/no-shadow": "error" }, overrides: [ + { + // The one join path: a join is `joinEstateRoom`, which files the DM before it sends the join. + files: ['src/**/*.ts', 'src/**/*.tsx'], + excludedFiles: ['src/app/features/estate/joinEstateRoom.ts', 'src/**/*.test.*'], + rules: { + 'no-restricted-syntax': [ + ...airbnbRestrictedSyntax, + { + selector: "CallExpression[callee.property.name='joinRoom']", + message: + 'Join a room through joinEstateRoom (features/estate/joinEstateRoom.ts), the one join path.', + }, + ], + }, + }, { files: ['*.ts'], rules: { diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..77100e3b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# The ridge bake is addressed by its bytes (bake_id covers the manifest text and the tile files): public/ridge is checked out exactly as committed, whatever +# core.autocrlf says, so a Windows working tree serves the bytes its directory name was hashed from. +public/ridge/** -text +# The baker's inputs and schema are text, read the same everywhere. +scripts/ridge-bake/**/*.json text eol=lf diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index 964add54..e74946bc 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -18,10 +18,14 @@ jobs: - name: Setup node uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version-file: ".node-version" + node-version-file: '.node-version' package-manager-cache: false - name: Install dependencies run: npm ci + - name: Ridge asset gate + run: | + npx vitest run src/app/features/scene/ridge/ridgeAssets.test.ts + echo "ridge assets: $(find public/ridge -type f | wc -l) files, $(du -sb public/ridge | cut -f1) bytes" - name: Build app env: NODE_OPTIONS: '--max_old_space_size=4096' diff --git a/README.md b/README.md index dfc722ad..abeba8b2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ and your own place in it) instead of an invite list. Mobile first. **Live now:** the Cinny engine (matrix-js-sdk, Rust crypto, sync) under a Ratatoskr UI: branding, GameCult theme, estate navigation, pose portraits -(opt-in setting), a background scene and soundscape (opt-in, off by default). +(opt-in setting), a background scene (on in the dev config, `backgroundScene.tier`; the device can lower it) and an opt-in soundscape. **Planned:** see [`docs/gamecult/ratatoskr-target.md`](docs/gamecult/ratatoskr-target.md) for the target and cut sequence. Internal names that are protocol or stored state (`cinny_*` localStorage keys, the `in.cinny.room.power_level_tags` event diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md new file mode 100644 index 00000000..1d22b489 --- /dev/null +++ b/THIRD_PARTY_NOTICES.md @@ -0,0 +1,21 @@ +# Third-party notices + +## d3-celestial (constellation lines) + +The constellation line chains in `src/app/features/scene/ridge/nightSkyData.ts` are derived from +`data/constellations.lines.json` of d3-celestial, https://github.com/ofrohn/d3-celestial, +under the licence below. + +``` +Copyright (c) 2015, Olaf Frohn +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.``` diff --git a/config.json b/config.json index dd4c887b..3e349d86 100644 --- a/config.json +++ b/config.json @@ -1,24 +1,40 @@ { - "defaultHomeserver": 1, - "homeserverList": ["converser.eu", "matrix.org", "mozilla.org", "unredacted.org", "xmr.se"], - "allowCustomHomeservers": true, + "defaultHomeserver": 0, + "homeserverList": [ + "chat.gamecult.org" + ], + "allowCustomHomeservers": false, "featuredCommunities": { "openAsDefault": false, - "spaces": ["#gamecult:gamecult.org"], - "rooms": [ - "#tuwunel:grin.hu", - "#free-software-movement:matrix.org", - "#gentoo:matrix.org" + "spaces": [ + "#gamecult:gamecult.org" ], - "servers": ["activematrixrooms.com", "matrixrooms.info", "matrix.org", "mozilla.org", "unredacted.org"] + "rooms": [], + "servers": [ + "gamecult.org" + ] }, - "hashRouter": { - "enabled": false, + "enabled": true, "basename": "/" }, - "backgroundScene": { - "tier": "off" + "tier": "full", + "style": "ridge" + }, + "dings": { + "enabled": false + }, + "fileZoneShare": { + "enabled": true + }, + "push": { + "vapidPublicKey": "", + "gatewayUrl": "", + "appId": "" + }, + "registration": { + "enabled": false, + "url": "" } } diff --git a/deployment/idunn/recipe.toml b/deployment/idunn/recipe.toml new file mode 100644 index 00000000..9305cd5e --- /dev/null +++ b/deployment/idunn/recipe.toml @@ -0,0 +1,34 @@ +schema = "gamecult.idunn.target_declaration.v1" +target = "ratatoskr" +# Idunn stamps the source commit into the build environment under this name. The release is not built from source: the +# dist tarball below is built by scripts the release owner runs (build-prod-dist.sh) and enters pinned by sha256, so +# each release is a recipe commit whose pin is its provenance. The stamp the served index carries is the commit the +# tarball was built from, which is not this commit. +source_stamp_environment = "RATATOSKR_BUILD_COMMIT" + +# Release dist adc64a4fb626d35ccc29bc9d4af45d5b49f1ccae: the output of build-prod-dist.sh (live config check passed), packed +# as dist/ at the top of one gzip tar. The tree carries the repo's own config.json; what is served is the operator's +# carried file, which Idunn copies beside dist/ and the vhost aliases over the tree's (a vhost without that alias would +# serve the repo config). +[[external_inputs]] +id = "dist-tarball" +url = "https://eureka.gamecult.org/forge/GameCult/Ratatoskr/releases/download/dist-adc64a4f/ratatoskr-adc64a4f-dist.tar.gz" +sha256 = "17df6f8e95e11f3402bb2be67aba968c4f3b1ffc690ded9abbc858a5fa95a89a" +runner = "unpack" +destination = "release/dist.tar.gz" + +[[steps]] +id = "unpack-dist" +phase = "prepare" +runner = "unpack" +argv = ["tar", "-xzf", "release/dist.tar.gz", "-C", "release"] + +[[artifacts]] +id = "dist" +source_kind = "runner-output" +runner = "unpack" +source = "release/dist" +destination = "dist" + +[static_release] +artifact = "dist" diff --git a/docs/commons-files-desk.md b/docs/commons-files-desk.md new file mode 100644 index 00000000..d9152065 --- /dev/null +++ b/docs/commons-files-desk.md @@ -0,0 +1,291 @@ +# Files desk: Commons and per-Persona file zones, two designs compared + +Status: **decided: Option A, Matrix as the single authority** (Meta, #swarm 2026-11-13 14:44Z: "Let's try matrix shaped"). Design only; no Files desk code is merged and nothing is deployed. Option B (the host service) is parked, not deleted: Eureka's branch `eureka-self/commons-host` at `a391960d` has no PR and a Soul verdict of NOT READY with fixes owed, and is woken only if Meta later wants a real file store. PR #143 (B's cut 1 in this repo) is closed unmerged. Items marked **UNKNOWN** are not verified; **Q-E** are questions for Eureka, **Q-M** for Meta. + +### Eureka's answers (`/opt/commons/handoff/commons-matrix-notes-20261113.md`, read 2026-11-13; final answers folded in 2026-11-13) + +- **Upload cap (Q-E1, read).** Synapse 1.164.1; the repo template `homeserver.yaml` has `max_upload_size: 50M` and the nginx vhost `client_max_body_size 50m`; the live runtime file is root-only and was not read. No per-room or per-user per-file cap exists; `media_upload_limits` is a per-user time-window quota. `GET /_matrix/client/v1/media/config` returns `m.upload.size` to an authenticated client, which is what the client reads. Raising the cap takes the config line, a Synapse restart and nginx at least as large. +- **Posting (Q-E1, read).** A Self holds no Matrix credentials, so the publisher needs its own bot account and token (a MAS compatibility token via `mas-cli`). It uploads with `POST /_matrix/media/v3/upload` and sends `m.room.message` with `msgtype` `m.file` or `m.image`. The Persona mouth sends `m.text` only today, so file events are new for it too. +- **Room (Q-E3, answered).** The Commons room is `#commons:gamecult.org` (create type `org.gamecult.file_zone`, unencrypted, membership by the estate Space, publisher bot at power level 50). Provisioning and push muting are Eureka's. +- **Cap (Q-E1, answered).** 50 MiB per file. The client reads it live from `m.upload.size`, not from this document. +- **Poster (Q-E1, answered).** The publisher posts as the owning Mind: each file appears under the Mind whose tree it came from, not under a generic bot. +- **Final marker (Q-E2, answered).** A handoff document is final when a sibling `NAME.final` holds its sha256; the publisher watches for that, posts once, and carries `org.gamecult.publish.replaces` (prior event id and sha256) on a later final version. +- **Range (Q-E4, unverified).** Whether Synapse media honours `Range` has not been checked against a live mxc. Playback therefore stays on the blob download until it is. +- **Edited-doc stale copies:** a redacted file's media persists unless purged; the publisher dedupes by sha256. + +Source: Meta, #swarm 2026-11-13 14:28Z and 14:40Z; ruling `ratatoskr:ruling:persona-file-sharing-zone` (a browsable, previewing collection per Persona; the Self writes to her outbox, her Persona decides what is shared, the Self never holds Matrix credentials). + +## What exists on Matrix today (the base A must fit) + +Read from this repo at dev `8ba407cd`: + +- **Zone = a room** whose `m.room.create` type is `org.gamecult.file_zone` (`isFileZone.ts`), or one listed in config `fileZoneRooms`. One per Mind, `#-files:`, found by alias or by the carried id in the root Space's `org.gamecult.stewardships` (`mediaRoom.ts`, `MediaRow.tsx`); rendered as the Media row of each Mind's group. +- **Album = a thread root** (a text event; its `body`, or its latest `m.replace` edit, is the title); **file = a thread reply** with `msgtype` `m.audio|m.image|m.video|m.file` (`buildAlbums.ts`). A redacted event or an `m.replace` is never a file. Loose room messages are not shown. +- **Read** = `GET /rooms/{id}/threads` and `/relations/{root}/m.thread`, every page, 100 per request, at most 20 pages per endpoint (`useAlbums.ts`, `readPages.ts`; a capped read shows a note in the list). Unencrypted rooms only. +- **Write** = `sendShareSet` (`shareSet.ts`, behind `fileZoneShare.enabled`): a root, then one thread reply per file, content from `getMsgContent` with `info.sha256`. +- **Media** = authenticated Matrix media fetched to a blob (`downloadMedia` in `FileContent.tsx`): so the "media element cannot send a header" problem that Option B needed a ticket for is already solved this way, at the cost that a file is fully downloaded before it plays. +- **Receipts** = `org.gamecult.file_received` from a Mind's mouth after it fetches and verifies the sha256 (`docs/file-zone-mind-contract.md`); the mouth enforces the Mind's membership in the room. + +Option A is an extension of this, not a second system. + +## The two options + +**A. Matrix is the only authority.** Commons is one more file-zone room; each Mind's zone is the room she already has. Audience is room membership. Upload is the ordinary Matrix upload. Folders are albums (thread roots). A small publisher service with its own Matrix account posts allowlisted handoff documents into the Commons room. The Files desk is a view over file events in those rooms. + +**B. The host service.** A file host on Yggdrasil serves allowlisted directories (`GET /index`, `GET /file`, a capped `PUT`), authenticated by Matrix OpenID; the client browses it as a tree. Written out in full below the line. + +| | A: Matrix only | B: host service | +| -------------------------- | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- | +| Authorities | one (Matrix: identity, audience, storage, audit) | two (Matrix for identity, the host for files and access) | +| Audience | room membership and power levels | the host derives a role from Matrix identity and enforces it again | +| Audit of writes | the event `sender`, kept by the homeserver | the host's own log | +| Overwriting someone's file | impossible: events are immutable and only the sender's own edit counts; a redaction is a steward's act | host rule, host code | +| Upload size cap | the homeserver's `m.upload.size`, global, 50 MiB (Eureka) | the host's own, chosen freely | +| Type allowlist | not enforceable by the homeserver; client-side courtesy, steward redaction | enforced by the host (sniffed) | +| What is browsable | what was posted (published or uploaded) | what is on disk under the allowlist, live | +| Mind-written handoff docs | a publisher posts them once, when final (below) | the host serves the tree | +| Per-Persona zone | the existing Media room; the Self's outbox reaches it through the mouth, as the ruling says | a `shared/` directory the host serves | +| Folders | albums; nesting by path in the album title | real directories | +| Mind fetch | unchanged (mouth, room id and event id, receipts) | a second route the mouth would need | +| Media playback | blob download, as today; no seeking before the whole file arrives | ranges and a ticket, or the same blob | +| New moving parts | a room, a publisher | a host service, OpenID verification, CORS, tickets, path containment, rate limits | + +## Recommendation: A (decided) + +Confidence: high on the authority question (it agrees with Meta's ruling, with Eureka's lean, with the standing ruling that the Self never holds credentials while her Persona decides what is shared, and with the fact that everything built so far reads Matrix); moderate on the details below, which Eureka's answers can change. + +What A gives up, stated plainly: + +- **A live view of what is on disk.** Only what was published or uploaded appears. A handoff doc that was never marked final is not in the Commons. +- **Files over the homeserver's upload cap.** B had no Matrix limit; A has exactly one. +- **A server-side type allowlist.** Under A a member can upload any type the homeserver accepts; the client shows a refusal for types it does not want, and stewards redact. If a strict allowlist matters, a gating bot (post, check, redact) would have to exist, and it is a second authority again. +- **Seeking inside a large audio or video file** until Matrix media supports ranges for the client (**UNKNOWN**; the blob route is what runs today). +- **Hierarchy beyond the album level** as a native structure; see Folders. + +What it buys: one identity, one audience, one audit trail, immutable files, existing receipts and the mouth's fetch, and no new service to keep secure. + +## Option A in detail + +**Rooms.** Commons is a room with create type `org.gamecult.file_zone`, alias `#commons:gamecult.org`, join rule `restricted` to the estate Space so members join without an invite and Minds are invited, history `shared`, unencrypted (the zones are, and `info.sha256` is written only there). Power levels: `events_default` 0 so members post; `redact` and `state_default` at steward level. The room is muted for push by provisioning: file posts are thread replies, which can raise unread counts and notifications (**UNKNOWN** under this server's push rules), so the room must not shout. Per-Persona zones are the rooms Eureka already provisions; nothing new. + +**Folders.** Four ways to have folders on Matrix, in order of preference: + +1. _Albums are folders; nesting is a path in the album title_ (`handoff/2026-11`, `cast-art/poses`). Zero wire change: `buildAlbums` already reads it, and the client groups albums by title path as a pure view. Cost: a thread root per folder, and the rule that a folder's root is posted once by whoever opens the folder. **Recommended.** +2. A `org.gamecult.file.path` key on each file event. Gives a real tree with files anywhere; needs every poster to write it and every client to honour it; other Matrix clients ignore it and show a flat thread. +3. A room per folder, in a Space. Native hierarchy and per-folder audience; heavy (a room is a membership, a sync entry and provisioning each) and it multiplies the sync load on a phone. +4. A state event per folder (`org.gamecult.file_folder`). Mutable folder metadata (title, order), writable only at steward level; useful later if folders need descriptions, not needed for a first cut. + +**Albums in each Mind's room** are the same mechanism: a Mind's Media room holds that Mind's albums, the Commons holds the shared ones. The Files desk is the same view over either room; a zone differs only by room, not by code. + +**The publisher.** A small service on Yggdrasil with its own Matrix account (a bot account that posts as the owning Mind, per Eureka's answer above). The Self never holds this account; the publisher holds it. It owns the allowlist. + +- **When it posts.** Handoff documents are edited in place, so mirroring every save would spam the room with drafts. The rule (Eureka's lean, adopted): **post once, when the document is marked final**; a later final version posts again with a `replaces` relation to the earlier event. "Final" is a sibling `NAME.final` holding the document's sha256 (answered Q-E2); the client must not know. +- **Allowlist.** Lives on the publisher: a list of source roots and patterns, read by the publisher only. `handoff-private` is not on it and the publisher never lists, reads or posts from it. The client holds no path to anything on disk. +- **The event.** A file event in the thread of the folder's album, built the way `getMsgContent` builds them (`msgtype`, `body`, `filename`, `url` from the media repo, `info.mimetype|size|sha256`), plus one extra key `org.gamecult.publish`: `{ source, sha256, replaces? }` where `source` is a path relative to the allowlisted root, never absolute, and `replaces` is the event id of the version it supersedes. +- **`replaces`, not `m.replace`.** `m.replace` is the stock edit relation, but Ratatoskr's `buildAlbums` deliberately never treats an edit as a file, several clients do not render an edited file, and an edit hides the earlier version. A custom key keeps both events as files; the view shows the latest of a chain and a "N earlier versions" row under it, and other Matrix clients see two ordinary file posts. A chain is read from the events themselves (each carries its `replaces`), not from a table, and a `replaces` counts only when its event has the same sender as the event it names, so nobody else in the thread can fold a file away. +- **Idempotence.** The publisher's own state (a typed CultCache document of `source`, `sha256`, `event_id`) says what it posted; if that is lost, it rebuilds by reading its own events back from the room (`org.gamecult.publish.source` plus `sha256`) rather than guessing. The same `sha256` never posts twice. +- **Receipts and fetch** work unchanged: the event is an ordinary file event in a file-zone room, so a Mind's mouth can fetch it by room id and event id (5 MiB cap there) and tick `fetched for`. + +**Uploads (approved for members and Minds).** The ordinary Matrix upload, through the composer pipeline and `ShareSet`. The host rules Eureka gave map onto Matrix as follows: + +| Host rule | Under A | +| ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | +| only under an `uploads/` subtree | an album (folder) named `uploads/...`; the client offers upload only there (and in a Mind's own zone) | +| never overwrite Mind-written handoff files | free: other people's events cannot be replaced; a duplicate name is just another post in the thread | +| size cap | the homeserver's `m.upload.size`, shown from `MediaConfigLoader`; the client refuses a larger file before sending | +| type allowlist | client-side only; see "gives up" | +| explicit flag to overwrite | no overwrite exists; a new version is a new post, optionally with `replaces` set by the same sender | +| audit log with the Matrix id | the event `sender` | + +What A adds to `ShareSet`: sharing into an existing album ("add files", listed as not built in `docs/file-zone.md`), progress per file, cancel, and per-error refusal messages written against the SDK's `MatrixError` (`M_TOO_LARGE`, `M_FORBIDDEN`, `M_LIMIT_EXCEEDED`) instead of host codes. The draft refusal table of Option B's upload flow carries over with those codes. **UNKNOWN:** whether the SDK exposes upload progress and abort for media (it does for `uploadContent` with a progress callback; the composer already shows progress, `state/upload.ts`). + +## What each costs on the phone + +Under both, the phone design is the same shape (one column, rows 56 px or more, hidden controls, in-place preview; see the Option B sections below, which are written against the host but whose layout applies). + +- **A, new cost:** the Commons room is one more room in sync and it must be muted; albums and files are read to a cap of 20 pages of 100 per endpoint (a Commons past that shows a truncation note); a folder tree is a title-path grouping, so a deep tree is a long list of albums with breadcrumbs, not true directories; a file plays after a full download (small audio and images are fine; a 40 MB clip is not). +- **A, no cost:** no second sign-in, no ticket, no CORS, no new fetch layer, no host-unreachable state beyond the homeserver's own. The album list, album view, share panel and receipts exist and are tested; the view is their extension. +- **B, new cost:** every screen is a second client against a second service with its own errors, token refresh and unreachable state; media needs the ticket or the blob; the tree and preview are new UI. +- **B, benefit:** a tree that is live and complete, ranges, and no Matrix size limit. + +## Changes to Eureka's host work + +Under A the paused service is not built, and most of its list disappears: + +- **Dropped:** `/index`, `/file`, `PUT`, OpenID verification pinned to the server name, CORS, path containment and sniff rules, tickets, the `uploads/` write rules, the role response, the per-path audit log (Q-E3, Q-E4, Q-E6, Q-E7, Q-E8 to Q-E11 of the Option B list). +- **Kept:** the Commons allowlist decision (Q-E1 of that list), moved to the publisher: which roots, and that `handoff` is only ever published through the final-marker rule, never browsed. +- **New:** (1) provision the Commons room (type, alias, restricted join to the estate Space, power levels, push muted); (2) the publisher: account, allowlist, final-marker rule, media upload, posting into folder threads, the `org.gamecult.publish` key, idempotence from its own events; (3) confirm the homeserver upload cap and whether the account may post file events from Yggdrasil (**Q-E1**, asked on the PR); (4) the per-Persona path stays the one already specified (`album-outbox-ops`: outbox, Persona decision, mouth post), so the `shared/` convention of Option B is retired. + +## Cuts under A + +Status 2026-11-14 (dev da822e9e plus the size-refusal cut): built: folders by album title path with navigation and breadcrumb (#147), pagination (#148), version folding (#149), add-to-album with named refusals (#150), Stop for a send in flight, replaces loops shown, freshest last event on add (#151), and the pre-send size refusal: a file larger than the server's `m.upload.size` is named and left unsent before any upload or album root, and a server stating no cap refuses nothing. The Commons entry row is built (item 1): `useCommons` in `MediaRow.tsx` finds the room by the alias `#commons:` (provisioning records no id for it), through `lookupZoneRoom` (the one lookup `lookupMediaRoom` also uses); `EstateNavigator` shows it above the tiers as a Commons link when joined, a join row when invited or not joined, and nothing when the room is absent, the lookup failed or is out. It is gated on the existing `fileZoneShare.enabled`, not a new `filesDesk.enabled` flag. The album view and ShareSet work there because provisioning creates the Commons with the `org.gamecult.file_zone` create type. Members can share only once the room's power levels let them post: provisioning gives the poster level to the Minds alone. + +1. **Commons entry**: a Commons row in the navigator (like `MediaRow`, found by alias), opening the room's album view. Flagged, no new data layer. +2. **Pagination** of albums and files in `useAlbums` (done, PR #148). +3. **Folders by title path** and the album list grouped by it. +4. **Versions**: read `org.gamecult.publish.replaces`, show the latest of a chain with the earlier versions folded under it (done, PR #149). +5. **Add files to an existing album**, with per-file progress, cancel and the refusal messages above (the upload flow). Done: adding to an open album and the three refusal messages (PR #150); Stop for a send in flight is in too (PR for follow-up `files-desk-release-146-and-send-cancel`): it cancels the running upload through `onPromise` and `mx.cancelUpload`. + +PR #143 (Option B cut 1: contract types, host client, fake host) is **held**; under A it is not needed and would be closed. Its Soul pass found, and a revived B would have to close, an unvalidated `host` that could send the bearer to the wrong origin, hostile-looking entry names beyond separators, loose numeric checks and missing CSP and `Content-Disposition` headers in the fake. + +## Not in scope + +The Mind-side fetch (the mouth's); encrypted rooms; deletion and rename by this client; search across zones; any permission model of our own beyond Matrix room membership and power levels. + +## Open questions + +**Eureka:** answered; see "Eureka's answers" at the top. Still open on Eureka's side: Range support (Q-E4) and the live runtime `max_upload_size`. + +**Meta:** + +- **Q-M1.** Commons audience: members and Minds as proposed; Users and Patrons never, or later? +- **Q-M2.** Is a Persona's zone visible to all members or to her stewards and Minds? (The Matrix zone's audience question, `ratatoskr:question:file-zone-audience`, is the same fork.) +- **Q-M3.** May Users or Patrons upload if they are ever let in? +- **Q-M4.** Names: "Files" for the view, "Commons" for the shared room. +- **Q-M5.** A type allowlist is not enforceable under A without a gating bot; is a client-side refusal plus steward redaction enough? + +--- + +# Option B in full (kept for the comparison; superseded in part by Option A above) + +The sections below were written against the host service. Where they speak of a host, a role, a ticket, a token, `/index` or `/file`, they are Option B. The phone layout, the zone table and the refusal wording carry over to A with the Matrix equivalents given above. + +### What exists, and what this adds + +| | Matrix file zone (`docs/file-zone.md`, built) | Files desk (this page) | +| -------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| Storage | Matrix media in a `#files-` room, albums as threads | Directories on Yggdrasil, served by a small host | +| Listing | thread roots, `buildAlbums` | `GET /index?path=` | +| Unit | album of posted files | file in a directory tree | +| Strength | marks (keep / fix / drop), receipts (`fetched for`), any Matrix client works | whole trees without N uploads, no Matrix size limit, `/opt/commons` material becomes visible to people on a phone | +| Entry | Media row per Mind (`MediaRow.tsx`) | Files row (below) | + +They do not compete. The Matrix zone stays where a file needs a mark or a receipt (Aqua's listening kits); the Files desk is for browsing and fetching what is already on disk. Neither replaces the other, and the Files desk does not write Matrix events. The ruling left "Matrix media plus a listing versus a served directory" open; this page is the served-directory half, built beside the Matrix half already live. + +### Zones (host) + +| Zone | Contents | Who sees it | +| ---------------- | ------------------------------------------------------------ | -------------------------------------------------------------- | +| Commons | a curated tree of `/opt/commons` | members and Minds | +| Persona `` | what that Persona has chosen to share from her Self's outbox | **Q-M:** all members, or the Persona's stewards and Minds only | +| handoff-private | `/opt/commons/handoff-private` (0750) | never: not a zone, not listed, not a path the host resolves | + +Layout of `/opt/commons` today (read 2026-11-13): `backlog` (755, per-Mind backlog md and summary.json), `bin`, `cast-art` (setgid, group-writable: poses, busts), `handoff` (setgid, group-writable, 92 entries of briefs, patches, receipts, dings, kits), `handoff-private` (0750, ACL), `opt` (toolchains, root-owned), `situation` (0750, setgid), all `nobody:nogroup`. **`handoff` is not a publishable tree:** it holds ops notes, custody receipts (`bifrost-appsecret-custody-receipt-*`) and patches written for Minds, with no sticky bit. Serving it wholesale shows secrets-adjacent notes to every member and lets any Mind with group write change what a phone user sees. The Commons zone is therefore an allowlist of roots (candidate: `cast-art`, `backlog`, and a new `commons/` directory Minds publish into on purpose), not `/opt/commons` itself. **Q-E:** which roots; whether `handoff` ever, and if so through a reviewed `published/` subdirectory. + +Per-Persona source is the outbox from `ratatoskr:follow_up:album-outbox-ops-and-persona-specs`: `/var/lib/mind--outbox`, owned by `mind--self`, 0750, ACL read for `mind-` and the host user. The Self writes there; the Persona decides what is shared. Making that decision a filesystem fact (a `shared/` subdirectory the Persona's turn populates by copy or hardlink, the host serves only `shared/`) keeps the host dumb: it never learns what "decides" means. **Q-E:** `shared/` subdirectory versus a per-file marker. + +### Phone-first UI (host) + +Phone width is the design width; desktop adds the navigator beside it (as `Desk` does in `Router.tsx`). Vertical space is cheap, so a screen shows one thing and hides what is not in use. + +- **Entry.** A `Files` row pinned in the navigator beside `DeskEntry` and `MindMedia`: one at the estate level (Commons) and one inside each Mind's group (her zone), same `NavItem` anatomy as `DeskEntry`, dim when the zone has no items. Route `/files/:zone/*path`, sibling of `DESK_PATH`. +- **List.** One column. Row = icon or thumbnail, name (truncates in the middle, keeping the extension), size and age on a second dim line. Directories first. Rows are at least 56 px tall; the tap target is the whole row (the `PhoneHit` variants and the repo-wide guard test from `phoneHit.coverage.test.ts` apply to any IconButton inside). +- **Hidden until needed.** Breadcrumb is one line (current folder, a back arrow; the full path on tap). Search, sort and the grid toggle sit behind a single icon in the header and open inline above the list. Download and share appear on the open file, not on every row. Nothing is permanently stacked in the header. +- **Preview.** Tap a file: it opens in place below its row, full width, and pushes the rows below it down (vertical room is the cheap axis). Image: fitted, tap for the existing `ImageViewer`. Audio: the `AudioContent` controls rehosted (`renderMediaControl`), one player at a time, a mini-player pinned to the bottom only while something plays. Video: native controls. Text, md, json, patch: monospace, first 64 KiB, "show all" below. PDF: open in a new tab. Anything else: name, size, hash, one Download button. +- **Honesty rows.** Loading, empty, "host unreachable", "not allowed" are rows that say so (as `MediaNote` does); no spinner without a name for what it waits on. +- **Role-driven.** The index response carries the caller's role; the client uses it only to hide controls (upload), never to decide access. + +### Host contract + +The host is a service on Yggdrasil that Eureka owns. The client holds no filesystem knowledge. All JSON here is the xenos boundary between a browser and a file server, not state. + +- `GET /index?path=

` returns `{ role, zone, path, entries: [{ name, kind: "file"|"dir", size, mtime, mime, hash }] }`. `mtime` is unix seconds. `hash` is the lower-case hex sha256 of the plaintext bytes, absent for directories, and may be absent for a file whose hash is not computed yet (client shows nothing, never blocks on it). `mime` is sniffed by the host from magic bytes, not guessed from the extension. +- `GET /file?path=

` streams the bytes with `Accept-Ranges: bytes` and 206 for `Range` (audio and video seek; a phone on mobile data does not fetch 40 MB to play 10 seconds). `Content-Type` is the sniffed mime, `X-Content-Type-Options: nosniff`, `Content-Disposition: attachment` for anything that can run in the origin (`html`, `svg`, `js`, `xhtml`), and a `Content-Security-Policy: sandbox` on every response. +- `path` is `/`, with the zone one of the names the host announces. The host resolves the real path of every request and refuses anything that leaves the zone's root: `..`, absolute paths, NUL, symlinks that cross the root, dotfiles, and `handoff-private`, which is not on any allowlist. Errors are typed (`401 unauthenticated`, `403 zone not allowed`, `404`, `416`), and a path outside the allowlist is 404, not 403, so it says nothing about what exists. +- **Auth: Matrix OpenID.** The client calls `mx.getOpenIdToken()` (already used in `CallWidgetDriver.ts`) and sends it as `Authorization: Bearer `. The host verifies it against the homeserver's federation `openid/userinfo` endpoint, **pinned to our server name** (an `@void:evil.example` token must fail), caches the verified `sub` for the token's lifetime, and derives the role. It never sees the user's access token, and a Mind's Self never holds a token (ruling above): Minds reach the same bytes through the filesystem or the mouth, not this host. +- **Role** in the response: `member`, `mind`, `steward` (host decides from the Matrix id and the room/space membership the host reads; the client trusts none of it for access). **Q-E:** exact source of membership (estate Space membership read by the host with a service account, versus the Persona catalogue file for Minds). +- **Uploads** (Meta approved for members and Minds, #swarm 2026-11-13 14:30Z; rules are Eureka's, below). `PUT /file?path=

` writes only under an `uploads/` subtree of a zone, with `Content-Length` required; the host enforces a size cap, a type allowlist (sniffed, not the client's claim), no overwrite unless the request carries an explicit flag, and never replaces a file a Mind wrote into the handoff tree; every write is audit-logged with the caller's Matrix id. Reads cover the whole allowlisted tree, so an uploaded file is listed like any other. Success is `201` with the stored name, size and hash. The `role` in the index response gates the upload control; the host gates the write. + +### The one problem the contract leaves: media elements cannot send headers + +`

+ + diff --git a/harness/scene/ridgeLive.ts b/harness/scene/ridgeLive.ts new file mode 100644 index 00000000..fcab4092 --- /dev/null +++ b/harness/scene/ridgeLive.ts @@ -0,0 +1,71 @@ +// One live ridge scene (tier 'full': the sky plate and the cards on the compositor) filling the window, for a driver to turn and screenshot. Not shipped. +// `?h=214` the heading the scene starts at; `?sun=232:22` the sun's compass azimuth and elevation (degrees); `?sky=night` the stars of now (sun below the horizon); `?lines=1` the constellation lines. +// `?speed=6` degrees a second the view turns (rotation mode 'both'); 0 holds it. The page offers `window.live`: `hold(h)` turns the view by hand, `pose()` is the heading owner's pose now, +// `plate()` the sky plate's element and `left()` its left edge and width on the page. +import { parseManifest } from '../../src/app/features/scene/ridge/manifest'; +import { makePhysicalSky } from '../../src/app/features/scene/ridge/physicalSky'; +import { createBackdrop } from '../../src/app/features/scene/ridge/Backdrop'; +import { createRidgeScene } from '../../src/app/features/scene/ridge/Ridge'; +import { anchor, hold, poseAt } from '../../src/app/features/scene/ridge/heading'; +import { setCamera } from '../../src/app/features/scene/cameraState'; +import { HFOV_MAX_DEG, windowFor } from '../../src/app/features/scene/ridge/view'; +import { paintSky } from '../../src/app/features/scene/ridge/physicalSky'; +import { nightBodies } from '../../src/app/features/scene/ridge/nightBodies'; +import { plateCamera, plateSize, SLACK_MIN_DEG } from '../../src/app/features/scene/ridge/skyTurn'; + +const q = new URLSearchParams(location.search); +/** The main-thread tasks over 50 ms the page saw, ms: `window.longTasks`. */ +const longTasks: number[] = []; +(window as unknown as { longTasks: number[] }).longTasks = longTasks; +try { + new PerformanceObserver((l) => l.getEntries().forEach((e) => longTasks.push(e.duration))).observe({ entryTypes: ['longtask'] }); +} catch { + // No long-task entries in this browser. +} + +async function main() { + const index = await (await fetch('/public/ridge/index.json')).json(); + const dir = `/public/ridge/${index.places[q.get('place') ?? index.default]}/`; + const manifest = parseManifest(await (await fetch(`${dir}manifest.json`)).json(), dir); + const { view } = manifest; + const [az, el] = (q.get('sun') ?? '232:22').split(':').map(Number); + const time = new Date(); + const sun = q.get('sky') === 'night' ? { azimuth: 0, elevation: -30, time } : { azimuth: az, elevation: el, time }; + const physical = makePhysicalSky(sun, 0, view); + const h0 = Number(q.get('h') ?? view.lookAzDeg); + anchor(view.place.id, h0, performance.now()); + setCamera({ mode: 'both', speedDegPerS: Number(q.get('speed') ?? 0), offsetM: 200 }); + const backdrop = createBackdrop(manifest, physical); + await backdrop.ensure({ fromDeg: h0 - HFOV_MAX_DEG, toDeg: h0 + HFOV_MAX_DEG }); + const canvas = document.getElementById('c') as HTMLCanvasElement; + const scene = createRidgeScene({ canvas, tier: 'full', sky: { ...physical.stops, physical }, backdrop, lines: q.get('lines') === '1' }); + const host = document.getElementById('host') as HTMLElement; + // The plate is the host's div whose first child is a canvas (the rig's first child is a div, the rain's has none). + const plate = () => [...host.children].find((c) => c.tagName === 'DIV' && c.firstElementChild?.tagName === 'CANVAS'); + (window as unknown as { live: unknown }).live = { + scene, + hold: (h: number) => hold(h, performance.now()), + pose: () => poseAt(performance.now()), + plate, + /** Mean ms of the main-thread part of painting one plate here (the dome, its pixels and the bodies, not the canvas upscale), over `n` runs. */ + plateCost: (n = 10) => { + const w = innerWidth; + const h = innerHeight; + const win = windowFor(view, w, h); + const { cssW } = plateSize(win, w, h, devicePixelRatio >= 2 ? 2 : 1, SLACK_MIN_DEG); + const t0 = performance.now(); + for (let i = 0; i < n; i += 1) nightBodies(physical, paintSky(physical, cssW, h, plateCamera(win, 214 + i, SLACK_MIN_DEG)), true); + return (performance.now() - t0) / n; + }, + left: () => { + const r = plate()?.getBoundingClientRect(); + return r && { left: r.left, width: r.width }; + }, + }; + document.title = 'ridge live: done'; +} + +main().catch((e) => { + console.error(e); + document.title = `ridge live: failed ${e}`; +}); diff --git a/harness/scene/ridgeSheet.html b/harness/scene/ridgeSheet.html new file mode 100644 index 00000000..9a45924b --- /dev/null +++ b/harness/scene/ridgeSheet.html @@ -0,0 +1,8 @@ + + + +Ridge look sheet + +
+ + diff --git a/harness/scene/ridgeSheet.ts b/harness/scene/ridgeSheet.ts new file mode 100644 index 00000000..440a3a57 --- /dev/null +++ b/harness/scene/ridgeSheet.ts @@ -0,0 +1,279 @@ +// Look sheet for the lit ridge cards: a baked place lit for a grid of sky states (or pinned moments) x looks, each cell a small canvas drawn by the app's own still path +// (`createRidgeScene` at tier 'still', the tiles of the arc round the heading, each card at `cardPose`). Not shipped. +// `?views=214:0:200,0:0:200,100:0:200,214:90:98.2` one column per view `heading:phi:offset` (degrees, degrees, metres) at one sky (`?sky=2`, an index of SKIES, noon by default); a heading +// of 360 or 0 is across north. `&sun=100:6` puts the sun of that sky at azimuth 100, 6 degrees up (the stars are always those of the moment the sheet is opened). The offset is clamped to the place's range as the app does (phi 0: the bake's forward bound, any other phi: the worst-case bound), and a phi other than 0 is the offset-only rotation mode, the camera circling the centre. +// `?place=vienna` the baked place (index.json's default if absent) +// `?preset=all|physical|swiss|poster|painterly|painterly-cel-2|painterly-cel-3|painterly-cel-4` (default all: one row each; painterly is DEFAULT_LOOK); `?looks=` replaces the rows with +// the given `{label, ...partial RidgeLook}` entries (inkKeep and reliefLight merge by key). `?w=480` sets the cell width, 16:9 unless `?h=` gives the height (`?w=375&h=812` is a phone). +// The sky behind a cell is the app's own: `makePhysicalSky` + `paintSky` upscaled smoothly, with the real stars and the moon (`nightBodies`), +// without the sun disc or clouds. Columns are the SKIES below (a sun elevation each, the stars and moon of the moment the sheet was opened), or: +// `?moments=2026-11-24T22:00Z,2026-12-09T20:00Z` explicit UTC moments: the sun, moon and stars are those of the moment, the state follows the sun's elevation +// `?night=1` the night set: the next new moon, first quarter and full moon from today (or from `?from=YYYY-MM-DD`), each at four night hours +// (`?hours=18,21,0,4` UTC), plus deep dusk (sun at -10 degrees) of the evening of the full moon +// `?labels=1` DEBUG: label each constellation chain in frame with its d3-celestial abbreviation (fetched from the source repository at run time; not shipped) +// `?lines=1` constellation lines over the stars, as the Sky menu's hidden toggle does (night cells only) +import { DEFAULT_LOOK, PHYSICAL_LOOK, createLighter } from '../../src/app/features/scene/ridge/lightCards'; +import type { RidgeLook } from '../../src/app/features/scene/ridge/lightCards'; +import { parseIndex, parseManifest } from '../../src/app/features/scene/ridge/manifest'; +import { makePhysicalSky } from '../../src/app/features/scene/ridge/physicalSky'; +import { HFOV_MAX_DEG, windowFor } from '../../src/app/features/scene/ridge/view'; +import { onScreen } from '../../src/app/features/scene/ridge/nightBodies'; +import { createBackdrop } from '../../src/app/features/scene/ridge/Backdrop'; +import { createRidgeScene } from '../../src/app/features/scene/ridge/Ridge'; +import { anchor, hold } from '../../src/app/features/scene/ridge/heading'; +import { setCamera } from '../../src/app/features/scene/cameraState'; +import { sunAt } from '../../src/app/features/scene/ridge/sunAt'; +import { linesAt } from '../../src/app/features/scene/ridge/starCatalogue'; +import { moonPhase } from '../../src/sky/moon.js'; +import { MOMENT_IDS, momentFor } from '../../src/app/features/scene/ridge/skyMoment'; + + +type Override = Partial> & { + label: string; + /** The look the unnamed keys come from (DEFAULT_LOOK, the painterly cel look, if absent). */ + base?: 'physical'; + inkKeep?: Partial; + reliefLight?: Partial; +}; + +interface Column { + label: string; + elevation?: number; + azimuth?: number; + /** A moment: the sun is the real one of it. */ + time?: Date; + /** Where the view faces and the camera stands: heading and phi in degrees, offset in metres. Absent: the rest azimuth, phi 0, the app's default offset. */ + view?: { h: number; phi: number; r: number }; +} + +/** Sun elevation and compass azimuth of each column; the cards look at 214 +- 36. The band of the elevation (`skyBand`) picks the display budget. */ +const SKIES: Column[] = [ + { label: 'dawn 2 deg', elevation: 2, azimuth: 100 }, + { label: 'morning 15 deg', elevation: 15, azimuth: 135 }, + { label: 'noon 55 deg', elevation: 55, azimuth: 190 }, + { label: 'golden 6 deg', elevation: 6, azimuth: 244 }, + { label: 'dusk -3 deg', elevation: -3, azimuth: 262 }, + { label: 'night -30 deg', elevation: -30, azimuth: 0 }, +]; + +/** The art directions, chosen by reasoning, not by eye: Self tunes them (values listed in harness/scene/README.md). */ +const PRESETS: Record = { + physical: { label: 'physical', base: 'physical' }, + swiss: { + label: 'swiss', + base: 'physical', + reliefLight: { mix: 0.7, azimuthDeg: -45, elevationDeg: 40 }, + contrastByDistance: 0.9, + hazeScale: 6, + hazeTint: [0, 0.05, 0.25], + nearWarm: 0.5, + inkScale: 0.6, + }, + poster: { + label: 'poster', + base: 'physical', + reliefWeight: 0.15, + cardToneStep: 0.25, + cardGradient: 0.5, + inkKeep: { edge: 0.25, occlude: 0.9, crease: 1 }, + hazeScale: 4, + }, + painterly: { label: 'painterly (default, cel 3)' }, + 'painterly-cel-2': { label: 'painterly-cel-2', celBands: 2 }, + 'painterly-cel-3': { label: 'painterly-cel-3', celBands: 3 }, + 'painterly-cel-4': { label: 'painterly-cel-4', celBands: 4 }, +}; + +const merge = (o: Override): { label: string; look: RidgeLook } => { + const { label, base: baseName, inkKeep, reliefLight, ...rest } = o; + const base = baseName === 'physical' ? PHYSICAL_LOOK : DEFAULT_LOOK; + return { + label, + look: { + ...base, + ...rest, + inkKeep: { ...base.inkKeep, ...inkKeep }, + reliefLight: { ...base.reliefLight, ...reliefLight }, + }, + }; +}; + +function parseLooks(raw: string): Override[] { + const tries = [() => decodeURIComponent(raw), () => atob(raw.replace(/-/g, '+').replace(/_/g, '/'))]; + for (const t of tries) { + try { + const v = JSON.parse(t()); + if (Array.isArray(v)) return v.map((e, i) => ({ label: `look ${i + 1}`, ...e })); + } catch { + // try the next encoding + } + } + throw new Error('looks= is neither a url-encoded nor a base64 JSON array'); +} + +const q = new URLSearchParams(location.search); + +const HOUR = 3_600_000; +/** The first moment at or after `from` the moon's elongation passes `target` degrees (new 0, first quarter 90, full 180). */ +function nextPhase(from: Date, target: number): Date { + const err = (t: number) => ((moonPhase(t).elongationDeg - target + 540) % 360) - 180; + let t = from.getTime(); + while (!(err(t) < 0 && err(t + HOUR) >= 0)) t += HOUR; + let a = t; + let b = t + HOUR; + for (let i = 0; i < 20; i += 1) { + const m = (a + b) / 2; + if (err(m) < 0) a = m; + else b = m; + } + return new Date(b); +} + +/** The first evening moment (UTC hour steps of 10 minutes from `day`) the sun is at `deg` below the horizon, going down. */ +function sunDownTo(place: Parameters[0], day: Date, deg: number): Date { + let t = Date.UTC(day.getUTCFullYear(), day.getUTCMonth(), day.getUTCDate(), 12); + while (sunAt(place, new Date(t)).elevation > -deg) t += 10 * 60_000; + return new Date(t); +} + +const fmt = (d: Date) => d.toISOString().slice(0, 16).replace('T', ' ') + 'Z'; + +function momentsFrom(params: URLSearchParams, place: Parameters[0]): Column[] | undefined { + const list = params.get('moments'); + if (list) + return list.split(',').map((iso) => { + const time = new Date(iso.trim()); + if (Number.isNaN(time.getTime())) throw new Error(`moments=: ${iso} is not a date`); + return { label: fmt(time), time }; + }); + // `named=1`: the six named moments of the sky menu (`momentFor`, as the app draws them) on both solstices at the place: the look sheet the elevation table is tuned from. + if (params.get('named')) + return ['2026-12-21', '2026-06-21'].flatMap((day) => + MOMENT_IDS.map((id) => { + const time = momentFor({ kind: 'named', id }, place, new Date(`${day}T12:00:00Z`)); + return { label: `${id} ${day.slice(5)} ${fmt(time)}`, time }; + }) + ); + if (!params.get('night')) return undefined; + const from = params.get('from') ? new Date(`${params.get('from')}T00:00:00Z`) : new Date(); + const hours = (params.get('hours') ?? '18,21,0,4').split(',').map(Number); + const cols: Column[] = []; + const phases: [string, number][] = [['new', 0], ['first quarter', 90], ['full', 180]]; + phases.forEach(([name, deg]) => { + const peak = nextPhase(from, deg); + const day = Date.UTC(peak.getUTCFullYear(), peak.getUTCMonth(), peak.getUTCDate()); + hours.forEach((h) => { + // Hours before 12 belong to the night that ends the day of the phase, so the hours run on from the evening. + const time = new Date(day + (h < 12 ? 24 + h : h) * HOUR); + cols.push({ label: `${name} ${fmt(time)}`, time }); + }); + if (deg === 180) cols.push({ label: `deep dusk, full moon ${fmt(sunDownTo(place, peak, 10))}`, time: sunDownTo(place, peak, 10) }); + }); + return cols; +} +/** `?views=h:phi:r,...`: one column per view, all at the sky `?sky=` (default noon), whose sun `?sun=az:el` may put elsewhere (compass degrees, degrees above the horizon). */ +function viewsFrom(params: URLSearchParams): Column[] | undefined { + const list = params.get('views'); + if (!list) return undefined; + const [az, el] = (params.get('sun') ?? '').split(':').map(Number); + const sky = { ...SKIES[Number(params.get('sky') ?? 2)], ...(Number.isFinite(az) && Number.isFinite(el) ? { azimuth: az, elevation: el } : {}) }; + return list.split(',').map((v) => { + const [h, phi, r] = v.split(':').map(Number); + return { ...sky, label: `h ${h} phi ${phi} r ${r}`, view: { h, phi, r } }; + }); +} +const preset = q.get('preset'); +const pinned = q.get('moments') || q.get('night'); +const rows = (q.get('looks') + ? parseLooks(q.get('looks') as string) + : preset && preset !== 'all' + ? [PRESETS[preset] ?? PRESETS.physical] + : pinned + ? [PRESETS.painterly] // a night set is read in the default look unless a preset or looks say otherwise + : Object.values(PRESETS) +).map(merge); +const withLines = q.get('lines') === '1'; +const LINES_JSON = 'https://raw.githubusercontent.com/ofrohn/d3-celestial/master/data/constellations.lines.json'; +/** Debug: the constellation id of each packed chain, in the generator's order (feature by feature, chain by chain). */ +async function chainIds(): Promise { + const gj = await (await fetch(LINES_JSON)).json(); + return gj.features.flatMap((f: { id: string; geometry: { coordinates: unknown[] } }) => f.geometry.coordinates.map(() => f.id)); +} +const W = Number(q.get('w') ?? 480); +const H = q.get('h') ? Number(q.get('h')) : Math.round((W * 9) / 16); +const root = document.getElementById('sheet') as HTMLElement; + +async function main() { + const index = parseIndex(await (await fetch('/public/ridge/index.json')).json()); + const DIR = `/public/ridge/${index.places[q.get('place') ?? index.default] ?? index.places[index.default]}/`; + const manifest = parseManifest(await (await fetch(`${DIR}manifest.json`)).json(), DIR); + const { view } = manifest; + const win = windowFor(view, W, H); + const now = new Date(); + const columns = viewsFrom(q) ?? momentsFrom(q, view.place) ?? SKIES; + const ids = q.get('labels') === '1' ? await chainIds() : undefined; + + const table = document.createElement('table'); + table.style.borderSpacing = '4px'; + root.append(table); + const head = table.insertRow(); + head.insertCell(); + columns.forEach((c) => (head.insertCell().textContent = c.label)); + const tr = rows.map((r) => { + const row = table.insertRow(); + row.insertCell().textContent = r.label; + return row; + }); + + for (const col of columns) { + const time = col.time ?? now; + const sun = + col.time !== undefined + ? sunAt(view.place, col.time) + : { elevation: col.elevation as number, azimuth: col.azimuth as number, time }; + const physical = makePhysicalSky(sun, 0, view); + const sky = { ...physical.stops, physical }; + const v = col.view ?? { h: view.lookAzDeg, phi: 0, r: 200 }; + + for (let r = 0; r < rows.length; r += 1) { + // A host as the page has one: a positioned box of the cell's size holding the canvas the scene paints. + const host = document.createElement('div'); + Object.assign(host.style, { position: 'relative', width: `${W}px`, height: `${H}px`, overflow: 'hidden' }); + const cell = document.createElement('canvas'); + Object.assign(cell.style, { position: 'absolute', left: '0', top: '0', width: '100%', height: '100%' }); + host.append(cell); + tr[r].insertCell().append(host); + + // The heading owner as the app leaves it: this view's heading, the camera on its circle at phi (offset-only rotation), the offset the viewer chose. + const t0 = performance.now() - 3_600_000; + anchor(`sheet-${manifest.bakeId}-${columns.indexOf(col)}-${r}`, v.h, t0); // a key of its own: every cell starts from phi 0 + setCamera({ mode: 'offset', speedDegPerS: 1, offsetM: v.r }, t0); // the offset-only rotation mode for phi seconds at 1 degree per second ... + hold(v.h, t0 + v.phi * 1000); // ... then the view is held at h: the mode is still, the camera stays at phi (phi 0 is the camera on its heading) + + const backdrop = createBackdrop(manifest, physical, { lighter: (m, s) => createLighter(m, s, rows[r].look) }); + await backdrop.ensure({ fromDeg: v.h - HFOV_MAX_DEG, toDeg: v.h + HFOV_MAX_DEG }); + const scene = createRidgeScene({ canvas: cell, tier: 'still', sky, backdrop, lines: withLines }); + scene?.dispose(); + + if (ids) { + // Debug labels: each chain's id at the mean of its vertices that lie in the frame. + const ctx = cell.getContext('2d') as CanvasRenderingContext2D; + ctx.font = '11px monospace'; + ctx.fillStyle = '#ffd24a'; + linesAt(physical.sun.time, view.place.lat, view.place.lon).forEach((chain, i) => { + const pts = chain.map((p) => onScreen(win.camera, p.azimuth, p.elevation)).filter((a) => a.x >= 0 && a.x <= 1 && a.y >= 0 && a.y <= 1); + if (!pts.length) return; + const mx = pts.reduce((a, p) => a + p.x, 0) / pts.length; + const my = pts.reduce((a, p) => a + p.y, 0) / pts.length; + ctx.fillText(`${ids[i]} ${pts.length}/${chain.length}`, mx * W, my * H); + }); + } + } + } + document.title = 'ridge look sheet: done'; +} + +main().catch((e) => { + console.error(e); + root.textContent = `ridge look sheet failed: ${e}`; +}); diff --git a/package-lock.json b/package-lock.json index 947eef2b..1915ec32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -86,6 +86,7 @@ "@types/ua-parser-js": "0.7.36", "@typescript-eslint/eslint-plugin": "5.46.1", "@typescript-eslint/parser": "5.46.1", + "@vanilla-extract/integration": "6.5.0", "@vitejs/plugin-react": "4.2.0", "buffer": "6.0.3", "cz-conventional-changelog": "3.3.0", @@ -5095,6 +5096,7 @@ "version": "6.5.0", "resolved": "https://registry.npmjs.org/@vanilla-extract/integration/-/integration-6.5.0.tgz", "integrity": "sha512-E2YcfO8vA+vs+ua+gpvy1HRqvgWbI+MTlUpxA8FvatOvybuNcWAY0CKwQ/Gpj7rswYKtC6C7+xw33emM6/ImdQ==", + "license": "MIT", "dependencies": { "@babel/core": "^7.20.7", "@babel/plugin-syntax-typescript": "^7.20.0", diff --git a/package.json b/package.json index 1aebfd94..69f589c6 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,7 @@ "@types/ua-parser-js": "0.7.36", "@typescript-eslint/eslint-plugin": "5.46.1", "@typescript-eslint/parser": "5.46.1", + "@vanilla-extract/integration": "6.5.0", "@vitejs/plugin-react": "4.2.0", "buffer": "6.0.3", "cz-conventional-changelog": "3.3.0", diff --git a/preview-demo/poses/README.md b/preview-demo/poses/README.md index a1287f2d..2142a4c2 100644 --- a/preview-demo/poses/README.md +++ b/preview-demo/poses/README.md @@ -1,6 +1,6 @@ # Demo pose thumbnails -These 24 PNGs (about 200 KB, 160 px wide, palette-quantised) are downscaled copies of GameCult's own +These 36 PNGs (eureka, void and nibu, 12 each; about 1.8 MB, up to 480 px wide, palette-quantised) are downscaled copies of GameCult's own Persona art from `/opt/commons/cast-art/poses`. That directory carries no provenance or licence note: the image model that made the art and the terms it was made under are not recorded. diff --git a/public/dings/README.md b/public/dings/README.md new file mode 100644 index 00000000..b36e1fb7 --- /dev/null +++ b/public/dings/README.md @@ -0,0 +1,17 @@ +# Dings + +Pre-rendered earcons, served at `public/dings/` and read at runtime by `src/app/features/dings`. +Aqua renders the clips; nothing here is synthesised in the browser. + + dings/manifest.json + dings/senders//.ogg + dings/neutral/.ogg + +`manifest.json` is `{ "neutral": { : "" }, "senders": { : { : "" } } }` +with motif one of `mention`, `dm`, `message`, `invite`; paths are relative to this folder, `.ogg` or `.mp3`. +A sender's own clip wins, else the neutral clip, else silence. Without a `manifest.json` the client keeps +its stock notification sounds; once one exists, a motif with no clip is silent. + +The set here is Aqua's v4 (AquaSynth merge 21e83ec, staged at minds.gamecult.org/aqua/dings-voices-dd9be66), +Nibu on proposal 3 (8 kHz 5-bit smoothed sine) for all four events. Nobody has heard it. The client plays none of it unless the +client config sets `"dings": { "enabled": true }` (default off, as in `config.json`). diff --git a/public/dings/manifest.json b/public/dings/manifest.json new file mode 100644 index 00000000..7096d195 --- /dev/null +++ b/public/dings/manifest.json @@ -0,0 +1,58 @@ +{ + "neutral": { + "mention": "neutral/mention.ogg", + "dm": "neutral/dm.ogg", + "message": "neutral/message.ogg", + "invite": "neutral/invite.ogg" + }, + "senders": { + "aqua": { + "mention": "senders/aqua/mention.ogg", + "dm": "senders/aqua/dm.ogg", + "message": "senders/aqua/message.ogg", + "invite": "senders/aqua/invite.ogg" + }, + "eureka": { + "mention": "senders/eureka/mention.ogg", + "dm": "senders/eureka/dm.ogg", + "message": "senders/eureka/message.ogg", + "invite": "senders/eureka/invite.ogg" + }, + "heimdall": { + "mention": "senders/heimdall/mention.ogg", + "dm": "senders/heimdall/dm.ogg", + "message": "senders/heimdall/message.ogg", + "invite": "senders/heimdall/invite.ogg" + }, + "kiko": { + "mention": "senders/kiko/mention.ogg", + "dm": "senders/kiko/dm.ogg", + "message": "senders/kiko/message.ogg", + "invite": "senders/kiko/invite.ogg" + }, + "libby": { + "mention": "senders/libby/mention.ogg", + "dm": "senders/libby/dm.ogg", + "message": "senders/libby/message.ogg", + "invite": "senders/libby/invite.ogg" + }, + "nibu": { + "mention": "senders/nibu/mention.ogg", + "dm": "senders/nibu/dm.ogg", + "message": "senders/nibu/message.ogg", + "invite": "senders/nibu/invite.ogg" + }, + "void": { + "mention": "senders/void/mention.ogg", + "dm": "senders/void/dm.ogg", + "message": "senders/void/message.ogg", + "invite": "senders/void/invite.ogg" + }, + "weksa": { + "mention": "senders/weksa/mention.ogg", + "dm": "senders/weksa/dm.ogg", + "message": "senders/weksa/message.ogg", + "invite": "senders/weksa/invite.ogg" + } + } +} \ No newline at end of file diff --git a/public/dings/neutral/dm.ogg b/public/dings/neutral/dm.ogg new file mode 100644 index 00000000..8f7a269e Binary files /dev/null and b/public/dings/neutral/dm.ogg differ diff --git a/public/dings/neutral/invite.ogg b/public/dings/neutral/invite.ogg new file mode 100644 index 00000000..8def2b77 Binary files /dev/null and b/public/dings/neutral/invite.ogg differ diff --git a/public/dings/neutral/mention.ogg b/public/dings/neutral/mention.ogg new file mode 100644 index 00000000..a02084bc Binary files /dev/null and b/public/dings/neutral/mention.ogg differ diff --git a/public/dings/neutral/message.ogg b/public/dings/neutral/message.ogg new file mode 100644 index 00000000..f7e17fd4 Binary files /dev/null and b/public/dings/neutral/message.ogg differ diff --git a/public/dings/senders/aqua/dm.ogg b/public/dings/senders/aqua/dm.ogg new file mode 100644 index 00000000..5a235546 Binary files /dev/null and b/public/dings/senders/aqua/dm.ogg differ diff --git a/public/dings/senders/aqua/invite.ogg b/public/dings/senders/aqua/invite.ogg new file mode 100644 index 00000000..f349e735 Binary files /dev/null and b/public/dings/senders/aqua/invite.ogg differ diff --git a/public/dings/senders/aqua/mention.ogg b/public/dings/senders/aqua/mention.ogg new file mode 100644 index 00000000..67d36911 Binary files /dev/null and b/public/dings/senders/aqua/mention.ogg differ diff --git a/public/dings/senders/aqua/message.ogg b/public/dings/senders/aqua/message.ogg new file mode 100644 index 00000000..3704f55a Binary files /dev/null and b/public/dings/senders/aqua/message.ogg differ diff --git a/public/dings/senders/eureka/dm.ogg b/public/dings/senders/eureka/dm.ogg new file mode 100644 index 00000000..57024fbe Binary files /dev/null and b/public/dings/senders/eureka/dm.ogg differ diff --git a/public/dings/senders/eureka/invite.ogg b/public/dings/senders/eureka/invite.ogg new file mode 100644 index 00000000..d6a6e328 Binary files /dev/null and b/public/dings/senders/eureka/invite.ogg differ diff --git a/public/dings/senders/eureka/mention.ogg b/public/dings/senders/eureka/mention.ogg new file mode 100644 index 00000000..c4085fae Binary files /dev/null and b/public/dings/senders/eureka/mention.ogg differ diff --git a/public/dings/senders/eureka/message.ogg b/public/dings/senders/eureka/message.ogg new file mode 100644 index 00000000..6cd340ce Binary files /dev/null and b/public/dings/senders/eureka/message.ogg differ diff --git a/public/dings/senders/heimdall/dm.ogg b/public/dings/senders/heimdall/dm.ogg new file mode 100644 index 00000000..145e8853 Binary files /dev/null and b/public/dings/senders/heimdall/dm.ogg differ diff --git a/public/dings/senders/heimdall/invite.ogg b/public/dings/senders/heimdall/invite.ogg new file mode 100644 index 00000000..98403c21 Binary files /dev/null and b/public/dings/senders/heimdall/invite.ogg differ diff --git a/public/dings/senders/heimdall/mention.ogg b/public/dings/senders/heimdall/mention.ogg new file mode 100644 index 00000000..5a39a98c Binary files /dev/null and b/public/dings/senders/heimdall/mention.ogg differ diff --git a/public/dings/senders/heimdall/message.ogg b/public/dings/senders/heimdall/message.ogg new file mode 100644 index 00000000..068e7198 Binary files /dev/null and b/public/dings/senders/heimdall/message.ogg differ diff --git a/public/dings/senders/kiko/dm.ogg b/public/dings/senders/kiko/dm.ogg new file mode 100644 index 00000000..7c35b072 Binary files /dev/null and b/public/dings/senders/kiko/dm.ogg differ diff --git a/public/dings/senders/kiko/invite.ogg b/public/dings/senders/kiko/invite.ogg new file mode 100644 index 00000000..f8eff1a1 Binary files /dev/null and b/public/dings/senders/kiko/invite.ogg differ diff --git a/public/dings/senders/kiko/mention.ogg b/public/dings/senders/kiko/mention.ogg new file mode 100644 index 00000000..12cccf29 Binary files /dev/null and b/public/dings/senders/kiko/mention.ogg differ diff --git a/public/dings/senders/kiko/message.ogg b/public/dings/senders/kiko/message.ogg new file mode 100644 index 00000000..e0f6e885 Binary files /dev/null and b/public/dings/senders/kiko/message.ogg differ diff --git a/public/dings/senders/libby/dm.ogg b/public/dings/senders/libby/dm.ogg new file mode 100644 index 00000000..1316c196 Binary files /dev/null and b/public/dings/senders/libby/dm.ogg differ diff --git a/public/dings/senders/libby/invite.ogg b/public/dings/senders/libby/invite.ogg new file mode 100644 index 00000000..4b92a0b7 Binary files /dev/null and b/public/dings/senders/libby/invite.ogg differ diff --git a/public/dings/senders/libby/mention.ogg b/public/dings/senders/libby/mention.ogg new file mode 100644 index 00000000..f335c2c9 Binary files /dev/null and b/public/dings/senders/libby/mention.ogg differ diff --git a/public/dings/senders/libby/message.ogg b/public/dings/senders/libby/message.ogg new file mode 100644 index 00000000..432f8623 Binary files /dev/null and b/public/dings/senders/libby/message.ogg differ diff --git a/public/dings/senders/nibu/dm.ogg b/public/dings/senders/nibu/dm.ogg new file mode 100644 index 00000000..2965cf53 Binary files /dev/null and b/public/dings/senders/nibu/dm.ogg differ diff --git a/public/dings/senders/nibu/invite.ogg b/public/dings/senders/nibu/invite.ogg new file mode 100644 index 00000000..57e54c47 Binary files /dev/null and b/public/dings/senders/nibu/invite.ogg differ diff --git a/public/dings/senders/nibu/mention.ogg b/public/dings/senders/nibu/mention.ogg new file mode 100644 index 00000000..5f6d2dfc Binary files /dev/null and b/public/dings/senders/nibu/mention.ogg differ diff --git a/public/dings/senders/nibu/message.ogg b/public/dings/senders/nibu/message.ogg new file mode 100644 index 00000000..a9294354 Binary files /dev/null and b/public/dings/senders/nibu/message.ogg differ diff --git a/public/dings/senders/void/dm.ogg b/public/dings/senders/void/dm.ogg new file mode 100644 index 00000000..d09a7a94 Binary files /dev/null and b/public/dings/senders/void/dm.ogg differ diff --git a/public/dings/senders/void/invite.ogg b/public/dings/senders/void/invite.ogg new file mode 100644 index 00000000..ed46cbb9 Binary files /dev/null and b/public/dings/senders/void/invite.ogg differ diff --git a/public/dings/senders/void/mention.ogg b/public/dings/senders/void/mention.ogg new file mode 100644 index 00000000..b6295e00 Binary files /dev/null and b/public/dings/senders/void/mention.ogg differ diff --git a/public/dings/senders/void/message.ogg b/public/dings/senders/void/message.ogg new file mode 100644 index 00000000..da1f0a16 Binary files /dev/null and b/public/dings/senders/void/message.ogg differ diff --git a/public/dings/senders/weksa/dm.ogg b/public/dings/senders/weksa/dm.ogg new file mode 100644 index 00000000..37b5f990 Binary files /dev/null and b/public/dings/senders/weksa/dm.ogg differ diff --git a/public/dings/senders/weksa/invite.ogg b/public/dings/senders/weksa/invite.ogg new file mode 100644 index 00000000..1c401418 Binary files /dev/null and b/public/dings/senders/weksa/invite.ogg differ diff --git a/public/dings/senders/weksa/mention.ogg b/public/dings/senders/weksa/mention.ogg new file mode 100644 index 00000000..98fa0f75 Binary files /dev/null and b/public/dings/senders/weksa/mention.ogg differ diff --git a/public/dings/senders/weksa/message.ogg b/public/dings/senders/weksa/message.ogg new file mode 100644 index 00000000..f552996b Binary files /dev/null and b/public/dings/senders/weksa/message.ogg differ diff --git a/public/favicon.ico b/public/favicon.ico index cfce9943..bda9855c 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/manifest.json b/public/manifest.json index ef0a3510..c28e7b41 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,12 +1,13 @@ { "name": "Ratatoskr", "short_name": "Ratatoskr", + "id": "/", "description": "GameCult's Matrix client", "dir": "auto", "lang": "en-US", "display": "standalone", - "orientation": "portrait", "start_url": "./", + "scope": "./", "background_color": "#07111a", "theme_color": "#07111a", "icons": [ @@ -54,6 +55,12 @@ "src": "./public/android/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" + }, + { + "src": "./public/android/android-chrome-maskable-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" } ] } diff --git a/public/res/android/android-chrome-144x144.png b/public/res/android/android-chrome-144x144.png index d76ed356..2dfde532 100644 Binary files a/public/res/android/android-chrome-144x144.png and b/public/res/android/android-chrome-144x144.png differ diff --git a/public/res/android/android-chrome-192x192.png b/public/res/android/android-chrome-192x192.png index 7689b6d0..d696f20f 100644 Binary files a/public/res/android/android-chrome-192x192.png and b/public/res/android/android-chrome-192x192.png differ diff --git a/public/res/android/android-chrome-256x256.png b/public/res/android/android-chrome-256x256.png index 2f61f46b..07e5cbde 100644 Binary files a/public/res/android/android-chrome-256x256.png and b/public/res/android/android-chrome-256x256.png differ diff --git a/public/res/android/android-chrome-36x36.png b/public/res/android/android-chrome-36x36.png index 91b26af2..3e1babf7 100644 Binary files a/public/res/android/android-chrome-36x36.png and b/public/res/android/android-chrome-36x36.png differ diff --git a/public/res/android/android-chrome-384x384.png b/public/res/android/android-chrome-384x384.png index ab06a074..61e2afe4 100644 Binary files a/public/res/android/android-chrome-384x384.png and b/public/res/android/android-chrome-384x384.png differ diff --git a/public/res/android/android-chrome-48x48.png b/public/res/android/android-chrome-48x48.png index f8fafcd9..a5ba15e6 100644 Binary files a/public/res/android/android-chrome-48x48.png and b/public/res/android/android-chrome-48x48.png differ diff --git a/public/res/android/android-chrome-512x512.png b/public/res/android/android-chrome-512x512.png index 2c584f3d..e979125e 100644 Binary files a/public/res/android/android-chrome-512x512.png and b/public/res/android/android-chrome-512x512.png differ diff --git a/public/res/android/android-chrome-72x72.png b/public/res/android/android-chrome-72x72.png index 32d5d516..7aa6caab 100644 Binary files a/public/res/android/android-chrome-72x72.png and b/public/res/android/android-chrome-72x72.png differ diff --git a/public/res/android/android-chrome-96x96.png b/public/res/android/android-chrome-96x96.png index 5da68e4b..5ab44fe9 100644 Binary files a/public/res/android/android-chrome-96x96.png and b/public/res/android/android-chrome-96x96.png differ diff --git a/public/res/android/android-chrome-maskable-512x512.png b/public/res/android/android-chrome-maskable-512x512.png new file mode 100644 index 00000000..211a0650 Binary files /dev/null and b/public/res/android/android-chrome-maskable-512x512.png differ diff --git a/public/res/apple/apple-touch-icon-114x114.png b/public/res/apple/apple-touch-icon-114x114.png index 1ff43a12..3a08841c 100644 Binary files a/public/res/apple/apple-touch-icon-114x114.png and b/public/res/apple/apple-touch-icon-114x114.png differ diff --git a/public/res/apple/apple-touch-icon-120x120.png b/public/res/apple/apple-touch-icon-120x120.png index d10efb31..8443c98f 100644 Binary files a/public/res/apple/apple-touch-icon-120x120.png and b/public/res/apple/apple-touch-icon-120x120.png differ diff --git a/public/res/apple/apple-touch-icon-144x144.png b/public/res/apple/apple-touch-icon-144x144.png index d76ed356..2dfde532 100644 Binary files a/public/res/apple/apple-touch-icon-144x144.png and b/public/res/apple/apple-touch-icon-144x144.png differ diff --git a/public/res/apple/apple-touch-icon-152x152.png b/public/res/apple/apple-touch-icon-152x152.png index 76590ddf..8ab7ad50 100644 Binary files a/public/res/apple/apple-touch-icon-152x152.png and b/public/res/apple/apple-touch-icon-152x152.png differ diff --git a/public/res/apple/apple-touch-icon-167x167.png b/public/res/apple/apple-touch-icon-167x167.png index 3f26f91b..963c024d 100644 Binary files a/public/res/apple/apple-touch-icon-167x167.png and b/public/res/apple/apple-touch-icon-167x167.png differ diff --git a/public/res/apple/apple-touch-icon-180x180.png b/public/res/apple/apple-touch-icon-180x180.png index ed498370..631741a0 100644 Binary files a/public/res/apple/apple-touch-icon-180x180.png and b/public/res/apple/apple-touch-icon-180x180.png differ diff --git a/public/res/apple/apple-touch-icon-57x57.png b/public/res/apple/apple-touch-icon-57x57.png index 2e2081f5..5cad75b2 100644 Binary files a/public/res/apple/apple-touch-icon-57x57.png and b/public/res/apple/apple-touch-icon-57x57.png differ diff --git a/public/res/apple/apple-touch-icon-60x60.png b/public/res/apple/apple-touch-icon-60x60.png index 87c8fc2b..6303a2eb 100644 Binary files a/public/res/apple/apple-touch-icon-60x60.png and b/public/res/apple/apple-touch-icon-60x60.png differ diff --git a/public/res/apple/apple-touch-icon-72x72.png b/public/res/apple/apple-touch-icon-72x72.png index 32d5d516..7aa6caab 100644 Binary files a/public/res/apple/apple-touch-icon-72x72.png and b/public/res/apple/apple-touch-icon-72x72.png differ diff --git a/public/res/apple/apple-touch-icon-76x76.png b/public/res/apple/apple-touch-icon-76x76.png index 1164b72d..1448098d 100644 Binary files a/public/res/apple/apple-touch-icon-76x76.png and b/public/res/apple/apple-touch-icon-76x76.png differ diff --git a/public/res/svg/ratatoskr-favicon-highlight.svg b/public/res/svg/ratatoskr-favicon-highlight.svg new file mode 100644 index 00000000..f9a95e82 --- /dev/null +++ b/public/res/svg/ratatoskr-favicon-highlight.svg @@ -0,0 +1 @@ + diff --git a/public/res/svg/ratatoskr-favicon-unread.svg b/public/res/svg/ratatoskr-favicon-unread.svg new file mode 100644 index 00000000..f5bcb7d8 --- /dev/null +++ b/public/res/svg/ratatoskr-favicon-unread.svg @@ -0,0 +1 @@ + diff --git a/public/res/svg/ratatoskr-favicon.svg b/public/res/svg/ratatoskr-favicon.svg new file mode 100644 index 00000000..0c7cc393 --- /dev/null +++ b/public/res/svg/ratatoskr-favicon.svg @@ -0,0 +1 @@ + diff --git a/public/res/svg/ratatoskr-highlight.svg b/public/res/svg/ratatoskr-highlight.svg deleted file mode 100644 index 661442d4..00000000 --- a/public/res/svg/ratatoskr-highlight.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/public/res/svg/ratatoskr-unread.svg b/public/res/svg/ratatoskr-unread.svg deleted file mode 100644 index 69a08c95..00000000 --- a/public/res/svg/ratatoskr-unread.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/public/res/svg/ratatoskr.svg b/public/res/svg/ratatoskr.svg index 3ca98122..1092ffc4 100644 --- a/public/res/svg/ratatoskr.svg +++ b/public/res/svg/ratatoskr.svg @@ -1,15 +1 @@ - - - - - - - - - - - - - - - + diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t00-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t00-colour.webp new file mode 100644 index 00000000..c3893ca5 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t00-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t00-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t00-geometry.webp new file mode 100644 index 00000000..5891ae4b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t00-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t01-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t01-colour.webp new file mode 100644 index 00000000..5fd85171 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t01-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t01-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t01-geometry.webp new file mode 100644 index 00000000..194baac8 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t01-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t02-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t02-colour.webp new file mode 100644 index 00000000..e23b1c6f Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t02-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t02-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t02-geometry.webp new file mode 100644 index 00000000..266918c4 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t02-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t03-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t03-colour.webp new file mode 100644 index 00000000..ae17bebc Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t03-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t03-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t03-geometry.webp new file mode 100644 index 00000000..7e425e50 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t03-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t04-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t04-colour.webp new file mode 100644 index 00000000..6234b1cf Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t04-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t04-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t04-geometry.webp new file mode 100644 index 00000000..c75eaa59 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t04-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t05-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t05-colour.webp new file mode 100644 index 00000000..eec0a22d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t05-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t05-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t05-geometry.webp new file mode 100644 index 00000000..d1267cca Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t05-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t06-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t06-colour.webp new file mode 100644 index 00000000..2d073a4e Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t06-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t06-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t06-geometry.webp new file mode 100644 index 00000000..527adc45 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t06-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t07-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t07-colour.webp new file mode 100644 index 00000000..7a77c63b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t07-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t07-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t07-geometry.webp new file mode 100644 index 00000000..f1b332f1 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t07-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t08-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t08-colour.webp new file mode 100644 index 00000000..e8ddebc5 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t08-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t08-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t08-geometry.webp new file mode 100644 index 00000000..5a76a3cb Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t08-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t09-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t09-colour.webp new file mode 100644 index 00000000..dd585bf5 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t09-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t09-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t09-geometry.webp new file mode 100644 index 00000000..6b101d8c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t09-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t10-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t10-colour.webp new file mode 100644 index 00000000..174ad822 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t10-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t10-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t10-geometry.webp new file mode 100644 index 00000000..fe9bee3b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t10-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t11-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t11-colour.webp new file mode 100644 index 00000000..554261c4 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t11-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t11-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t11-geometry.webp new file mode 100644 index 00000000..d3acc133 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t11-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t12-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t12-colour.webp new file mode 100644 index 00000000..3119c226 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t12-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t12-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t12-geometry.webp new file mode 100644 index 00000000..ee2d2581 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t12-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t13-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t13-colour.webp new file mode 100644 index 00000000..73e6d523 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t13-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t13-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t13-geometry.webp new file mode 100644 index 00000000..e3ed014b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t13-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t14-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t14-colour.webp new file mode 100644 index 00000000..ee04ab30 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t14-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t14-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t14-geometry.webp new file mode 100644 index 00000000..b80bef92 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t14-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t15-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t15-colour.webp new file mode 100644 index 00000000..b790a947 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t15-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t15-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t15-geometry.webp new file mode 100644 index 00000000..71562790 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t15-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t16-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t16-colour.webp new file mode 100644 index 00000000..56f4fbf9 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t16-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t16-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t16-geometry.webp new file mode 100644 index 00000000..134352e2 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t16-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t17-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t17-colour.webp new file mode 100644 index 00000000..fb827d7d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t17-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t17-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t17-geometry.webp new file mode 100644 index 00000000..cda9a5b8 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t17-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t18-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t18-colour.webp new file mode 100644 index 00000000..192dc734 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t18-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t18-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t18-geometry.webp new file mode 100644 index 00000000..db3299d4 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t18-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t19-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t19-colour.webp new file mode 100644 index 00000000..72979ee6 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t19-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t19-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t19-geometry.webp new file mode 100644 index 00000000..60cce1e4 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t19-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t20-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t20-colour.webp new file mode 100644 index 00000000..2fa78159 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t20-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t20-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t20-geometry.webp new file mode 100644 index 00000000..b6e021e4 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t20-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t21-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t21-colour.webp new file mode 100644 index 00000000..c4ae8082 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t21-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t21-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t21-geometry.webp new file mode 100644 index 00000000..2e8d73c1 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t21-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t22-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t22-colour.webp new file mode 100644 index 00000000..9c534ff2 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t22-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t22-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t22-geometry.webp new file mode 100644 index 00000000..0bc194cb Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t22-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t23-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t23-colour.webp new file mode 100644 index 00000000..984c3986 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t23-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t23-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t23-geometry.webp new file mode 100644 index 00000000..bd3ae087 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t23-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t24-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t24-colour.webp new file mode 100644 index 00000000..99940492 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t24-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t24-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t24-geometry.webp new file mode 100644 index 00000000..7ecf00b9 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t24-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t25-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t25-colour.webp new file mode 100644 index 00000000..73bd10bd Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t25-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t25-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t25-geometry.webp new file mode 100644 index 00000000..30d7765a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t25-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t26-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t26-colour.webp new file mode 100644 index 00000000..a727fd4e Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t26-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t26-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t26-geometry.webp new file mode 100644 index 00000000..8492946e Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t26-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t27-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t27-colour.webp new file mode 100644 index 00000000..f711d597 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t27-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t27-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t27-geometry.webp new file mode 100644 index 00000000..e82b6777 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t27-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t28-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t28-colour.webp new file mode 100644 index 00000000..a2fdf8f3 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t28-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t28-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t28-geometry.webp new file mode 100644 index 00000000..00af24b3 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t28-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t29-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t29-colour.webp new file mode 100644 index 00000000..5d03874e Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t29-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t29-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t29-geometry.webp new file mode 100644 index 00000000..e9cb8e9c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t29-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t30-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t30-colour.webp new file mode 100644 index 00000000..8ed8439b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t30-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t30-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t30-geometry.webp new file mode 100644 index 00000000..9230d8a9 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t30-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t31-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t31-colour.webp new file mode 100644 index 00000000..9718a7cb Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t31-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-0-t31-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-0-t31-geometry.webp new file mode 100644 index 00000000..b6ecf444 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-0-t31-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t00-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t00-colour.webp new file mode 100644 index 00000000..865800a1 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t00-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t00-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t00-geometry.webp new file mode 100644 index 00000000..bdfa32a2 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t00-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t01-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t01-colour.webp new file mode 100644 index 00000000..7832010e Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t01-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t01-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t01-geometry.webp new file mode 100644 index 00000000..db8c3fdb Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t01-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t02-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t02-colour.webp new file mode 100644 index 00000000..990440d4 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t02-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t02-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t02-geometry.webp new file mode 100644 index 00000000..f1c399c6 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t02-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t03-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t03-colour.webp new file mode 100644 index 00000000..691e899b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t03-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t03-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t03-geometry.webp new file mode 100644 index 00000000..9686a023 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t03-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t04-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t04-colour.webp new file mode 100644 index 00000000..f2fd046f Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t04-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t04-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t04-geometry.webp new file mode 100644 index 00000000..20c731a9 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t04-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t05-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t05-colour.webp new file mode 100644 index 00000000..79109c67 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t05-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t05-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t05-geometry.webp new file mode 100644 index 00000000..d4d430fe Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t05-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t06-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t06-colour.webp new file mode 100644 index 00000000..c291b832 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t06-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t06-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t06-geometry.webp new file mode 100644 index 00000000..24053679 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t06-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t07-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t07-colour.webp new file mode 100644 index 00000000..e1af53b0 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t07-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t07-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t07-geometry.webp new file mode 100644 index 00000000..5ba0bffd Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t07-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t08-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t08-colour.webp new file mode 100644 index 00000000..0a5dc617 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t08-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t08-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t08-geometry.webp new file mode 100644 index 00000000..4251abdc Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t08-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t09-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t09-colour.webp new file mode 100644 index 00000000..cd35d1c2 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t09-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t09-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t09-geometry.webp new file mode 100644 index 00000000..40de3a02 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t09-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t10-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t10-colour.webp new file mode 100644 index 00000000..0f8f7483 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t10-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t10-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t10-geometry.webp new file mode 100644 index 00000000..28f5c6d6 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t10-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t11-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t11-colour.webp new file mode 100644 index 00000000..415c3bcb Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t11-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t11-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t11-geometry.webp new file mode 100644 index 00000000..0e49c504 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t11-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t12-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t12-colour.webp new file mode 100644 index 00000000..bd141f76 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t12-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t12-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t12-geometry.webp new file mode 100644 index 00000000..f33dfb18 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t12-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t13-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t13-colour.webp new file mode 100644 index 00000000..5f72df6a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t13-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t13-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t13-geometry.webp new file mode 100644 index 00000000..bebdcae6 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t13-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t14-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t14-colour.webp new file mode 100644 index 00000000..d6411b5f Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t14-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t14-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t14-geometry.webp new file mode 100644 index 00000000..b9ce811a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t14-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t15-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t15-colour.webp new file mode 100644 index 00000000..9e851859 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t15-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t15-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t15-geometry.webp new file mode 100644 index 00000000..046d6462 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t15-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t16-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t16-colour.webp new file mode 100644 index 00000000..7c992076 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t16-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t16-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t16-geometry.webp new file mode 100644 index 00000000..91ccbf70 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t16-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t17-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t17-colour.webp new file mode 100644 index 00000000..54bb3e72 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t17-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t17-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t17-geometry.webp new file mode 100644 index 00000000..a6267d64 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t17-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t18-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t18-colour.webp new file mode 100644 index 00000000..c391c1d6 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t18-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t18-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t18-geometry.webp new file mode 100644 index 00000000..58901a4a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t18-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t19-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t19-colour.webp new file mode 100644 index 00000000..231da848 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t19-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t19-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t19-geometry.webp new file mode 100644 index 00000000..6da6973a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t19-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t20-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t20-colour.webp new file mode 100644 index 00000000..8dba2bfa Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t20-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t20-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t20-geometry.webp new file mode 100644 index 00000000..03d8361c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t20-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t21-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t21-colour.webp new file mode 100644 index 00000000..3f3a1b38 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t21-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t21-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t21-geometry.webp new file mode 100644 index 00000000..01e0eb34 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t21-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t22-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t22-colour.webp new file mode 100644 index 00000000..f9fa0382 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t22-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t22-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t22-geometry.webp new file mode 100644 index 00000000..fa374bab Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t22-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t23-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t23-colour.webp new file mode 100644 index 00000000..cb623ab0 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t23-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t23-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t23-geometry.webp new file mode 100644 index 00000000..7e2b271c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t23-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t24-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t24-colour.webp new file mode 100644 index 00000000..9f76e74f Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t24-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t24-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t24-geometry.webp new file mode 100644 index 00000000..50caa14d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t24-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t25-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t25-colour.webp new file mode 100644 index 00000000..cfbce358 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t25-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t25-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t25-geometry.webp new file mode 100644 index 00000000..69c31d6a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t25-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t26-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t26-colour.webp new file mode 100644 index 00000000..e76fe62d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t26-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t26-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t26-geometry.webp new file mode 100644 index 00000000..e6a81341 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t26-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t27-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t27-colour.webp new file mode 100644 index 00000000..0cf7ddb0 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t27-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t27-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t27-geometry.webp new file mode 100644 index 00000000..243781e0 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t27-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t28-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t28-colour.webp new file mode 100644 index 00000000..60d7ffb0 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t28-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t28-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t28-geometry.webp new file mode 100644 index 00000000..27084cef Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t28-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t29-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t29-colour.webp new file mode 100644 index 00000000..e20ba446 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t29-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t29-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t29-geometry.webp new file mode 100644 index 00000000..98bcd910 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t29-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t30-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t30-colour.webp new file mode 100644 index 00000000..8b37ec6e Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t30-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t30-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t30-geometry.webp new file mode 100644 index 00000000..1de2b58b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t30-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t31-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t31-colour.webp new file mode 100644 index 00000000..e368eaa2 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t31-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-1-t31-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-1-t31-geometry.webp new file mode 100644 index 00000000..8d1a8759 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-1-t31-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t00-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t00-colour.webp new file mode 100644 index 00000000..93c0093b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t00-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t00-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t00-geometry.webp new file mode 100644 index 00000000..74594ec5 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t00-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t01-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t01-colour.webp new file mode 100644 index 00000000..1f39071e Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t01-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t01-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t01-geometry.webp new file mode 100644 index 00000000..3a7e8512 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t01-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t02-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t02-colour.webp new file mode 100644 index 00000000..24c31463 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t02-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t02-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t02-geometry.webp new file mode 100644 index 00000000..82a6ae7f Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t02-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t03-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t03-colour.webp new file mode 100644 index 00000000..8f2941bb Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t03-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t03-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t03-geometry.webp new file mode 100644 index 00000000..a56ea57c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t03-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t04-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t04-colour.webp new file mode 100644 index 00000000..6bf2127d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t04-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t04-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t04-geometry.webp new file mode 100644 index 00000000..340c19b7 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t04-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t05-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t05-colour.webp new file mode 100644 index 00000000..84eb0c69 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t05-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t05-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t05-geometry.webp new file mode 100644 index 00000000..9d7f0d82 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t05-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t06-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t06-colour.webp new file mode 100644 index 00000000..256a69d4 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t06-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t06-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t06-geometry.webp new file mode 100644 index 00000000..e91016e5 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t06-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t07-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t07-colour.webp new file mode 100644 index 00000000..7f3b93e4 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t07-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t07-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t07-geometry.webp new file mode 100644 index 00000000..7654fa73 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t07-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t08-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t08-colour.webp new file mode 100644 index 00000000..60cd5c1a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t08-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t08-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t08-geometry.webp new file mode 100644 index 00000000..561a4768 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t08-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t09-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t09-colour.webp new file mode 100644 index 00000000..a18e5331 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t09-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t09-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t09-geometry.webp new file mode 100644 index 00000000..8753533d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t09-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t10-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t10-colour.webp new file mode 100644 index 00000000..0be83368 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t10-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t10-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t10-geometry.webp new file mode 100644 index 00000000..0ed32ac1 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t10-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t11-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t11-colour.webp new file mode 100644 index 00000000..26afbd42 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t11-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t11-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t11-geometry.webp new file mode 100644 index 00000000..196977ee Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t11-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t12-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t12-colour.webp new file mode 100644 index 00000000..43a5d09e Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t12-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t12-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t12-geometry.webp new file mode 100644 index 00000000..e5b6320f Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t12-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t13-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t13-colour.webp new file mode 100644 index 00000000..14783d3c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t13-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t13-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t13-geometry.webp new file mode 100644 index 00000000..f027c960 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t13-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t14-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t14-colour.webp new file mode 100644 index 00000000..1846db8f Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t14-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t14-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t14-geometry.webp new file mode 100644 index 00000000..bf9b2329 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t14-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t15-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t15-colour.webp new file mode 100644 index 00000000..416b1684 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t15-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t15-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t15-geometry.webp new file mode 100644 index 00000000..39f228aa Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t15-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t16-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t16-colour.webp new file mode 100644 index 00000000..49b833ea Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t16-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t16-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t16-geometry.webp new file mode 100644 index 00000000..8431805d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t16-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t17-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t17-colour.webp new file mode 100644 index 00000000..5230f411 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t17-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t17-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t17-geometry.webp new file mode 100644 index 00000000..4305a2f4 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t17-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t18-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t18-colour.webp new file mode 100644 index 00000000..4612a1d3 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t18-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t18-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t18-geometry.webp new file mode 100644 index 00000000..64c1a000 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t18-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t19-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t19-colour.webp new file mode 100644 index 00000000..ed8b4879 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t19-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t19-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t19-geometry.webp new file mode 100644 index 00000000..6a5155db Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t19-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t20-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t20-colour.webp new file mode 100644 index 00000000..496fc9da Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t20-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t20-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t20-geometry.webp new file mode 100644 index 00000000..add706aa Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t20-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t21-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t21-colour.webp new file mode 100644 index 00000000..a7cd3c5a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t21-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t21-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t21-geometry.webp new file mode 100644 index 00000000..3ed5b201 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t21-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t22-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t22-colour.webp new file mode 100644 index 00000000..a4548917 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t22-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t22-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t22-geometry.webp new file mode 100644 index 00000000..87be9e74 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t22-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t23-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t23-colour.webp new file mode 100644 index 00000000..ee84b831 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t23-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t23-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t23-geometry.webp new file mode 100644 index 00000000..ab9c5738 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t23-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t24-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t24-colour.webp new file mode 100644 index 00000000..44060f9d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t24-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t24-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t24-geometry.webp new file mode 100644 index 00000000..c7bc525c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t24-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t25-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t25-colour.webp new file mode 100644 index 00000000..5144f816 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t25-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t25-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t25-geometry.webp new file mode 100644 index 00000000..2aa20203 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t25-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t26-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t26-colour.webp new file mode 100644 index 00000000..c765d30c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t26-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t26-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t26-geometry.webp new file mode 100644 index 00000000..60a8b652 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t26-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t27-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t27-colour.webp new file mode 100644 index 00000000..ee7bdde0 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t27-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t27-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t27-geometry.webp new file mode 100644 index 00000000..7f09cace Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t27-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t28-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t28-colour.webp new file mode 100644 index 00000000..5ea77269 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t28-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t28-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t28-geometry.webp new file mode 100644 index 00000000..e4b0fbaf Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t28-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t29-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t29-colour.webp new file mode 100644 index 00000000..0cdbdf60 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t29-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t29-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t29-geometry.webp new file mode 100644 index 00000000..2ef8405a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t29-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t30-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t30-colour.webp new file mode 100644 index 00000000..899fde1b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t30-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t30-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t30-geometry.webp new file mode 100644 index 00000000..9fdb3c99 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t30-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t31-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t31-colour.webp new file mode 100644 index 00000000..db63f88b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t31-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-2-t31-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-2-t31-geometry.webp new file mode 100644 index 00000000..344e7577 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-2-t31-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t00-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t00-colour.webp new file mode 100644 index 00000000..8a66ff36 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t00-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t00-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t00-geometry.webp new file mode 100644 index 00000000..56fc3b66 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t00-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t01-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t01-colour.webp new file mode 100644 index 00000000..bb9dca6e Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t01-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t01-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t01-geometry.webp new file mode 100644 index 00000000..2b59a1d3 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t01-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t02-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t02-colour.webp new file mode 100644 index 00000000..1ac1ceea Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t02-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t02-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t02-geometry.webp new file mode 100644 index 00000000..b9aeb249 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t02-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t03-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t03-colour.webp new file mode 100644 index 00000000..d5e17840 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t03-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t03-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t03-geometry.webp new file mode 100644 index 00000000..de8c59e1 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t03-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t04-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t04-colour.webp new file mode 100644 index 00000000..8e8c072b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t04-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t04-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t04-geometry.webp new file mode 100644 index 00000000..0a5ce836 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t04-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t05-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t05-colour.webp new file mode 100644 index 00000000..f9c058be Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t05-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t05-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t05-geometry.webp new file mode 100644 index 00000000..2d406c5b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t05-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t06-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t06-colour.webp new file mode 100644 index 00000000..829be4a2 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t06-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t06-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t06-geometry.webp new file mode 100644 index 00000000..2f699234 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t06-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t07-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t07-colour.webp new file mode 100644 index 00000000..ce55b914 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t07-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t07-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t07-geometry.webp new file mode 100644 index 00000000..24057242 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t07-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t08-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t08-colour.webp new file mode 100644 index 00000000..e43f71f9 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t08-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t08-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t08-geometry.webp new file mode 100644 index 00000000..7d645991 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t08-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t09-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t09-colour.webp new file mode 100644 index 00000000..751da748 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t09-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t09-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t09-geometry.webp new file mode 100644 index 00000000..16938aa2 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t09-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t10-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t10-colour.webp new file mode 100644 index 00000000..1ba4f937 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t10-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t10-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t10-geometry.webp new file mode 100644 index 00000000..b90e0a18 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t10-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t11-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t11-colour.webp new file mode 100644 index 00000000..09513ecf Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t11-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t11-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t11-geometry.webp new file mode 100644 index 00000000..c6eb0d18 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t11-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t12-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t12-colour.webp new file mode 100644 index 00000000..4739a331 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t12-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t12-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t12-geometry.webp new file mode 100644 index 00000000..d52d9ce1 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t12-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t13-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t13-colour.webp new file mode 100644 index 00000000..a96c59c6 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t13-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t13-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t13-geometry.webp new file mode 100644 index 00000000..13137b55 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t13-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t14-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t14-colour.webp new file mode 100644 index 00000000..9ce20b22 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t14-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t14-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t14-geometry.webp new file mode 100644 index 00000000..f77989de Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t14-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t15-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t15-colour.webp new file mode 100644 index 00000000..22ee61cd Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t15-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t15-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t15-geometry.webp new file mode 100644 index 00000000..cba0db4d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t15-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t16-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t16-colour.webp new file mode 100644 index 00000000..c7124cf2 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t16-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t16-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t16-geometry.webp new file mode 100644 index 00000000..9cc64f7d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t16-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t17-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t17-colour.webp new file mode 100644 index 00000000..3bf36902 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t17-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t17-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t17-geometry.webp new file mode 100644 index 00000000..131ec0ea Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t17-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t18-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t18-colour.webp new file mode 100644 index 00000000..c4e371e5 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t18-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t18-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t18-geometry.webp new file mode 100644 index 00000000..fe6beeb2 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t18-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t19-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t19-colour.webp new file mode 100644 index 00000000..d071749b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t19-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t19-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t19-geometry.webp new file mode 100644 index 00000000..27d87840 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t19-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t20-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t20-colour.webp new file mode 100644 index 00000000..4cadc5cb Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t20-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t20-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t20-geometry.webp new file mode 100644 index 00000000..521f42bf Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t20-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t21-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t21-colour.webp new file mode 100644 index 00000000..fbeb7e2c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t21-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t21-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t21-geometry.webp new file mode 100644 index 00000000..3c12322f Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t21-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t22-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t22-colour.webp new file mode 100644 index 00000000..f4652b74 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t22-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t22-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t22-geometry.webp new file mode 100644 index 00000000..a67f8536 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t22-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t23-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t23-colour.webp new file mode 100644 index 00000000..d4abfd22 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t23-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t23-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t23-geometry.webp new file mode 100644 index 00000000..024c1b03 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t23-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t24-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t24-colour.webp new file mode 100644 index 00000000..fd02bc1b Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t24-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t24-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t24-geometry.webp new file mode 100644 index 00000000..15f821ca Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t24-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t25-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t25-colour.webp new file mode 100644 index 00000000..242370d1 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t25-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t25-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t25-geometry.webp new file mode 100644 index 00000000..3dd27b4a Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t25-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t26-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t26-colour.webp new file mode 100644 index 00000000..d3d28854 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t26-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t26-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t26-geometry.webp new file mode 100644 index 00000000..c566de97 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t26-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t27-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t27-colour.webp new file mode 100644 index 00000000..051a929d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t27-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t27-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t27-geometry.webp new file mode 100644 index 00000000..11059aa9 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t27-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t28-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t28-colour.webp new file mode 100644 index 00000000..719e373c Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t28-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t28-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t28-geometry.webp new file mode 100644 index 00000000..475a0c33 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t28-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t29-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t29-colour.webp new file mode 100644 index 00000000..c63afefd Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t29-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t29-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t29-geometry.webp new file mode 100644 index 00000000..f2eecce0 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t29-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t30-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t30-colour.webp new file mode 100644 index 00000000..feb41172 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t30-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t30-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t30-geometry.webp new file mode 100644 index 00000000..74dd697d Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t30-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t31-colour.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t31-colour.webp new file mode 100644 index 00000000..2fa6d324 Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t31-colour.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/card-3-t31-geometry.webp b/public/ridge/amadablam-fb4b9d3701f8/card-3-t31-geometry.webp new file mode 100644 index 00000000..8b5be64f Binary files /dev/null and b/public/ridge/amadablam-fb4b9d3701f8/card-3-t31-geometry.webp differ diff --git a/public/ridge/amadablam-fb4b9d3701f8/manifest.json b/public/ridge/amadablam-fb4b9d3701f8/manifest.json new file mode 100644 index 00000000..74acd5dc --- /dev/null +++ b/public/ridge/amadablam-fb4b9d3701f8/manifest.json @@ -0,0 +1,1796 @@ +{ + "schema": 3, + "baker_version": 7, + "bake_id": "fb4b9d3701f8", + "place": { + "id": "amadablam", + "name": "Ama Dablam and Everest from Khumjung", + "lat": 27.822000000000003, + "lon": 86.722666666667, + "altitude_km": 3.7819838378893, + "eye_m": 3783.5838378893, + "tz": "Asia/Kathmandu" + }, + "view": { + "look_az_deg": 71.99620826401747, + "plane_h": 600, + "px_per_deg_h": 17.77777777777778, + "px_per_deg_v": 15.211655185147013, + "exaggeration": 0.8556556041645195, + "horizon_row": 450.0, + "sky_row": 24.0, + "near_row": 396.0, + "ring_w": 6400, + "tile_w": 200, + "tiles": 32, + "apron": 2 + }, + "curvature": { + "r_earth_m": 6371000.0, + "k_ref": 0.13 + }, + "encoding": { + "log_d_min": 6.214608098422191, + "log_d_max": 11.00475592466117, + "normal": "rt8" + }, + "camera": { + "r_max_m": 95.8, + "r_max_forward_m": 198.4 + }, + "cards": [ + { + "near_m": null, + "far_m": 2011.718901979742 + }, + { + "near_m": 2011.718901979742, + "far_m": 18998.714628561414 + }, + { + "near_m": 18998.714628561414, + "far_m": 34575.30863870067 + }, + { + "near_m": 34575.30863870067, + "far_m": null + } + ], + "tiles": [ + [ + { + "top": 52, + "h": 548, + "distance_m": 827.252197265625, + "colour": { + "file": "card-0-t00-colour.webp", + "bytes": 1838 + }, + "geometry": { + "file": "card-0-t00-geometry.webp", + "bytes": 28162 + } + }, + { + "top": 67, + "h": 533, + "distance_m": 2306.083984375, + "colour": { + "file": "card-1-t00-colour.webp", + "bytes": 558 + }, + "geometry": { + "file": "card-1-t00-geometry.webp", + "bytes": 326 + } + }, + { + "top": 336, + "h": 264, + "distance_m": 23771.404296875, + "colour": { + "file": "card-2-t00-colour.webp", + "bytes": 1290 + }, + "geometry": { + "file": "card-2-t00-geometry.webp", + "bytes": 4978 + } + }, + { + "top": 377, + "h": 223, + "distance_m": 33055.8046875, + "colour": { + "file": "card-3-t00-colour.webp", + "bytes": 394 + }, + "geometry": { + "file": "card-3-t00-geometry.webp", + "bytes": 1576 + } + } + ], + [ + { + "top": 79, + "h": 521, + "distance_m": 770.1353759765625, + "colour": { + "file": "card-0-t01-colour.webp", + "bytes": 2048 + }, + "geometry": { + "file": "card-0-t01-geometry.webp", + "bytes": 31896 + } + }, + { + "top": 124, + "h": 476, + "distance_m": 1900.0, + "colour": { + "file": "card-1-t01-colour.webp", + "bytes": 550 + }, + "geometry": { + "file": "card-1-t01-geometry.webp", + "bytes": 282 + } + }, + { + "top": 333, + "h": 267, + "distance_m": 21694.78125, + "colour": { + "file": "card-2-t01-colour.webp", + "bytes": 1000 + }, + "geometry": { + "file": "card-2-t01-geometry.webp", + "bytes": 3070 + } + }, + { + "top": 382, + "h": 218, + "distance_m": 32924.10546875, + "colour": { + "file": "card-3-t01-colour.webp", + "bytes": 418 + }, + "geometry": { + "file": "card-3-t01-geometry.webp", + "bytes": 1936 + } + } + ], + [ + { + "top": 143, + "h": 457, + "distance_m": 739.466796875, + "colour": { + "file": "card-0-t02-colour.webp", + "bytes": 1984 + }, + "geometry": { + "file": "card-0-t02-geometry.webp", + "bytes": 25648 + } + }, + { + "top": 226, + "h": 374, + "distance_m": 9601.2099609375, + "colour": { + "file": "card-1-t02-colour.webp", + "bytes": 2024 + }, + "geometry": { + "file": "card-1-t02-geometry.webp", + "bytes": 14730 + } + }, + { + "top": 332, + "h": 268, + "distance_m": 24564.380859375, + "colour": { + "file": "card-2-t02-colour.webp", + "bytes": 1394 + }, + "geometry": { + "file": "card-2-t02-geometry.webp", + "bytes": 5922 + } + }, + { + "top": 372, + "h": 228, + "distance_m": 35593.87890625, + "colour": { + "file": "card-3-t02-colour.webp", + "bytes": 688 + }, + "geometry": { + "file": "card-3-t02-geometry.webp", + "bytes": 3856 + } + } + ], + [ + { + "top": 228, + "h": 372, + "distance_m": 737.2044067382812, + "colour": { + "file": "card-0-t03-colour.webp", + "bytes": 1622 + }, + "geometry": { + "file": "card-0-t03-geometry.webp", + "bytes": 18656 + } + }, + { + "top": 226, + "h": 374, + "distance_m": 5174.55615234375, + "colour": { + "file": "card-1-t03-colour.webp", + "bytes": 3264 + }, + "geometry": { + "file": "card-1-t03-geometry.webp", + "bytes": 27148 + } + }, + { + "top": 301, + "h": 299, + "distance_m": 22038.73828125, + "colour": { + "file": "card-2-t03-colour.webp", + "bytes": 1774 + }, + "geometry": { + "file": "card-2-t03-geometry.webp", + "bytes": 8954 + } + }, + { + "top": 372, + "h": 228, + "distance_m": 33857.1328125, + "colour": { + "file": "card-3-t03-colour.webp", + "bytes": 422 + }, + "geometry": { + "file": "card-3-t03-geometry.webp", + "bytes": 1780 + } + } + ], + [ + { + "top": 343, + "h": 257, + "distance_m": 818.1093139648438, + "colour": { + "file": "card-0-t04-colour.webp", + "bytes": 1776 + }, + "geometry": { + "file": "card-0-t04-geometry.webp", + "bytes": 15200 + } + }, + { + "top": 266, + "h": 334, + "distance_m": 4350.2265625, + "colour": { + "file": "card-1-t04-colour.webp", + "bytes": 2944 + }, + "geometry": { + "file": "card-1-t04-geometry.webp", + "bytes": 30542 + } + }, + { + "top": 295, + "h": 305, + "distance_m": 22713.22265625, + "colour": { + "file": "card-2-t04-colour.webp", + "bytes": 2972 + }, + "geometry": { + "file": "card-2-t04-geometry.webp", + "bytes": 17908 + } + }, + { + "top": 373, + "h": 227, + "distance_m": 35946.43359375, + "colour": { + "file": "card-3-t04-colour.webp", + "bytes": 624 + }, + "geometry": { + "file": "card-3-t04-geometry.webp", + "bytes": 2946 + } + } + ], + [ + { + "top": 447, + "h": 153, + "distance_m": 1052.255859375, + "colour": { + "file": "card-0-t05-colour.webp", + "bytes": 1374 + }, + "geometry": { + "file": "card-0-t05-geometry.webp", + "bytes": 7956 + } + }, + { + "top": 321, + "h": 279, + "distance_m": 3597.237548828125, + "colour": { + "file": "card-1-t05-colour.webp", + "bytes": 2970 + }, + "geometry": { + "file": "card-1-t05-geometry.webp", + "bytes": 37740 + } + }, + { + "top": 319, + "h": 281, + "distance_m": 25097.0, + "colour": { + "file": "card-2-t05-colour.webp", + "bytes": 2224 + }, + "geometry": { + "file": "card-2-t05-geometry.webp", + "bytes": 12520 + } + }, + { + "top": 376, + "h": 224, + "distance_m": 33264.33203125, + "colour": { + "file": "card-3-t05-colour.webp", + "bytes": 536 + }, + "geometry": { + "file": "card-3-t05-geometry.webp", + "bytes": 1356 + } + } + ], + [ + { + "top": 572, + "h": 28, + "distance_m": 1153.4088134765625, + "colour": { + "file": "card-0-t06-colour.webp", + "bytes": 258 + }, + "geometry": { + "file": "card-0-t06-geometry.webp", + "bytes": 408 + } + }, + { + "top": 277, + "h": 323, + "distance_m": 4320.556640625, + "colour": { + "file": "card-1-t06-colour.webp", + "bytes": 3458 + }, + "geometry": { + "file": "card-1-t06-geometry.webp", + "bytes": 46336 + } + }, + { + "top": 335, + "h": 265, + "distance_m": 19104.140625, + "colour": { + "file": "card-2-t06-colour.webp", + "bytes": 988 + }, + "geometry": { + "file": "card-2-t06-geometry.webp", + "bytes": 5090 + } + }, + { + "top": 348, + "h": 252, + "distance_m": 35518.5, + "colour": { + "file": "card-3-t06-colour.webp", + "bytes": 1318 + }, + "geometry": { + "file": "card-3-t06-geometry.webp", + "bytes": 7340 + } + } + ], + [ + { + "top": 546, + "h": 54, + "distance_m": 523.5120849609375, + "colour": { + "file": "card-0-t07-colour.webp", + "bytes": 490 + }, + "geometry": { + "file": "card-0-t07-geometry.webp", + "bytes": 328 + } + }, + { + "top": 289, + "h": 311, + "distance_m": 2965.19775390625, + "colour": { + "file": "card-1-t07-colour.webp", + "bytes": 3514 + }, + "geometry": { + "file": "card-1-t07-geometry.webp", + "bytes": 35732 + } + }, + { + "top": 349, + "h": 251, + "distance_m": 24699.427734375, + "colour": { + "file": "card-2-t07-colour.webp", + "bytes": 582 + }, + "geometry": { + "file": "card-2-t07-geometry.webp", + "bytes": 1650 + } + }, + { + "top": 354, + "h": 246, + "distance_m": 36083.16796875, + "colour": { + "file": "card-3-t07-colour.webp", + "bytes": 1230 + }, + "geometry": { + "file": "card-3-t07-geometry.webp", + "bytes": 6006 + } + } + ], + [ + { + "top": 508, + "h": 92, + "distance_m": 554.8743896484375, + "colour": { + "file": "card-0-t08-colour.webp", + "bytes": 540 + }, + "geometry": { + "file": "card-0-t08-geometry.webp", + "bytes": 732 + } + }, + { + "top": 237, + "h": 363, + "distance_m": 2739.012939453125, + "colour": { + "file": "card-1-t08-colour.webp", + "bytes": 2908 + }, + "geometry": { + "file": "card-1-t08-geometry.webp", + "bytes": 34586 + } + }, + { + "top": 335, + "h": 265, + "distance_m": 25563.431640625, + "colour": { + "file": "card-2-t08-colour.webp", + "bytes": 1146 + }, + "geometry": { + "file": "card-2-t08-geometry.webp", + "bytes": 4426 + } + }, + { + "top": 383, + "h": 217, + "distance_m": 34539.72265625, + "colour": { + "file": "card-3-t08-colour.webp", + "bytes": 834 + }, + "geometry": { + "file": "card-3-t08-geometry.webp", + "bytes": 2590 + } + } + ], + [ + { + "top": 500, + "h": 100, + "distance_m": 552.1141967773438, + "colour": { + "file": "card-0-t09-colour.webp", + "bytes": 370 + }, + "geometry": { + "file": "card-0-t09-geometry.webp", + "bytes": 2318 + } + }, + { + "top": 186, + "h": 414, + "distance_m": 3015.078369140625, + "colour": { + "file": "card-1-t09-colour.webp", + "bytes": 4034 + }, + "geometry": { + "file": "card-1-t09-geometry.webp", + "bytes": 43760 + } + }, + { + "top": 326, + "h": 274, + "distance_m": 18802.935546875, + "colour": { + "file": "card-2-t09-colour.webp", + "bytes": 1470 + }, + "geometry": { + "file": "card-2-t09-geometry.webp", + "bytes": 7174 + } + }, + { + "top": 403, + "h": 197, + "distance_m": 37542.0, + "colour": { + "file": "card-3-t09-colour.webp", + "bytes": 774 + }, + "geometry": { + "file": "card-3-t09-geometry.webp", + "bytes": 2216 + } + } + ], + [ + { + "top": 444, + "h": 156, + "distance_m": 639.7239379882812, + "colour": { + "file": "card-0-t10-colour.webp", + "bytes": 638 + }, + "geometry": { + "file": "card-0-t10-geometry.webp", + "bytes": 2276 + } + }, + { + "top": 123, + "h": 477, + "distance_m": 3232.07958984375, + "colour": { + "file": "card-1-t10-colour.webp", + "bytes": 5368 + }, + "geometry": { + "file": "card-1-t10-geometry.webp", + "bytes": 54868 + } + }, + { + "top": 354, + "h": 246, + "distance_m": 18597.224609375, + "colour": { + "file": "card-2-t10-colour.webp", + "bytes": 1214 + }, + "geometry": { + "file": "card-2-t10-geometry.webp", + "bytes": 6840 + } + }, + { + "top": 419, + "h": 181, + "distance_m": 34387.94140625, + "colour": { + "file": "card-3-t10-colour.webp", + "bytes": 566 + }, + "geometry": { + "file": "card-3-t10-geometry.webp", + "bytes": 2010 + } + } + ], + [ + { + "top": 346, + "h": 254, + "distance_m": 523.1098022460938, + "colour": { + "file": "card-0-t11-colour.webp", + "bytes": 766 + }, + "geometry": { + "file": "card-0-t11-geometry.webp", + "bytes": 2440 + } + }, + { + "top": 167, + "h": 433, + "distance_m": 2894.937744140625, + "colour": { + "file": "card-1-t11-colour.webp", + "bytes": 4430 + }, + "geometry": { + "file": "card-1-t11-geometry.webp", + "bytes": 45170 + } + }, + { + "top": 332, + "h": 268, + "distance_m": 18381.962890625, + "colour": { + "file": "card-2-t11-colour.webp", + "bytes": 1414 + }, + "geometry": { + "file": "card-2-t11-geometry.webp", + "bytes": 7804 + } + }, + { + "top": 413, + "h": 187, + "distance_m": 32349.83203125, + "colour": { + "file": "card-3-t11-colour.webp", + "bytes": 332 + }, + "geometry": { + "file": "card-3-t11-geometry.webp", + "bytes": 304 + } + } + ], + [ + { + "top": 313, + "h": 287, + "distance_m": 523.9810180664062, + "colour": { + "file": "card-0-t12-colour.webp", + "bytes": 678 + }, + "geometry": { + "file": "card-0-t12-geometry.webp", + "bytes": 5612 + } + }, + { + "top": 207, + "h": 393, + "distance_m": 2714.9775390625, + "colour": { + "file": "card-1-t12-colour.webp", + "bytes": 3234 + }, + "geometry": { + "file": "card-1-t12-geometry.webp", + "bytes": 33776 + } + }, + { + "top": 341, + "h": 259, + "distance_m": 18151.8203125, + "colour": { + "file": "card-2-t12-colour.webp", + "bytes": 954 + }, + "geometry": { + "file": "card-2-t12-geometry.webp", + "bytes": 4906 + } + }, + { + "top": 433, + "h": 167, + "distance_m": 34449.2578125, + "colour": { + "file": "card-3-t12-colour.webp", + "bytes": 794 + }, + "geometry": { + "file": "card-3-t12-geometry.webp", + "bytes": 6030 + } + } + ], + [ + { + "top": 345, + "h": 255, + "distance_m": 529.6943969726562, + "colour": { + "file": "card-0-t13-colour.webp", + "bytes": 522 + }, + "geometry": { + "file": "card-0-t13-geometry.webp", + "bytes": 2858 + } + }, + { + "top": 270, + "h": 330, + "distance_m": 2625.431640625, + "colour": { + "file": "card-1-t13-colour.webp", + "bytes": 3816 + }, + "geometry": { + "file": "card-1-t13-geometry.webp", + "bytes": 31634 + } + }, + { + "top": 396, + "h": 204, + "distance_m": 20311.169921875, + "colour": { + "file": "card-2-t13-colour.webp", + "bytes": 760 + }, + "geometry": { + "file": "card-2-t13-geometry.webp", + "bytes": 4466 + } + }, + { + "top": 446, + "h": 154, + "distance_m": 38793.6328125, + "colour": { + "file": "card-3-t13-colour.webp", + "bytes": 1348 + }, + "geometry": { + "file": "card-3-t13-geometry.webp", + "bytes": 10858 + } + } + ], + [ + { + "top": 300, + "h": 300, + "distance_m": 500.0, + "colour": { + "file": "card-0-t14-colour.webp", + "bytes": 688 + }, + "geometry": { + "file": "card-0-t14-geometry.webp", + "bytes": 3402 + } + }, + { + "top": 322, + "h": 278, + "distance_m": 2918.640625, + "colour": { + "file": "card-1-t14-colour.webp", + "bytes": 3414 + }, + "geometry": { + "file": "card-1-t14-geometry.webp", + "bytes": 29566 + } + }, + { + "top": 383, + "h": 217, + "distance_m": 18614.470703125, + "colour": { + "file": "card-2-t14-colour.webp", + "bytes": 1140 + }, + "geometry": { + "file": "card-2-t14-geometry.webp", + "bytes": 7116 + } + }, + { + "top": 457, + "h": 143, + "distance_m": 42439.03125, + "colour": { + "file": "card-3-t14-colour.webp", + "bytes": 1074 + }, + "geometry": { + "file": "card-3-t14-geometry.webp", + "bytes": 8620 + } + } + ], + [ + { + "top": 302, + "h": 298, + "distance_m": 525.7131958007812, + "colour": { + "file": "card-0-t15-colour.webp", + "bytes": 644 + }, + "geometry": { + "file": "card-0-t15-geometry.webp", + "bytes": 5268 + } + }, + { + "top": 405, + "h": 195, + "distance_m": 3244.2470703125, + "colour": { + "file": "card-1-t15-colour.webp", + "bytes": 3522 + }, + "geometry": { + "file": "card-1-t15-geometry.webp", + "bytes": 25236 + } + }, + { + "top": 415, + "h": 185, + "distance_m": 18155.212890625, + "colour": { + "file": "card-2-t15-colour.webp", + "bytes": 1320 + }, + "geometry": { + "file": "card-2-t15-geometry.webp", + "bytes": 7704 + } + }, + { + "top": 466, + "h": 134, + "distance_m": 41500.03515625, + "colour": { + "file": "card-3-t15-colour.webp", + "bytes": 1160 + }, + "geometry": { + "file": "card-3-t15-geometry.webp", + "bytes": 9572 + } + } + ], + [ + { + "top": 357, + "h": 243, + "distance_m": 546.4453735351562, + "colour": { + "file": "card-0-t16-colour.webp", + "bytes": 546 + }, + "geometry": { + "file": "card-0-t16-geometry.webp", + "bytes": 3254 + } + }, + { + "top": 469, + "h": 131, + "distance_m": 6915.326171875, + "colour": { + "file": "card-1-t16-colour.webp", + "bytes": 3182 + }, + "geometry": { + "file": "card-1-t16-geometry.webp", + "bytes": 22194 + } + }, + { + "top": 468, + "h": 132, + "distance_m": 18603.43359375, + "colour": { + "file": "card-2-t16-colour.webp", + "bytes": 1668 + }, + "geometry": { + "file": "card-2-t16-geometry.webp", + "bytes": 12026 + } + }, + { + "top": 468, + "h": 132, + "distance_m": 34757.94140625, + "colour": { + "file": "card-3-t16-colour.webp", + "bytes": 818 + }, + "geometry": { + "file": "card-3-t16-geometry.webp", + "bytes": 5748 + } + } + ], + [ + { + "top": 313, + "h": 287, + "distance_m": 523.0396728515625, + "colour": { + "file": "card-0-t17-colour.webp", + "bytes": 988 + }, + "geometry": { + "file": "card-0-t17-geometry.webp", + "bytes": 7722 + } + }, + { + "top": 388, + "h": 212, + "distance_m": 4265.77197265625, + "colour": { + "file": "card-1-t17-colour.webp", + "bytes": 1906 + }, + "geometry": { + "file": "card-1-t17-geometry.webp", + "bytes": 21338 + } + }, + { + "top": 442, + "h": 158, + "distance_m": 18450.51171875, + "colour": { + "file": "card-2-t17-colour.webp", + "bytes": 774 + }, + "geometry": { + "file": "card-2-t17-geometry.webp", + "bytes": 4476 + } + }, + { + "top": 458, + "h": 142, + "distance_m": 32626.9453125, + "colour": { + "file": "card-3-t17-colour.webp", + "bytes": 282 + }, + "geometry": { + "file": "card-3-t17-geometry.webp", + "bytes": 1672 + } + } + ], + [ + { + "top": 291, + "h": 309, + "distance_m": 500.0, + "colour": { + "file": "card-0-t18-colour.webp", + "bytes": 1032 + }, + "geometry": { + "file": "card-0-t18-geometry.webp", + "bytes": 10594 + } + }, + { + "top": 350, + "h": 250, + "distance_m": 4179.998046875, + "colour": { + "file": "card-1-t18-colour.webp", + "bytes": 1980 + }, + "geometry": { + "file": "card-1-t18-geometry.webp", + "bytes": 24574 + } + }, + { + "top": 406, + "h": 194, + "distance_m": 18500.25, + "colour": { + "file": "card-2-t18-colour.webp", + "bytes": 446 + }, + "geometry": { + "file": "card-2-t18-geometry.webp", + "bytes": 1658 + } + }, + { + "top": 454, + "h": 146, + "distance_m": 34677.88671875, + "colour": { + "file": "card-3-t18-colour.webp", + "bytes": 392 + }, + "geometry": { + "file": "card-3-t18-geometry.webp", + "bytes": 5676 + } + } + ], + [ + { + "top": 307, + "h": 293, + "distance_m": 500.0, + "colour": { + "file": "card-0-t19-colour.webp", + "bytes": 932 + }, + "geometry": { + "file": "card-0-t19-geometry.webp", + "bytes": 10042 + } + }, + { + "top": 254, + "h": 346, + "distance_m": 4489.41259765625, + "colour": { + "file": "card-1-t19-colour.webp", + "bytes": 3160 + }, + "geometry": { + "file": "card-1-t19-geometry.webp", + "bytes": 28840 + } + }, + { + "top": 392, + "h": 208, + "distance_m": 17933.982421875, + "colour": { + "file": "card-2-t19-colour.webp", + "bytes": 442 + }, + "geometry": { + "file": "card-2-t19-geometry.webp", + "bytes": 1906 + } + }, + { + "top": 440, + "h": 160, + "distance_m": 32843.57421875, + "colour": { + "file": "card-3-t19-colour.webp", + "bytes": 352 + }, + "geometry": { + "file": "card-3-t19-geometry.webp", + "bytes": 2892 + } + } + ], + [ + { + "top": 331, + "h": 269, + "distance_m": 500.0, + "colour": { + "file": "card-0-t20-colour.webp", + "bytes": 838 + }, + "geometry": { + "file": "card-0-t20-geometry.webp", + "bytes": 8638 + } + }, + { + "top": 237, + "h": 363, + "distance_m": 6391.69873046875, + "colour": { + "file": "card-1-t20-colour.webp", + "bytes": 5078 + }, + "geometry": { + "file": "card-1-t20-geometry.webp", + "bytes": 38070 + } + }, + { + "top": 373, + "h": 227, + "distance_m": 17875.4140625, + "colour": { + "file": "card-2-t20-colour.webp", + "bytes": 424 + }, + "geometry": { + "file": "card-2-t20-geometry.webp", + "bytes": 1544 + } + }, + { + "top": 444, + "h": 156, + "distance_m": 33320.78125, + "colour": { + "file": "card-3-t20-colour.webp", + "bytes": 564 + }, + "geometry": { + "file": "card-3-t20-geometry.webp", + "bytes": 5586 + } + } + ], + [ + { + "top": 326, + "h": 274, + "distance_m": 923.2710571289062, + "colour": { + "file": "card-0-t21-colour.webp", + "bytes": 974 + }, + "geometry": { + "file": "card-0-t21-geometry.webp", + "bytes": 12070 + } + }, + { + "top": 216, + "h": 384, + "distance_m": 6441.12890625, + "colour": { + "file": "card-1-t21-colour.webp", + "bytes": 3532 + }, + "geometry": { + "file": "card-1-t21-geometry.webp", + "bytes": 30322 + } + }, + { + "top": 339, + "h": 261, + "distance_m": 18364.421875, + "colour": { + "file": "card-2-t21-colour.webp", + "bytes": 602 + }, + "geometry": { + "file": "card-2-t21-geometry.webp", + "bytes": 1468 + } + }, + { + "top": 437, + "h": 163, + "distance_m": 33722.2421875, + "colour": { + "file": "card-3-t21-colour.webp", + "bytes": 652 + }, + "geometry": { + "file": "card-3-t21-geometry.webp", + "bytes": 7230 + } + } + ], + [ + { + "top": 327, + "h": 273, + "distance_m": 911.6795043945312, + "colour": { + "file": "card-0-t22-colour.webp", + "bytes": 974 + }, + "geometry": { + "file": "card-0-t22-geometry.webp", + "bytes": 13546 + } + }, + { + "top": 216, + "h": 384, + "distance_m": 6546.775390625, + "colour": { + "file": "card-1-t22-colour.webp", + "bytes": 3466 + }, + "geometry": { + "file": "card-1-t22-geometry.webp", + "bytes": 26118 + } + }, + { + "top": 351, + "h": 249, + "distance_m": 18930.142578125, + "colour": { + "file": "card-2-t22-colour.webp", + "bytes": 648 + }, + "geometry": { + "file": "card-2-t22-geometry.webp", + "bytes": 2904 + } + }, + { + "top": 422, + "h": 178, + "distance_m": 32402.568359375, + "colour": { + "file": "card-3-t22-colour.webp", + "bytes": 374 + }, + "geometry": { + "file": "card-3-t22-geometry.webp", + "bytes": 512 + } + } + ], + [ + { + "top": 304, + "h": 296, + "distance_m": 2027.4254150390625, + "colour": { + "file": "card-0-t23-colour.webp", + "bytes": 962 + }, + "geometry": { + "file": "card-0-t23-geometry.webp", + "bytes": 16670 + } + }, + { + "top": 271, + "h": 329, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t23-colour.webp", + "bytes": 3394 + }, + "geometry": { + "file": "card-1-t23-geometry.webp", + "bytes": 17558 + } + }, + { + "top": 310, + "h": 290, + "distance_m": 18561.185546875, + "colour": { + "file": "card-2-t23-colour.webp", + "bytes": 1060 + }, + "geometry": { + "file": "card-2-t23-geometry.webp", + "bytes": 3476 + } + }, + { + "top": 414, + "h": 186, + "distance_m": 33320.78125, + "colour": { + "file": "card-3-t23-colour.webp", + "bytes": 368 + }, + "geometry": { + "file": "card-3-t23-geometry.webp", + "bytes": 1318 + } + } + ], + [ + { + "top": 294, + "h": 306, + "distance_m": 1915.7430419921875, + "colour": { + "file": "card-0-t24-colour.webp", + "bytes": 852 + }, + "geometry": { + "file": "card-0-t24-geometry.webp", + "bytes": 15996 + } + }, + { + "top": 312, + "h": 288, + "distance_m": 16016.1455078125, + "colour": { + "file": "card-1-t24-colour.webp", + "bytes": 1746 + }, + "geometry": { + "file": "card-1-t24-geometry.webp", + "bytes": 10906 + } + }, + { + "top": 344, + "h": 256, + "distance_m": 20518.1796875, + "colour": { + "file": "card-2-t24-colour.webp", + "bytes": 464 + }, + "geometry": { + "file": "card-2-t24-geometry.webp", + "bytes": 758 + } + }, + { + "top": 408, + "h": 192, + "distance_m": 33487.234375, + "colour": { + "file": "card-3-t24-colour.webp", + "bytes": 610 + }, + "geometry": { + "file": "card-3-t24-geometry.webp", + "bytes": 2436 + } + } + ], + [ + { + "top": 264, + "h": 336, + "distance_m": 1279.4014892578125, + "colour": { + "file": "card-0-t25-colour.webp", + "bytes": 914 + }, + "geometry": { + "file": "card-0-t25-geometry.webp", + "bytes": 20056 + } + }, + { + "top": 279, + "h": 321, + "distance_m": 4082.07861328125, + "colour": { + "file": "card-1-t25-colour.webp", + "bytes": 2164 + }, + "geometry": { + "file": "card-1-t25-geometry.webp", + "bytes": 13732 + } + }, + { + "top": 322, + "h": 278, + "distance_m": 21545.11328125, + "colour": { + "file": "card-2-t25-colour.webp", + "bytes": 472 + }, + "geometry": { + "file": "card-2-t25-geometry.webp", + "bytes": 406 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 35783.83203125, + "colour": { + "file": "card-3-t25-colour.webp", + "bytes": 914 + }, + "geometry": { + "file": "card-3-t25-geometry.webp", + "bytes": 3836 + } + } + ], + [ + { + "top": 181, + "h": 419, + "distance_m": 1077.19091796875, + "colour": { + "file": "card-0-t26-colour.webp", + "bytes": 1566 + }, + "geometry": { + "file": "card-0-t26-geometry.webp", + "bytes": 27326 + } + }, + { + "top": 207, + "h": 393, + "distance_m": 4019.7578125, + "colour": { + "file": "card-1-t26-colour.webp", + "bytes": 1952 + }, + "geometry": { + "file": "card-1-t26-geometry.webp", + "bytes": 14416 + } + }, + { + "top": 335, + "h": 265, + "distance_m": 18407.029296875, + "colour": { + "file": "card-2-t26-colour.webp", + "bytes": 1274 + }, + "geometry": { + "file": "card-2-t26-geometry.webp", + "bytes": 6502 + } + }, + { + "top": 369, + "h": 231, + "distance_m": 33237.1875, + "colour": { + "file": "card-3-t26-colour.webp", + "bytes": 1180 + }, + "geometry": { + "file": "card-3-t26-geometry.webp", + "bytes": 4466 + } + } + ], + [ + { + "top": 155, + "h": 445, + "distance_m": 1115.248291015625, + "colour": { + "file": "card-0-t27-colour.webp", + "bytes": 1496 + }, + "geometry": { + "file": "card-0-t27-geometry.webp", + "bytes": 28856 + } + }, + { + "top": 161, + "h": 439, + "distance_m": 4460.001953125, + "colour": { + "file": "card-1-t27-colour.webp", + "bytes": 1820 + }, + "geometry": { + "file": "card-1-t27-geometry.webp", + "bytes": 9902 + } + }, + { + "top": 342, + "h": 258, + "distance_m": 21357.478515625, + "colour": { + "file": "card-2-t27-colour.webp", + "bytes": 898 + }, + "geometry": { + "file": "card-2-t27-geometry.webp", + "bytes": 3388 + } + }, + { + "top": 397, + "h": 203, + "distance_m": 32792.93359375, + "colour": { + "file": "card-3-t27-colour.webp", + "bytes": 404 + }, + "geometry": { + "file": "card-3-t27-geometry.webp", + "bytes": 778 + } + } + ], + [ + { + "top": 53, + "h": 547, + "distance_m": 1288.4852294921875, + "colour": { + "file": "card-0-t28-colour.webp", + "bytes": 1978 + }, + "geometry": { + "file": "card-0-t28-geometry.webp", + "bytes": 31906 + } + }, + { + "top": 65, + "h": 535, + "distance_m": 2982.763916015625, + "colour": { + "file": "card-1-t28-colour.webp", + "bytes": 1046 + }, + "geometry": { + "file": "card-1-t28-geometry.webp", + "bytes": 3854 + } + }, + { + "top": 365, + "h": 235, + "distance_m": 20124.375, + "colour": { + "file": "card-2-t28-colour.webp", + "bytes": 1440 + }, + "geometry": { + "file": "card-2-t28-geometry.webp", + "bytes": 8884 + } + }, + { + "top": 398, + "h": 202, + "distance_m": 33286.3515625, + "colour": { + "file": "card-3-t28-colour.webp", + "bytes": 490 + }, + "geometry": { + "file": "card-3-t28-geometry.webp", + "bytes": 2182 + } + } + ], + [ + { + "top": 24, + "h": 576, + "distance_m": 1518.8189697265625, + "colour": { + "file": "card-0-t29-colour.webp", + "bytes": 2624 + }, + "geometry": { + "file": "card-0-t29-geometry.webp", + "bytes": 34324 + } + }, + { + "top": 34, + "h": 566, + "distance_m": 3090.216552734375, + "colour": { + "file": "card-1-t29-colour.webp", + "bytes": 716 + }, + "geometry": { + "file": "card-1-t29-geometry.webp", + "bytes": 1330 + } + }, + { + "top": 356, + "h": 244, + "distance_m": 28378.375, + "colour": { + "file": "card-2-t29-colour.webp", + "bytes": 856 + }, + "geometry": { + "file": "card-2-t29-geometry.webp", + "bytes": 3104 + } + }, + { + "top": 383, + "h": 217, + "distance_m": 33587.88671875, + "colour": { + "file": "card-3-t29-colour.webp", + "bytes": 654 + }, + "geometry": { + "file": "card-3-t29-geometry.webp", + "bytes": 2366 + } + } + ], + [ + { + "top": 24, + "h": 576, + "distance_m": 1460.000244140625, + "colour": { + "file": "card-0-t30-colour.webp", + "bytes": 2684 + }, + "geometry": { + "file": "card-0-t30-geometry.webp", + "bytes": 31042 + } + }, + { + "top": 42, + "h": 558, + "distance_m": 3196.747314453125, + "colour": { + "file": "card-1-t30-colour.webp", + "bytes": 550 + }, + "geometry": { + "file": "card-1-t30-geometry.webp", + "bytes": 330 + } + }, + { + "top": 331, + "h": 269, + "distance_m": 27157.220703125, + "colour": { + "file": "card-2-t30-colour.webp", + "bytes": 2094 + }, + "geometry": { + "file": "card-2-t30-geometry.webp", + "bytes": 12678 + } + }, + { + "top": 351, + "h": 249, + "distance_m": 33010.56640625, + "colour": { + "file": "card-3-t30-colour.webp", + "bytes": 552 + }, + "geometry": { + "file": "card-3-t30-geometry.webp", + "bytes": 894 + } + } + ], + [ + { + "top": 29, + "h": 571, + "distance_m": 1045.033935546875, + "colour": { + "file": "card-0-t31-colour.webp", + "bytes": 2756 + }, + "geometry": { + "file": "card-0-t31-geometry.webp", + "bytes": 31704 + } + }, + { + "top": 48, + "h": 552, + "distance_m": 2780.00048828125, + "colour": { + "file": "card-1-t31-colour.webp", + "bytes": 606 + }, + "geometry": { + "file": "card-1-t31-geometry.webp", + "bytes": 278 + } + }, + { + "top": 332, + "h": 268, + "distance_m": 29552.09765625, + "colour": { + "file": "card-2-t31-colour.webp", + "bytes": 2102 + }, + "geometry": { + "file": "card-2-t31-geometry.webp", + "bytes": 12352 + } + }, + { + "top": 347, + "h": 253, + "distance_m": 32273.474609375, + "colour": { + "file": "card-3-t31-colour.webp", + "bytes": 422 + }, + "geometry": { + "file": "card-3-t31-geometry.webp", + "bytes": 196 + } + } + ] + ], + "bytes": 1700446, + "attribution": { + "credit_line": "Contains modified Copernicus data: DEM \u00a9 DLR e.V. 2010-2014 and \u00a9 Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.", + "licence": "Copernicus DEM licence: free, full and open access, with the credit line shown", + "dem_source": "Copernicus DEM GLO-30 (30 m)", + "url": "https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model" + } +} diff --git a/public/ridge/fuji-8dac36611b90/card-0-t00-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t00-colour.webp new file mode 100644 index 00000000..6308056b Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t00-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t00-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t00-geometry.webp new file mode 100644 index 00000000..b47faed9 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t00-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t01-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t01-colour.webp new file mode 100644 index 00000000..9057d08b Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t01-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t01-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t01-geometry.webp new file mode 100644 index 00000000..4c47052d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t01-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t02-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t02-colour.webp new file mode 100644 index 00000000..d73e6920 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t02-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t02-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t02-geometry.webp new file mode 100644 index 00000000..c2d51df1 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t02-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t03-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t03-colour.webp new file mode 100644 index 00000000..2dbf6053 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t03-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t03-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t03-geometry.webp new file mode 100644 index 00000000..a5cf99cf Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t03-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t04-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t04-colour.webp new file mode 100644 index 00000000..cbec1ac1 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t04-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t04-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t04-geometry.webp new file mode 100644 index 00000000..04903f82 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t04-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t05-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t05-colour.webp new file mode 100644 index 00000000..c9ecda1d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t05-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t05-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t05-geometry.webp new file mode 100644 index 00000000..ca369183 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t05-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t06-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t06-colour.webp new file mode 100644 index 00000000..0557c2f5 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t06-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t06-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t06-geometry.webp new file mode 100644 index 00000000..9976c7ea Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t06-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t07-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t07-colour.webp new file mode 100644 index 00000000..1afc44f9 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t07-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t07-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t07-geometry.webp new file mode 100644 index 00000000..4bd92c12 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t07-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t08-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t08-colour.webp new file mode 100644 index 00000000..b8ace42b Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t08-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t08-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t08-geometry.webp new file mode 100644 index 00000000..8999900e Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t08-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t09-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t09-colour.webp new file mode 100644 index 00000000..0b43015a Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t09-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t09-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t09-geometry.webp new file mode 100644 index 00000000..79b6ce93 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t09-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t10-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t10-colour.webp new file mode 100644 index 00000000..b8c96a53 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t10-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t10-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t10-geometry.webp new file mode 100644 index 00000000..b582015e Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t10-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t11-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t11-colour.webp new file mode 100644 index 00000000..e136956b Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t11-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t11-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t11-geometry.webp new file mode 100644 index 00000000..1477d7b7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t11-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t12-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t12-colour.webp new file mode 100644 index 00000000..3709ec91 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t12-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t12-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t12-geometry.webp new file mode 100644 index 00000000..5882ff8a Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t12-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t13-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t13-colour.webp new file mode 100644 index 00000000..1b56889c Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t13-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t13-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t13-geometry.webp new file mode 100644 index 00000000..9b6a84d6 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t13-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t14-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t14-colour.webp new file mode 100644 index 00000000..02970394 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t14-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t14-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t14-geometry.webp new file mode 100644 index 00000000..66116abc Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t14-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t15-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t15-colour.webp new file mode 100644 index 00000000..ac8197d3 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t15-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t15-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t15-geometry.webp new file mode 100644 index 00000000..94cbddc4 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t15-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t16-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t16-colour.webp new file mode 100644 index 00000000..6cddc44d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t16-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t16-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t16-geometry.webp new file mode 100644 index 00000000..fd6a70a7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t16-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t17-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t17-colour.webp new file mode 100644 index 00000000..b7163771 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t17-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t17-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t17-geometry.webp new file mode 100644 index 00000000..15a8961b Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t17-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t18-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t18-colour.webp new file mode 100644 index 00000000..74024849 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t18-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t18-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t18-geometry.webp new file mode 100644 index 00000000..b95f4c55 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t18-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t19-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t19-colour.webp new file mode 100644 index 00000000..d1173387 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t19-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t19-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t19-geometry.webp new file mode 100644 index 00000000..a3fd26cd Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t19-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t20-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t20-colour.webp new file mode 100644 index 00000000..8f8d05cc Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t20-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t20-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t20-geometry.webp new file mode 100644 index 00000000..8ddc8ae7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t20-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t21-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t21-colour.webp new file mode 100644 index 00000000..5501eba7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t21-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t21-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t21-geometry.webp new file mode 100644 index 00000000..8ede69d8 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t21-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t22-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t22-colour.webp new file mode 100644 index 00000000..49aa6f23 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t22-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t22-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t22-geometry.webp new file mode 100644 index 00000000..b508c9ad Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t22-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t23-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t23-colour.webp new file mode 100644 index 00000000..b0df140c Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t23-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t23-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t23-geometry.webp new file mode 100644 index 00000000..73366412 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t23-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t24-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t24-colour.webp new file mode 100644 index 00000000..f081f2f7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t24-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t24-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t24-geometry.webp new file mode 100644 index 00000000..7a9dbbb1 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t24-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t25-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t25-colour.webp new file mode 100644 index 00000000..8d3e8fd3 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t25-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t25-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t25-geometry.webp new file mode 100644 index 00000000..6237b3f4 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t25-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t26-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t26-colour.webp new file mode 100644 index 00000000..950659ac Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t26-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t26-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t26-geometry.webp new file mode 100644 index 00000000..cb5b5b89 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t26-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t27-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t27-colour.webp new file mode 100644 index 00000000..b9830b65 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t27-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t27-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t27-geometry.webp new file mode 100644 index 00000000..67f996c8 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t27-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t28-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t28-colour.webp new file mode 100644 index 00000000..dabb1d3d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t28-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t28-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t28-geometry.webp new file mode 100644 index 00000000..349ec1b7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t28-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t29-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t29-colour.webp new file mode 100644 index 00000000..5aca96e5 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t29-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t29-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t29-geometry.webp new file mode 100644 index 00000000..8983c054 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t29-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t30-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t30-colour.webp new file mode 100644 index 00000000..56a7f529 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t30-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t30-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t30-geometry.webp new file mode 100644 index 00000000..a5dc0beb Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t30-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t31-colour.webp b/public/ridge/fuji-8dac36611b90/card-0-t31-colour.webp new file mode 100644 index 00000000..598bcc93 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t31-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-0-t31-geometry.webp b/public/ridge/fuji-8dac36611b90/card-0-t31-geometry.webp new file mode 100644 index 00000000..0fd49b3b Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-0-t31-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t00-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t00-colour.webp new file mode 100644 index 00000000..135a10b0 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t00-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t00-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t00-geometry.webp new file mode 100644 index 00000000..db4c2d7a Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t00-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t01-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t01-colour.webp new file mode 100644 index 00000000..6e64e114 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t01-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t01-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t01-geometry.webp new file mode 100644 index 00000000..4ff81cb8 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t01-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t02-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t02-colour.webp new file mode 100644 index 00000000..97991fde Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t02-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t02-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t02-geometry.webp new file mode 100644 index 00000000..16ff75d3 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t02-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t03-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t03-colour.webp new file mode 100644 index 00000000..1918f131 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t03-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t03-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t03-geometry.webp new file mode 100644 index 00000000..b8a2f602 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t03-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t04-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t04-colour.webp new file mode 100644 index 00000000..fbebfbc8 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t04-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t04-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t04-geometry.webp new file mode 100644 index 00000000..6f55ce22 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t04-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t05-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t05-colour.webp new file mode 100644 index 00000000..c8086215 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t05-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t05-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t05-geometry.webp new file mode 100644 index 00000000..a36cda8c Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t05-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t06-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t06-colour.webp new file mode 100644 index 00000000..ad979fab Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t06-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t06-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t06-geometry.webp new file mode 100644 index 00000000..13c89c02 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t06-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t07-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t07-colour.webp new file mode 100644 index 00000000..d7ae25aa Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t07-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t07-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t07-geometry.webp new file mode 100644 index 00000000..4b06f6da Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t07-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t08-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t08-colour.webp new file mode 100644 index 00000000..5b0b5ecd Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t08-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t08-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t08-geometry.webp new file mode 100644 index 00000000..e6ee7d76 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t08-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t09-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t09-colour.webp new file mode 100644 index 00000000..9203eefc Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t09-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t09-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t09-geometry.webp new file mode 100644 index 00000000..01203777 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t09-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t10-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t10-colour.webp new file mode 100644 index 00000000..f423ffd7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t10-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t10-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t10-geometry.webp new file mode 100644 index 00000000..a08ae5b7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t10-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t11-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t11-colour.webp new file mode 100644 index 00000000..548c3dd2 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t11-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t11-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t11-geometry.webp new file mode 100644 index 00000000..dd2e577f Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t11-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t12-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t12-colour.webp new file mode 100644 index 00000000..3c822749 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t12-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t12-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t12-geometry.webp new file mode 100644 index 00000000..4160e4e8 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t12-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t13-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t13-colour.webp new file mode 100644 index 00000000..184fbc95 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t13-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t13-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t13-geometry.webp new file mode 100644 index 00000000..72d7dc9d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t13-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t14-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t14-colour.webp new file mode 100644 index 00000000..7c4337a7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t14-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t14-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t14-geometry.webp new file mode 100644 index 00000000..db5c32d8 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t14-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t15-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t15-colour.webp new file mode 100644 index 00000000..43b85978 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t15-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t15-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t15-geometry.webp new file mode 100644 index 00000000..6c122045 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t15-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t16-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t16-colour.webp new file mode 100644 index 00000000..6218b7ec Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t16-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t16-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t16-geometry.webp new file mode 100644 index 00000000..c3db236b Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t16-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t17-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t17-colour.webp new file mode 100644 index 00000000..52f6fc8e Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t17-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t17-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t17-geometry.webp new file mode 100644 index 00000000..a447c805 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t17-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t18-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t18-colour.webp new file mode 100644 index 00000000..d72c9a9f Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t18-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t18-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t18-geometry.webp new file mode 100644 index 00000000..7267267d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t18-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t19-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t19-colour.webp new file mode 100644 index 00000000..390021be Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t19-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t19-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t19-geometry.webp new file mode 100644 index 00000000..e06925d1 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t19-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t20-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t20-colour.webp new file mode 100644 index 00000000..1a2c4fd5 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t20-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t20-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t20-geometry.webp new file mode 100644 index 00000000..bf03cd35 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t20-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t21-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t21-colour.webp new file mode 100644 index 00000000..1b93a9dc Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t21-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t21-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t21-geometry.webp new file mode 100644 index 00000000..03da01dc Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t21-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t22-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t22-colour.webp new file mode 100644 index 00000000..699c2c53 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t22-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t22-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t22-geometry.webp new file mode 100644 index 00000000..41c9fd99 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t22-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t23-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t23-colour.webp new file mode 100644 index 00000000..16c4ef24 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t23-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t23-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t23-geometry.webp new file mode 100644 index 00000000..8ce25409 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t23-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t24-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t24-colour.webp new file mode 100644 index 00000000..f1bec22d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t24-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t24-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t24-geometry.webp new file mode 100644 index 00000000..b4daf9ad Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t24-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t25-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t25-colour.webp new file mode 100644 index 00000000..3053a4fb Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t25-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t25-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t25-geometry.webp new file mode 100644 index 00000000..06a79501 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t25-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t26-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t26-colour.webp new file mode 100644 index 00000000..871a729d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t26-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t26-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t26-geometry.webp new file mode 100644 index 00000000..e98e34aa Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t26-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t27-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t27-colour.webp new file mode 100644 index 00000000..ab26b8ad Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t27-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t27-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t27-geometry.webp new file mode 100644 index 00000000..5bf2dc6c Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t27-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t28-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t28-colour.webp new file mode 100644 index 00000000..85826778 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t28-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t28-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t28-geometry.webp new file mode 100644 index 00000000..acae5476 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t28-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t29-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t29-colour.webp new file mode 100644 index 00000000..b9b05ce5 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t29-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t29-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t29-geometry.webp new file mode 100644 index 00000000..14b61be6 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t29-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t30-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t30-colour.webp new file mode 100644 index 00000000..d38d1838 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t30-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t30-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t30-geometry.webp new file mode 100644 index 00000000..a707c046 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t30-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t31-colour.webp b/public/ridge/fuji-8dac36611b90/card-1-t31-colour.webp new file mode 100644 index 00000000..cc888dc0 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t31-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-1-t31-geometry.webp b/public/ridge/fuji-8dac36611b90/card-1-t31-geometry.webp new file mode 100644 index 00000000..c64b6664 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-1-t31-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t00-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t00-colour.webp new file mode 100644 index 00000000..f0e5f75d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t00-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t00-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t00-geometry.webp new file mode 100644 index 00000000..45e08f46 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t00-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t01-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t01-colour.webp new file mode 100644 index 00000000..7d8bd71a Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t01-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t01-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t01-geometry.webp new file mode 100644 index 00000000..1a2bf22c Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t01-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t02-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t02-colour.webp new file mode 100644 index 00000000..843153d0 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t02-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t02-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t02-geometry.webp new file mode 100644 index 00000000..46836d85 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t02-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t03-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t03-colour.webp new file mode 100644 index 00000000..60d8dbb5 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t03-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t03-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t03-geometry.webp new file mode 100644 index 00000000..03abdb9a Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t03-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t04-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t04-colour.webp new file mode 100644 index 00000000..9f4a0707 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t04-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t04-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t04-geometry.webp new file mode 100644 index 00000000..077851e9 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t04-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t05-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t05-colour.webp new file mode 100644 index 00000000..253733c3 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t05-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t05-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t05-geometry.webp new file mode 100644 index 00000000..2d1981b4 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t05-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t06-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t06-colour.webp new file mode 100644 index 00000000..8167d70a Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t06-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t06-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t06-geometry.webp new file mode 100644 index 00000000..c78b28ce Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t06-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t07-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t07-colour.webp new file mode 100644 index 00000000..f6b904e0 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t07-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t07-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t07-geometry.webp new file mode 100644 index 00000000..15378b66 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t07-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t08-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t08-colour.webp new file mode 100644 index 00000000..1e6c6530 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t08-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t08-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t08-geometry.webp new file mode 100644 index 00000000..913101cb Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t08-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t09-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t09-colour.webp new file mode 100644 index 00000000..0f1ce310 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t09-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t09-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t09-geometry.webp new file mode 100644 index 00000000..87c55475 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t09-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t10-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t10-colour.webp new file mode 100644 index 00000000..4a180866 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t10-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t10-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t10-geometry.webp new file mode 100644 index 00000000..41b6f73e Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t10-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t11-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t11-colour.webp new file mode 100644 index 00000000..b355c20c Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t11-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t11-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t11-geometry.webp new file mode 100644 index 00000000..964fd6f8 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t11-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t12-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t12-colour.webp new file mode 100644 index 00000000..0b3766e4 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t12-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t12-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t12-geometry.webp new file mode 100644 index 00000000..84c139d8 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t12-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t13-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t13-colour.webp new file mode 100644 index 00000000..fdd9b0cd Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t13-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t13-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t13-geometry.webp new file mode 100644 index 00000000..3e446e23 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t13-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t14-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t14-colour.webp new file mode 100644 index 00000000..4a250c52 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t14-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t14-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t14-geometry.webp new file mode 100644 index 00000000..73247286 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t14-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t15-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t15-colour.webp new file mode 100644 index 00000000..e3b1f40d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t15-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t15-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t15-geometry.webp new file mode 100644 index 00000000..d760e140 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t15-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t16-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t16-colour.webp new file mode 100644 index 00000000..5c9d1233 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t16-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t16-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t16-geometry.webp new file mode 100644 index 00000000..2a020593 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t16-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t17-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t17-colour.webp new file mode 100644 index 00000000..1d00ef23 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t17-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t17-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t17-geometry.webp new file mode 100644 index 00000000..411b9793 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t17-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t18-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t18-colour.webp new file mode 100644 index 00000000..e28c3383 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t18-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t18-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t18-geometry.webp new file mode 100644 index 00000000..c61774ee Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t18-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t19-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t19-colour.webp new file mode 100644 index 00000000..223bc9c1 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t19-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t19-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t19-geometry.webp new file mode 100644 index 00000000..dc62e04e Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t19-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t20-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t20-colour.webp new file mode 100644 index 00000000..6003dadb Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t20-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t20-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t20-geometry.webp new file mode 100644 index 00000000..a646cacc Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t20-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t21-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t21-colour.webp new file mode 100644 index 00000000..79e3d279 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t21-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t21-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t21-geometry.webp new file mode 100644 index 00000000..3cba62ce Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t21-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t22-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t22-colour.webp new file mode 100644 index 00000000..26cb1f74 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t22-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t22-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t22-geometry.webp new file mode 100644 index 00000000..84dcf595 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t22-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t23-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t23-colour.webp new file mode 100644 index 00000000..e6db6a47 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t23-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t23-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t23-geometry.webp new file mode 100644 index 00000000..fd0052c7 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t23-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t24-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t24-colour.webp new file mode 100644 index 00000000..663c44d4 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t24-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t24-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t24-geometry.webp new file mode 100644 index 00000000..23d3264d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t24-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t25-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t25-colour.webp new file mode 100644 index 00000000..ec455997 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t25-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t25-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t25-geometry.webp new file mode 100644 index 00000000..98b1a692 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t25-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t26-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t26-colour.webp new file mode 100644 index 00000000..9d69adb5 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t26-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t26-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t26-geometry.webp new file mode 100644 index 00000000..82bb08c1 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t26-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t27-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t27-colour.webp new file mode 100644 index 00000000..6d1f461c Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t27-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t27-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t27-geometry.webp new file mode 100644 index 00000000..78bff6b1 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t27-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t28-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t28-colour.webp new file mode 100644 index 00000000..cbc2953f Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t28-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t28-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t28-geometry.webp new file mode 100644 index 00000000..c22aee68 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t28-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t29-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t29-colour.webp new file mode 100644 index 00000000..458a13cb Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t29-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t29-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t29-geometry.webp new file mode 100644 index 00000000..cb6f1fd6 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t29-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t30-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t30-colour.webp new file mode 100644 index 00000000..08c84bd9 Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t30-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t30-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t30-geometry.webp new file mode 100644 index 00000000..d87ffe2d Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t30-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t31-colour.webp b/public/ridge/fuji-8dac36611b90/card-2-t31-colour.webp new file mode 100644 index 00000000..7c8f34dc Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t31-colour.webp differ diff --git a/public/ridge/fuji-8dac36611b90/card-2-t31-geometry.webp b/public/ridge/fuji-8dac36611b90/card-2-t31-geometry.webp new file mode 100644 index 00000000..ec121bab Binary files /dev/null and b/public/ridge/fuji-8dac36611b90/card-2-t31-geometry.webp differ diff --git a/public/ridge/fuji-8dac36611b90/manifest.json b/public/ridge/fuji-8dac36611b90/manifest.json new file mode 100644 index 00000000..3d40b7b8 --- /dev/null +++ b/public/ridge/fuji-8dac36611b90/manifest.json @@ -0,0 +1,1376 @@ +{ + "schema": 3, + "baker_version": 7, + "bake_id": "8dac36611b90", + "place": { + "id": "fuji", + "name": "Fuji from Shiraito Falls", + "lat": 35.312467222222494, + "lon": 138.587223194445, + "altitude_km": 0.486932967116363, + "eye_m": 488.53296711636307, + "tz": "Asia/Tokyo" + }, + "view": { + "look_az_deg": 67.161576536126, + "plane_h": 600, + "px_per_deg_h": 17.77777777777778, + "px_per_deg_v": 26.57953416522506, + "exaggeration": 1.4950987967939096, + "horizon_row": 377.3786586364885, + "sky_row": 24.0, + "near_row": 396.0, + "ring_w": 6400, + "tile_w": 200, + "tiles": 32, + "apron": 2 + }, + "curvature": { + "r_earth_m": 6371000.0, + "k_ref": 0.13 + }, + "encoding": { + "log_d_min": 6.214608098422191, + "log_d_max": 11.00475592466117, + "normal": "rt8" + }, + "camera": { + "r_max_m": 95.8, + "r_max_forward_m": 198.4 + }, + "cards": [ + { + "near_m": null, + "far_m": 1583.253869396531 + }, + { + "near_m": 1583.253869396531, + "far_m": 15874.92439468983 + }, + { + "near_m": 15874.92439468983, + "far_m": null + } + ], + "tiles": [ + [ + { + "top": 301, + "h": 299, + "distance_m": 1165.49267578125, + "colour": { + "file": "card-0-t00-colour.webp", + "bytes": 550 + }, + "geometry": { + "file": "card-0-t00-geometry.webp", + "bytes": 1446 + } + }, + { + "top": 283, + "h": 317, + "distance_m": 3045.256103515625, + "colour": { + "file": "card-1-t00-colour.webp", + "bytes": 808 + }, + "geometry": { + "file": "card-1-t00-geometry.webp", + "bytes": 3490 + } + }, + { + "top": 313, + "h": 287, + "distance_m": 18859.54296875, + "colour": { + "file": "card-2-t00-colour.webp", + "bytes": 864 + }, + "geometry": { + "file": "card-2-t00-geometry.webp", + "bytes": 4160 + } + } + ], + [ + { + "top": 291, + "h": 309, + "distance_m": 859.9998779296875, + "colour": { + "file": "card-0-t01-colour.webp", + "bytes": 650 + }, + "geometry": { + "file": "card-0-t01-geometry.webp", + "bytes": 3810 + } + }, + { + "top": 284, + "h": 316, + "distance_m": 6953.26611328125, + "colour": { + "file": "card-1-t01-colour.webp", + "bytes": 716 + }, + "geometry": { + "file": "card-1-t01-geometry.webp", + "bytes": 4140 + } + }, + { + "top": 292, + "h": 308, + "distance_m": 23120.55078125, + "colour": { + "file": "card-2-t01-colour.webp", + "bytes": 790 + }, + "geometry": { + "file": "card-2-t01-geometry.webp", + "bytes": 3384 + } + } + ], + [ + { + "top": 284, + "h": 316, + "distance_m": 676.6893920898438, + "colour": { + "file": "card-0-t02-colour.webp", + "bytes": 672 + }, + "geometry": { + "file": "card-0-t02-geometry.webp", + "bytes": 4652 + } + }, + { + "top": 260, + "h": 340, + "distance_m": 6780.00048828125, + "colour": { + "file": "card-1-t02-colour.webp", + "bytes": 834 + }, + "geometry": { + "file": "card-1-t02-geometry.webp", + "bytes": 7466 + } + }, + { + "top": 287, + "h": 313, + "distance_m": 15794.0107421875, + "colour": { + "file": "card-2-t02-colour.webp", + "bytes": 518 + }, + "geometry": { + "file": "card-2-t02-geometry.webp", + "bytes": 376 + } + } + ], + [ + { + "top": 271, + "h": 329, + "distance_m": 533.1802978515625, + "colour": { + "file": "card-0-t03-colour.webp", + "bytes": 744 + }, + "geometry": { + "file": "card-0-t03-geometry.webp", + "bytes": 6446 + } + }, + { + "top": 219, + "h": 381, + "distance_m": 7060.0029296875, + "colour": { + "file": "card-1-t03-colour.webp", + "bytes": 1026 + }, + "geometry": { + "file": "card-1-t03-geometry.webp", + "bytes": 16660 + } + }, + { + "top": 262, + "h": 338, + "distance_m": 15731.759765625, + "colour": { + "file": "card-2-t03-colour.webp", + "bytes": 454 + }, + "geometry": { + "file": "card-2-t03-geometry.webp", + "bytes": 176 + } + } + ], + [ + { + "top": 273, + "h": 327, + "distance_m": 733.8682250976562, + "colour": { + "file": "card-0-t04-colour.webp", + "bytes": 598 + }, + "geometry": { + "file": "card-0-t04-geometry.webp", + "bytes": 7574 + } + }, + { + "top": 143, + "h": 457, + "distance_m": 7140.001953125, + "colour": { + "file": "card-1-t04-colour.webp", + "bytes": 1650 + }, + "geometry": { + "file": "card-1-t04-geometry.webp", + "bytes": 33048 + } + }, + { + "top": 194, + "h": 406, + "distance_m": 15731.759765625, + "colour": { + "file": "card-2-t04-colour.webp", + "bytes": 780 + }, + "geometry": { + "file": "card-2-t04-geometry.webp", + "bytes": 168 + } + } + ], + [ + { + "top": 291, + "h": 309, + "distance_m": 620.0, + "colour": { + "file": "card-0-t05-colour.webp", + "bytes": 834 + }, + "geometry": { + "file": "card-0-t05-geometry.webp", + "bytes": 8660 + } + }, + { + "top": 24, + "h": 576, + "distance_m": 9899.9970703125, + "colour": { + "file": "card-1-t05-colour.webp", + "bytes": 3946 + }, + "geometry": { + "file": "card-1-t05-geometry.webp", + "bytes": 56096 + } + }, + { + "top": 131, + "h": 469, + "distance_m": 15731.759765625, + "colour": { + "file": "card-2-t05-colour.webp", + "bytes": 514 + }, + "geometry": { + "file": "card-2-t05-geometry.webp", + "bytes": 176 + } + } + ], + [ + { + "top": 305, + "h": 295, + "distance_m": 671.1244506835938, + "colour": { + "file": "card-0-t06-colour.webp", + "bytes": 1014 + }, + "geometry": { + "file": "card-0-t06-geometry.webp", + "bytes": 10652 + } + }, + { + "top": 25, + "h": 575, + "distance_m": 9121.8095703125, + "colour": { + "file": "card-1-t06-colour.webp", + "bytes": 2732 + }, + "geometry": { + "file": "card-1-t06-geometry.webp", + "bytes": 50750 + } + }, + { + "top": 135, + "h": 465, + "distance_m": 15326.396484375, + "colour": { + "file": "card-2-t06-colour.webp", + "bytes": 500 + }, + "geometry": { + "file": "card-2-t06-geometry.webp", + "bytes": 376 + } + } + ], + [ + { + "top": 329, + "h": 271, + "distance_m": 842.284423828125, + "colour": { + "file": "card-0-t07-colour.webp", + "bytes": 632 + }, + "geometry": { + "file": "card-0-t07-geometry.webp", + "bytes": 7864 + } + }, + { + "top": 167, + "h": 433, + "distance_m": 5535.31689453125, + "colour": { + "file": "card-1-t07-colour.webp", + "bytes": 1508 + }, + "geometry": { + "file": "card-1-t07-geometry.webp", + "bytes": 32304 + } + }, + { + "top": 184, + "h": 416, + "distance_m": 14936.1650390625, + "colour": { + "file": "card-2-t07-colour.webp", + "bytes": 814 + }, + "geometry": { + "file": "card-2-t07-geometry.webp", + "bytes": 358 + } + } + ], + [ + { + "top": 347, + "h": 253, + "distance_m": 822.8244018554688, + "colour": { + "file": "card-0-t08-colour.webp", + "bytes": 656 + }, + "geometry": { + "file": "card-0-t08-geometry.webp", + "bytes": 5594 + } + }, + { + "top": 237, + "h": 363, + "distance_m": 4411.3466796875, + "colour": { + "file": "card-1-t08-colour.webp", + "bytes": 1054 + }, + "geometry": { + "file": "card-1-t08-geometry.webp", + "bytes": 22196 + } + }, + { + "top": 262, + "h": 338, + "distance_m": 14903.5107421875, + "colour": { + "file": "card-2-t08-colour.webp", + "bytes": 564 + }, + "geometry": { + "file": "card-2-t08-geometry.webp", + "bytes": 282 + } + } + ], + [ + { + "top": 348, + "h": 252, + "distance_m": 761.4862060546875, + "colour": { + "file": "card-0-t09-colour.webp", + "bytes": 726 + }, + "geometry": { + "file": "card-0-t09-geometry.webp", + "bytes": 8744 + } + }, + { + "top": 287, + "h": 313, + "distance_m": 4339.99951171875, + "colour": { + "file": "card-1-t09-colour.webp", + "bytes": 986 + }, + "geometry": { + "file": "card-1-t09-geometry.webp", + "bytes": 16712 + } + }, + { + "top": 305, + "h": 295, + "distance_m": 19806.669921875, + "colour": { + "file": "card-2-t09-colour.webp", + "bytes": 582 + }, + "geometry": { + "file": "card-2-t09-geometry.webp", + "bytes": 1658 + } + } + ], + [ + { + "top": 352, + "h": 248, + "distance_m": 500.0, + "colour": { + "file": "card-0-t10-colour.webp", + "bytes": 754 + }, + "geometry": { + "file": "card-0-t10-geometry.webp", + "bytes": 11398 + } + }, + { + "top": 326, + "h": 274, + "distance_m": 4207.16943359375, + "colour": { + "file": "card-1-t10-colour.webp", + "bytes": 756 + }, + "geometry": { + "file": "card-1-t10-geometry.webp", + "bytes": 10954 + } + }, + { + "top": 304, + "h": 296, + "distance_m": 19358.07421875, + "colour": { + "file": "card-2-t10-colour.webp", + "bytes": 1618 + }, + "geometry": { + "file": "card-2-t10-geometry.webp", + "bytes": 10682 + } + } + ], + [ + { + "top": 347, + "h": 253, + "distance_m": 527.2754516601562, + "colour": { + "file": "card-0-t11-colour.webp", + "bytes": 1012 + }, + "geometry": { + "file": "card-0-t11-geometry.webp", + "bytes": 8924 + } + }, + { + "top": 358, + "h": 242, + "distance_m": 4933.00732421875, + "colour": { + "file": "card-1-t11-colour.webp", + "bytes": 478 + }, + "geometry": { + "file": "card-1-t11-geometry.webp", + "bytes": 5326 + } + }, + { + "top": 342, + "h": 258, + "distance_m": 19438.56640625, + "colour": { + "file": "card-2-t11-colour.webp", + "bytes": 770 + }, + "geometry": { + "file": "card-2-t11-geometry.webp", + "bytes": 4296 + } + } + ], + [ + { + "top": 352, + "h": 248, + "distance_m": 520.909423828125, + "colour": { + "file": "card-0-t12-colour.webp", + "bytes": 998 + }, + "geometry": { + "file": "card-0-t12-geometry.webp", + "bytes": 7092 + } + }, + { + "top": 388, + "h": 212, + "distance_m": 1597.173583984375, + "colour": { + "file": "card-1-t12-colour.webp", + "bytes": 458 + }, + "geometry": { + "file": "card-1-t12-geometry.webp", + "bytes": 4096 + } + }, + { + "top": 370, + "h": 230, + "distance_m": 43464.87890625, + "colour": { + "file": "card-2-t12-colour.webp", + "bytes": 834 + }, + "geometry": { + "file": "card-2-t12-geometry.webp", + "bytes": 8064 + } + } + ], + [ + { + "top": 384, + "h": 216, + "distance_m": 641.1549682617188, + "colour": { + "file": "card-0-t13-colour.webp", + "bytes": 816 + }, + "geometry": { + "file": "card-0-t13-geometry.webp", + "bytes": 5824 + } + }, + { + "top": 409, + "h": 191, + "distance_m": 7060.0029296875, + "colour": { + "file": "card-1-t13-colour.webp", + "bytes": 504 + }, + "geometry": { + "file": "card-1-t13-geometry.webp", + "bytes": 3526 + } + }, + { + "top": 366, + "h": 234, + "distance_m": 39014.42578125, + "colour": { + "file": "card-2-t13-colour.webp", + "bytes": 1242 + }, + "geometry": { + "file": "card-2-t13-geometry.webp", + "bytes": 13042 + } + } + ], + [ + { + "top": 403, + "h": 197, + "distance_m": 580.0, + "colour": { + "file": "card-0-t14-colour.webp", + "bytes": 780 + }, + "geometry": { + "file": "card-0-t14-geometry.webp", + "bytes": 7612 + } + }, + { + "top": 413, + "h": 187, + "distance_m": 1765.88525390625, + "colour": { + "file": "card-1-t14-colour.webp", + "bytes": 810 + }, + "geometry": { + "file": "card-1-t14-geometry.webp", + "bytes": 4132 + } + }, + { + "top": 377, + "h": 223, + "distance_m": 32016.8203125, + "colour": { + "file": "card-2-t14-colour.webp", + "bytes": 864 + }, + "geometry": { + "file": "card-2-t14-geometry.webp", + "bytes": 6880 + } + } + ], + [ + { + "top": 403, + "h": 197, + "distance_m": 686.8928833007812, + "colour": { + "file": "card-0-t15-colour.webp", + "bytes": 966 + }, + "geometry": { + "file": "card-0-t15-geometry.webp", + "bytes": 5516 + } + }, + { + "top": 405, + "h": 195, + "distance_m": 2099.999755859375, + "colour": { + "file": "card-1-t15-colour.webp", + "bytes": 1122 + }, + "geometry": { + "file": "card-1-t15-geometry.webp", + "bytes": 7516 + } + }, + { + "top": 369, + "h": 231, + "distance_m": 16337.44140625, + "colour": { + "file": "card-2-t15-colour.webp", + "bytes": 1056 + }, + "geometry": { + "file": "card-2-t15-geometry.webp", + "bytes": 9850 + } + } + ], + [ + { + "top": 325, + "h": 275, + "distance_m": 540.0000610351562, + "colour": { + "file": "card-0-t16-colour.webp", + "bytes": 946 + }, + "geometry": { + "file": "card-0-t16-geometry.webp", + "bytes": 5460 + } + }, + { + "top": 372, + "h": 228, + "distance_m": 7220.0, + "colour": { + "file": "card-1-t16-colour.webp", + "bytes": 2730 + }, + "geometry": { + "file": "card-1-t16-geometry.webp", + "bytes": 17512 + } + }, + { + "top": 372, + "h": 228, + "distance_m": 15879.7060546875, + "colour": { + "file": "card-2-t16-colour.webp", + "bytes": 1036 + }, + "geometry": { + "file": "card-2-t16-geometry.webp", + "bytes": 9366 + } + } + ], + [ + { + "top": 298, + "h": 302, + "distance_m": 540.0000610351562, + "colour": { + "file": "card-0-t17-colour.webp", + "bytes": 594 + }, + "geometry": { + "file": "card-0-t17-geometry.webp", + "bytes": 6552 + } + }, + { + "top": 370, + "h": 230, + "distance_m": 9510.94140625, + "colour": { + "file": "card-1-t17-colour.webp", + "bytes": 1516 + }, + "geometry": { + "file": "card-1-t17-geometry.webp", + "bytes": 9820 + } + }, + { + "top": 365, + "h": 235, + "distance_m": 18620.474609375, + "colour": { + "file": "card-2-t17-colour.webp", + "bytes": 1144 + }, + "geometry": { + "file": "card-2-t17-geometry.webp", + "bytes": 11254 + } + } + ], + [ + { + "top": 283, + "h": 317, + "distance_m": 540.0000610351562, + "colour": { + "file": "card-0-t18-colour.webp", + "bytes": 574 + }, + "geometry": { + "file": "card-0-t18-geometry.webp", + "bytes": 6636 + } + }, + { + "top": 351, + "h": 249, + "distance_m": 1855.5841064453125, + "colour": { + "file": "card-1-t18-colour.webp", + "bytes": 1424 + }, + "geometry": { + "file": "card-1-t18-geometry.webp", + "bytes": 9330 + } + }, + { + "top": 340, + "h": 260, + "distance_m": 16873.72265625, + "colour": { + "file": "card-2-t18-colour.webp", + "bytes": 1352 + }, + "geometry": { + "file": "card-2-t18-geometry.webp", + "bytes": 14144 + } + } + ], + [ + { + "top": 246, + "h": 354, + "distance_m": 526.8663330078125, + "colour": { + "file": "card-0-t19-colour.webp", + "bytes": 756 + }, + "geometry": { + "file": "card-0-t19-geometry.webp", + "bytes": 7000 + } + }, + { + "top": 328, + "h": 272, + "distance_m": 3539.998779296875, + "colour": { + "file": "card-1-t19-colour.webp", + "bytes": 2300 + }, + "geometry": { + "file": "card-1-t19-geometry.webp", + "bytes": 10532 + } + }, + { + "top": 323, + "h": 277, + "distance_m": 15921.30078125, + "colour": { + "file": "card-2-t19-colour.webp", + "bytes": 1756 + }, + "geometry": { + "file": "card-2-t19-geometry.webp", + "bytes": 17248 + } + } + ], + [ + { + "top": 232, + "h": 368, + "distance_m": 500.0, + "colour": { + "file": "card-0-t20-colour.webp", + "bytes": 906 + }, + "geometry": { + "file": "card-0-t20-geometry.webp", + "bytes": 7026 + } + }, + { + "top": 236, + "h": 364, + "distance_m": 2882.576171875, + "colour": { + "file": "card-1-t20-colour.webp", + "bytes": 1652 + }, + "geometry": { + "file": "card-1-t20-geometry.webp", + "bytes": 16248 + } + }, + { + "top": 303, + "h": 297, + "distance_m": 18978.27734375, + "colour": { + "file": "card-2-t20-colour.webp", + "bytes": 2164 + }, + "geometry": { + "file": "card-2-t20-geometry.webp", + "bytes": 23390 + } + } + ], + [ + { + "top": 299, + "h": 301, + "distance_m": 523.988037109375, + "colour": { + "file": "card-0-t21-colour.webp", + "bytes": 516 + }, + "geometry": { + "file": "card-0-t21-geometry.webp", + "bytes": 4618 + } + }, + { + "top": 181, + "h": 419, + "distance_m": 2487.41748046875, + "colour": { + "file": "card-1-t21-colour.webp", + "bytes": 1948 + }, + "geometry": { + "file": "card-1-t21-geometry.webp", + "bytes": 21030 + } + }, + { + "top": 285, + "h": 315, + "distance_m": 15885.142578125, + "colour": { + "file": "card-2-t21-colour.webp", + "bytes": 1832 + }, + "geometry": { + "file": "card-2-t21-geometry.webp", + "bytes": 19512 + } + } + ], + [ + { + "top": 217, + "h": 383, + "distance_m": 540.0000610351562, + "colour": { + "file": "card-0-t22-colour.webp", + "bytes": 930 + }, + "geometry": { + "file": "card-0-t22-geometry.webp", + "bytes": 9268 + } + }, + { + "top": 187, + "h": 413, + "distance_m": 2460.0, + "colour": { + "file": "card-1-t22-colour.webp", + "bytes": 1940 + }, + "geometry": { + "file": "card-1-t22-geometry.webp", + "bytes": 21596 + } + }, + { + "top": 285, + "h": 315, + "distance_m": 18933.138671875, + "colour": { + "file": "card-2-t22-colour.webp", + "bytes": 2002 + }, + "geometry": { + "file": "card-2-t22-geometry.webp", + "bytes": 23052 + } + } + ], + [ + { + "top": 214, + "h": 386, + "distance_m": 500.0, + "colour": { + "file": "card-0-t23-colour.webp", + "bytes": 856 + }, + "geometry": { + "file": "card-0-t23-geometry.webp", + "bytes": 6918 + } + }, + { + "top": 196, + "h": 404, + "distance_m": 2266.6904296875, + "colour": { + "file": "card-1-t23-colour.webp", + "bytes": 2018 + }, + "geometry": { + "file": "card-1-t23-geometry.webp", + "bytes": 19508 + } + }, + { + "top": 289, + "h": 311, + "distance_m": 17854.271484375, + "colour": { + "file": "card-2-t23-colour.webp", + "bytes": 2088 + }, + "geometry": { + "file": "card-2-t23-geometry.webp", + "bytes": 24602 + } + } + ], + [ + { + "top": 257, + "h": 343, + "distance_m": 500.0, + "colour": { + "file": "card-0-t24-colour.webp", + "bytes": 432 + }, + "geometry": { + "file": "card-0-t24-geometry.webp", + "bytes": 3410 + } + }, + { + "top": 163, + "h": 437, + "distance_m": 3320.263916015625, + "colour": { + "file": "card-1-t24-colour.webp", + "bytes": 2316 + }, + "geometry": { + "file": "card-1-t24-geometry.webp", + "bytes": 24600 + } + }, + { + "top": 281, + "h": 319, + "distance_m": 18784.22265625, + "colour": { + "file": "card-2-t24-colour.webp", + "bytes": 2162 + }, + "geometry": { + "file": "card-2-t24-geometry.webp", + "bytes": 26604 + } + } + ], + [ + { + "top": 261, + "h": 339, + "distance_m": 500.0, + "colour": { + "file": "card-0-t25-colour.webp", + "bytes": 430 + }, + "geometry": { + "file": "card-0-t25-geometry.webp", + "bytes": 3604 + } + }, + { + "top": 118, + "h": 482, + "distance_m": 3844.12060546875, + "colour": { + "file": "card-1-t25-colour.webp", + "bytes": 2480 + }, + "geometry": { + "file": "card-1-t25-geometry.webp", + "bytes": 29602 + } + }, + { + "top": 277, + "h": 323, + "distance_m": 18950.58984375, + "colour": { + "file": "card-2-t25-colour.webp", + "bytes": 2524 + }, + "geometry": { + "file": "card-2-t25-geometry.webp", + "bytes": 29858 + } + } + ], + [ + { + "top": 262, + "h": 338, + "distance_m": 500.0, + "colour": { + "file": "card-0-t26-colour.webp", + "bytes": 390 + }, + "geometry": { + "file": "card-0-t26-geometry.webp", + "bytes": 4218 + } + }, + { + "top": 126, + "h": 474, + "distance_m": 3865.76318359375, + "colour": { + "file": "card-1-t26-colour.webp", + "bytes": 2324 + }, + "geometry": { + "file": "card-1-t26-geometry.webp", + "bytes": 23298 + } + }, + { + "top": 280, + "h": 320, + "distance_m": 17852.943359375, + "colour": { + "file": "card-2-t26-colour.webp", + "bytes": 3190 + }, + "geometry": { + "file": "card-2-t26-geometry.webp", + "bytes": 33020 + } + } + ], + [ + { + "top": 254, + "h": 346, + "distance_m": 500.0, + "colour": { + "file": "card-0-t27-colour.webp", + "bytes": 570 + }, + "geometry": { + "file": "card-0-t27-geometry.webp", + "bytes": 2916 + } + }, + { + "top": 152, + "h": 448, + "distance_m": 2996.300537109375, + "colour": { + "file": "card-1-t27-colour.webp", + "bytes": 2110 + }, + "geometry": { + "file": "card-1-t27-geometry.webp", + "bytes": 18668 + } + }, + { + "top": 300, + "h": 300, + "distance_m": 24081.75, + "colour": { + "file": "card-2-t27-colour.webp", + "bytes": 2670 + }, + "geometry": { + "file": "card-2-t27-geometry.webp", + "bytes": 26822 + } + } + ], + [ + { + "top": 238, + "h": 362, + "distance_m": 521.66259765625, + "colour": { + "file": "card-0-t28-colour.webp", + "bytes": 684 + }, + "geometry": { + "file": "card-0-t28-geometry.webp", + "bytes": 2578 + } + }, + { + "top": 197, + "h": 403, + "distance_m": 4912.1728515625, + "colour": { + "file": "card-1-t28-colour.webp", + "bytes": 2348 + }, + "geometry": { + "file": "card-1-t28-geometry.webp", + "bytes": 21618 + } + }, + { + "top": 300, + "h": 300, + "distance_m": 29091.6875, + "colour": { + "file": "card-2-t28-colour.webp", + "bytes": 2870 + }, + "geometry": { + "file": "card-2-t28-geometry.webp", + "bytes": 21314 + } + } + ], + [ + { + "top": 251, + "h": 349, + "distance_m": 933.6327514648438, + "colour": { + "file": "card-0-t29-colour.webp", + "bytes": 666 + }, + "geometry": { + "file": "card-0-t29-geometry.webp", + "bytes": 2446 + } + }, + { + "top": 196, + "h": 404, + "distance_m": 9113.6005859375, + "colour": { + "file": "card-1-t29-colour.webp", + "bytes": 1968 + }, + "geometry": { + "file": "card-1-t29-geometry.webp", + "bytes": 19576 + } + }, + { + "top": 275, + "h": 325, + "distance_m": 15211.173828125, + "colour": { + "file": "card-2-t29-colour.webp", + "bytes": 866 + }, + "geometry": { + "file": "card-2-t29-geometry.webp", + "bytes": 1954 + } + } + ], + [ + { + "top": 262, + "h": 338, + "distance_m": 889.6878662109375, + "colour": { + "file": "card-0-t30-colour.webp", + "bytes": 740 + }, + "geometry": { + "file": "card-0-t30-geometry.webp", + "bytes": 4290 + } + }, + { + "top": 194, + "h": 406, + "distance_m": 11419.8154296875, + "colour": { + "file": "card-1-t30-colour.webp", + "bytes": 1604 + }, + "geometry": { + "file": "card-1-t30-geometry.webp", + "bytes": 19036 + } + }, + { + "top": 279, + "h": 321, + "distance_m": 14933.046875, + "colour": { + "file": "card-2-t30-colour.webp", + "bytes": 760 + }, + "geometry": { + "file": "card-2-t30-geometry.webp", + "bytes": 994 + } + } + ], + [ + { + "top": 287, + "h": 313, + "distance_m": 1129.969482421875, + "colour": { + "file": "card-0-t31-colour.webp", + "bytes": 688 + }, + "geometry": { + "file": "card-0-t31-geometry.webp", + "bytes": 2380 + } + }, + { + "top": 228, + "h": 372, + "distance_m": 12246.369140625, + "colour": { + "file": "card-1-t31-colour.webp", + "bytes": 1378 + }, + "geometry": { + "file": "card-1-t31-geometry.webp", + "bytes": 8344 + } + }, + { + "top": 288, + "h": 312, + "distance_m": 15459.7197265625, + "colour": { + "file": "card-2-t31-colour.webp", + "bytes": 856 + }, + "geometry": { + "file": "card-2-t31-geometry.webp", + "bytes": 2992 + } + } + ] + ], + "bytes": 1226472, + "attribution": { + "credit_line": "Contains modified Copernicus data: DEM \u00a9 DLR e.V. 2010-2014 and \u00a9 Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.", + "licence": "Copernicus DEM licence: free, full and open access, with the credit line shown", + "dem_source": "Copernicus DEM GLO-30 (30 m)", + "url": "https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model" + } +} diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t00-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t00-colour.webp new file mode 100644 index 00000000..d6783911 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t00-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t00-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t00-geometry.webp new file mode 100644 index 00000000..3952ce57 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t00-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t01-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t01-colour.webp new file mode 100644 index 00000000..25417b81 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t01-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t01-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t01-geometry.webp new file mode 100644 index 00000000..8aa7d441 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t01-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t02-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t02-colour.webp new file mode 100644 index 00000000..db97f3f1 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t02-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t02-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t02-geometry.webp new file mode 100644 index 00000000..8168684e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t02-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t03-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t03-colour.webp new file mode 100644 index 00000000..3f2bff0c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t03-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t03-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t03-geometry.webp new file mode 100644 index 00000000..18d5ef0b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t03-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t04-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t04-colour.webp new file mode 100644 index 00000000..0288cdea Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t04-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t04-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t04-geometry.webp new file mode 100644 index 00000000..6c8c422b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t04-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t05-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t05-colour.webp new file mode 100644 index 00000000..347fe96c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t05-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t05-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t05-geometry.webp new file mode 100644 index 00000000..70c7eea1 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t05-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t06-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t06-colour.webp new file mode 100644 index 00000000..2c7c3764 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t06-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t06-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t06-geometry.webp new file mode 100644 index 00000000..391d0c00 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t06-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t07-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t07-colour.webp new file mode 100644 index 00000000..999678aa Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t07-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t07-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t07-geometry.webp new file mode 100644 index 00000000..437f582a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t07-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t08-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t08-colour.webp new file mode 100644 index 00000000..2c79a767 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t08-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t08-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t08-geometry.webp new file mode 100644 index 00000000..76a5f1b2 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t08-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t09-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t09-colour.webp new file mode 100644 index 00000000..94e7d920 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t09-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t09-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t09-geometry.webp new file mode 100644 index 00000000..6d8086b4 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t09-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t10-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t10-colour.webp new file mode 100644 index 00000000..9d4cba25 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t10-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t10-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t10-geometry.webp new file mode 100644 index 00000000..d8f5e11c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t10-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t11-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t11-colour.webp new file mode 100644 index 00000000..8216666a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t11-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t11-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t11-geometry.webp new file mode 100644 index 00000000..419ef76d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t11-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t12-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t12-colour.webp new file mode 100644 index 00000000..3b623a88 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t12-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t12-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t12-geometry.webp new file mode 100644 index 00000000..1f85f858 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t12-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t13-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t13-colour.webp new file mode 100644 index 00000000..e1dc02ed Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t13-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t13-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t13-geometry.webp new file mode 100644 index 00000000..0911c831 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t13-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t14-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t14-colour.webp new file mode 100644 index 00000000..a69385f4 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t14-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t14-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t14-geometry.webp new file mode 100644 index 00000000..3b05d507 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t14-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t15-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t15-colour.webp new file mode 100644 index 00000000..9f26bcbc Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t15-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t15-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t15-geometry.webp new file mode 100644 index 00000000..552e9517 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t15-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t16-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t16-colour.webp new file mode 100644 index 00000000..86006a07 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t16-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t16-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t16-geometry.webp new file mode 100644 index 00000000..f50806b9 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t16-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t17-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t17-colour.webp new file mode 100644 index 00000000..3b8d51b2 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t17-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t17-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t17-geometry.webp new file mode 100644 index 00000000..08c1d196 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t17-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t18-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t18-colour.webp new file mode 100644 index 00000000..d5d3e096 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t18-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t18-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t18-geometry.webp new file mode 100644 index 00000000..46ac2a97 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t18-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t19-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t19-colour.webp new file mode 100644 index 00000000..a3ea9a6f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t19-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t19-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t19-geometry.webp new file mode 100644 index 00000000..de650849 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t19-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t20-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t20-colour.webp new file mode 100644 index 00000000..53b85a39 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t20-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t20-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t20-geometry.webp new file mode 100644 index 00000000..da82875f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t20-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t21-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t21-colour.webp new file mode 100644 index 00000000..80e0b3fa Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t21-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t21-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t21-geometry.webp new file mode 100644 index 00000000..4ce52bfa Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t21-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t22-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t22-colour.webp new file mode 100644 index 00000000..96281a4f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t22-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t22-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t22-geometry.webp new file mode 100644 index 00000000..6a49b359 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t22-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t23-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t23-colour.webp new file mode 100644 index 00000000..93282a22 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t23-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t23-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t23-geometry.webp new file mode 100644 index 00000000..357323b6 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t23-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t24-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t24-colour.webp new file mode 100644 index 00000000..9b51b209 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t24-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t24-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t24-geometry.webp new file mode 100644 index 00000000..536a8e36 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t24-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t25-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t25-colour.webp new file mode 100644 index 00000000..52ab9381 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t25-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t25-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t25-geometry.webp new file mode 100644 index 00000000..00bd7b53 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t25-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t26-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t26-colour.webp new file mode 100644 index 00000000..67900795 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t26-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t26-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t26-geometry.webp new file mode 100644 index 00000000..926b6d03 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t26-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t27-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t27-colour.webp new file mode 100644 index 00000000..e470388d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t27-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t27-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t27-geometry.webp new file mode 100644 index 00000000..3e069ad9 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t27-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t28-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t28-colour.webp new file mode 100644 index 00000000..fca07599 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t28-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t28-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t28-geometry.webp new file mode 100644 index 00000000..f992fa67 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t28-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t29-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t29-colour.webp new file mode 100644 index 00000000..98b06240 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t29-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t29-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t29-geometry.webp new file mode 100644 index 00000000..9bc80668 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t29-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t30-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t30-colour.webp new file mode 100644 index 00000000..f06096e5 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t30-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t30-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t30-geometry.webp new file mode 100644 index 00000000..2ff74765 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t30-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t31-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t31-colour.webp new file mode 100644 index 00000000..39016014 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t31-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-0-t31-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-0-t31-geometry.webp new file mode 100644 index 00000000..5e124463 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-0-t31-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t00-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t00-colour.webp new file mode 100644 index 00000000..248ae9e4 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t00-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t00-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t00-geometry.webp new file mode 100644 index 00000000..697c5955 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t00-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t01-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t01-colour.webp new file mode 100644 index 00000000..ab323931 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t01-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t01-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t01-geometry.webp new file mode 100644 index 00000000..8049b634 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t01-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t02-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t02-colour.webp new file mode 100644 index 00000000..0a99f034 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t02-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t02-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t02-geometry.webp new file mode 100644 index 00000000..68e2575b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t02-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t03-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t03-colour.webp new file mode 100644 index 00000000..fed647f0 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t03-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t03-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t03-geometry.webp new file mode 100644 index 00000000..cacb760c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t03-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t04-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t04-colour.webp new file mode 100644 index 00000000..89356e87 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t04-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t04-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t04-geometry.webp new file mode 100644 index 00000000..7a025acd Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t04-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t05-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t05-colour.webp new file mode 100644 index 00000000..8ce7f6d1 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t05-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t05-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t05-geometry.webp new file mode 100644 index 00000000..ad7acf0a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t05-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t06-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t06-colour.webp new file mode 100644 index 00000000..c912fc5e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t06-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t06-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t06-geometry.webp new file mode 100644 index 00000000..29d957cf Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t06-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t07-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t07-colour.webp new file mode 100644 index 00000000..082c669a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t07-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t07-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t07-geometry.webp new file mode 100644 index 00000000..49612dfc Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t07-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t08-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t08-colour.webp new file mode 100644 index 00000000..76482ea3 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t08-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t08-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t08-geometry.webp new file mode 100644 index 00000000..7ef8d89d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t08-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t09-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t09-colour.webp new file mode 100644 index 00000000..804bff99 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t09-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t09-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t09-geometry.webp new file mode 100644 index 00000000..3ce6d740 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t09-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t10-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t10-colour.webp new file mode 100644 index 00000000..37a320a2 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t10-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t10-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t10-geometry.webp new file mode 100644 index 00000000..e7c86450 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t10-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t11-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t11-colour.webp new file mode 100644 index 00000000..25278477 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t11-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t11-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t11-geometry.webp new file mode 100644 index 00000000..bc9c0e4e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t11-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t12-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t12-colour.webp new file mode 100644 index 00000000..426c460d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t12-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t12-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t12-geometry.webp new file mode 100644 index 00000000..177d2b6c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t12-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t13-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t13-colour.webp new file mode 100644 index 00000000..62956197 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t13-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t13-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t13-geometry.webp new file mode 100644 index 00000000..1f930146 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t13-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t14-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t14-colour.webp new file mode 100644 index 00000000..2eb9cdda Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t14-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t14-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t14-geometry.webp new file mode 100644 index 00000000..8eb04a7f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t14-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t15-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t15-colour.webp new file mode 100644 index 00000000..8758f925 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t15-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t15-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t15-geometry.webp new file mode 100644 index 00000000..5b805c53 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t15-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t16-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t16-colour.webp new file mode 100644 index 00000000..5604fa6e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t16-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t16-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t16-geometry.webp new file mode 100644 index 00000000..c4309d1f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t16-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t17-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t17-colour.webp new file mode 100644 index 00000000..ec7b53ba Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t17-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t17-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t17-geometry.webp new file mode 100644 index 00000000..4ddc5b19 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t17-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t18-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t18-colour.webp new file mode 100644 index 00000000..09e7d28e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t18-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t18-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t18-geometry.webp new file mode 100644 index 00000000..5428f77e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t18-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t19-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t19-colour.webp new file mode 100644 index 00000000..000aa2da Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t19-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t19-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t19-geometry.webp new file mode 100644 index 00000000..919003fa Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t19-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t20-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t20-colour.webp new file mode 100644 index 00000000..98b183f6 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t20-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t20-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t20-geometry.webp new file mode 100644 index 00000000..d3f25a11 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t20-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t21-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t21-colour.webp new file mode 100644 index 00000000..cf4be64a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t21-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t21-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t21-geometry.webp new file mode 100644 index 00000000..dc8e3b7b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t21-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t22-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t22-colour.webp new file mode 100644 index 00000000..4c9e4860 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t22-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t22-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t22-geometry.webp new file mode 100644 index 00000000..0de93dea Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t22-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t23-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t23-colour.webp new file mode 100644 index 00000000..9a0595d8 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t23-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t23-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t23-geometry.webp new file mode 100644 index 00000000..9e122c49 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t23-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t24-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t24-colour.webp new file mode 100644 index 00000000..96c904c5 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t24-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t24-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t24-geometry.webp new file mode 100644 index 00000000..560089f2 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t24-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t25-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t25-colour.webp new file mode 100644 index 00000000..960a6ead Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t25-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t25-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t25-geometry.webp new file mode 100644 index 00000000..15ffc046 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t25-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t26-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t26-colour.webp new file mode 100644 index 00000000..ab25245a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t26-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t26-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t26-geometry.webp new file mode 100644 index 00000000..6ff2fedc Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t26-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t27-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t27-colour.webp new file mode 100644 index 00000000..3d0b3aae Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t27-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t27-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t27-geometry.webp new file mode 100644 index 00000000..753894aa Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t27-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t28-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t28-colour.webp new file mode 100644 index 00000000..28306c67 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t28-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t28-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t28-geometry.webp new file mode 100644 index 00000000..b844dd04 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t28-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t29-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t29-colour.webp new file mode 100644 index 00000000..2059762f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t29-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t29-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t29-geometry.webp new file mode 100644 index 00000000..da95eb9c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t29-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t30-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t30-colour.webp new file mode 100644 index 00000000..a77017f6 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t30-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t30-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t30-geometry.webp new file mode 100644 index 00000000..ea24cc5b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t30-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t31-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t31-colour.webp new file mode 100644 index 00000000..265a0eaf Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t31-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-1-t31-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-1-t31-geometry.webp new file mode 100644 index 00000000..a219a425 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-1-t31-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t00-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t00-colour.webp new file mode 100644 index 00000000..124896eb Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t00-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t00-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t00-geometry.webp new file mode 100644 index 00000000..11103c8e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t00-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t01-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t01-colour.webp new file mode 100644 index 00000000..53cafbfe Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t01-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t01-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t01-geometry.webp new file mode 100644 index 00000000..68777d69 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t01-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t02-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t02-colour.webp new file mode 100644 index 00000000..f10db7cb Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t02-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t02-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t02-geometry.webp new file mode 100644 index 00000000..5a66912b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t02-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t03-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t03-colour.webp new file mode 100644 index 00000000..610bbc9b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t03-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t03-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t03-geometry.webp new file mode 100644 index 00000000..6089b895 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t03-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t04-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t04-colour.webp new file mode 100644 index 00000000..930e9c9d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t04-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t04-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t04-geometry.webp new file mode 100644 index 00000000..deccd7d5 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t04-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t05-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t05-colour.webp new file mode 100644 index 00000000..66494455 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t05-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t05-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t05-geometry.webp new file mode 100644 index 00000000..196d075d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t05-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t06-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t06-colour.webp new file mode 100644 index 00000000..123dbaf1 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t06-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t06-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t06-geometry.webp new file mode 100644 index 00000000..85e38180 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t06-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t07-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t07-colour.webp new file mode 100644 index 00000000..704a3b85 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t07-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t07-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t07-geometry.webp new file mode 100644 index 00000000..411a61d2 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t07-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t08-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t08-colour.webp new file mode 100644 index 00000000..4fcb7b30 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t08-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t08-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t08-geometry.webp new file mode 100644 index 00000000..895dbe12 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t08-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t09-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t09-colour.webp new file mode 100644 index 00000000..7fb26bcb Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t09-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t09-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t09-geometry.webp new file mode 100644 index 00000000..b0a8fcc0 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t09-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t10-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t10-colour.webp new file mode 100644 index 00000000..01a7a3af Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t10-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t10-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t10-geometry.webp new file mode 100644 index 00000000..0ef9a57a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t10-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t11-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t11-colour.webp new file mode 100644 index 00000000..1da9ff0a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t11-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t11-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t11-geometry.webp new file mode 100644 index 00000000..5f42dab8 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t11-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t12-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t12-colour.webp new file mode 100644 index 00000000..169f6883 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t12-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t12-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t12-geometry.webp new file mode 100644 index 00000000..94e21f96 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t12-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t13-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t13-colour.webp new file mode 100644 index 00000000..15a7782d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t13-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t13-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t13-geometry.webp new file mode 100644 index 00000000..212fe130 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t13-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t14-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t14-colour.webp new file mode 100644 index 00000000..3e9d561d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t14-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t14-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t14-geometry.webp new file mode 100644 index 00000000..271a5ab7 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t14-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t15-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t15-colour.webp new file mode 100644 index 00000000..84b10e91 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t15-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t15-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t15-geometry.webp new file mode 100644 index 00000000..6540159f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t15-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t16-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t16-colour.webp new file mode 100644 index 00000000..31e18a2b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t16-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t16-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t16-geometry.webp new file mode 100644 index 00000000..d6d979cb Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t16-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t17-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t17-colour.webp new file mode 100644 index 00000000..e3e08749 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t17-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t17-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t17-geometry.webp new file mode 100644 index 00000000..9b974504 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t17-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t18-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t18-colour.webp new file mode 100644 index 00000000..8dbef8ce Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t18-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t18-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t18-geometry.webp new file mode 100644 index 00000000..3e4edcc4 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t18-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t19-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t19-colour.webp new file mode 100644 index 00000000..dec13f9a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t19-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t19-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t19-geometry.webp new file mode 100644 index 00000000..6a519924 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t19-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t20-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t20-colour.webp new file mode 100644 index 00000000..76a376d0 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t20-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t20-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t20-geometry.webp new file mode 100644 index 00000000..8c5104e8 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t20-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t21-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t21-colour.webp new file mode 100644 index 00000000..43bfe757 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t21-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t21-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t21-geometry.webp new file mode 100644 index 00000000..3a67c175 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t21-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t22-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t22-colour.webp new file mode 100644 index 00000000..452acb8c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t22-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t22-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t22-geometry.webp new file mode 100644 index 00000000..29da5c81 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t22-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t23-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t23-colour.webp new file mode 100644 index 00000000..6160ce2e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t23-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t23-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t23-geometry.webp new file mode 100644 index 00000000..a5482271 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t23-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t24-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t24-colour.webp new file mode 100644 index 00000000..a862266e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t24-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t24-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t24-geometry.webp new file mode 100644 index 00000000..cbd26836 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t24-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t25-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t25-colour.webp new file mode 100644 index 00000000..905b4323 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t25-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t25-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t25-geometry.webp new file mode 100644 index 00000000..c7ad1598 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t25-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t26-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t26-colour.webp new file mode 100644 index 00000000..586b404f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t26-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t26-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t26-geometry.webp new file mode 100644 index 00000000..bf94c2ae Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t26-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t27-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t27-colour.webp new file mode 100644 index 00000000..71a462c9 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t27-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t27-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t27-geometry.webp new file mode 100644 index 00000000..02cca7ee Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t27-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t28-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t28-colour.webp new file mode 100644 index 00000000..176a310e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t28-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t28-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t28-geometry.webp new file mode 100644 index 00000000..4ddf6845 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t28-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t29-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t29-colour.webp new file mode 100644 index 00000000..cc7231ee Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t29-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t29-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t29-geometry.webp new file mode 100644 index 00000000..b5616356 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t29-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t30-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t30-colour.webp new file mode 100644 index 00000000..b8a341d6 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t30-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t30-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t30-geometry.webp new file mode 100644 index 00000000..e06c7602 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t30-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t31-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t31-colour.webp new file mode 100644 index 00000000..9d8935ef Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t31-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-2-t31-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-2-t31-geometry.webp new file mode 100644 index 00000000..6eb0285f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-2-t31-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t00-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t00-colour.webp new file mode 100644 index 00000000..8c5e37c9 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t00-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t00-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t00-geometry.webp new file mode 100644 index 00000000..1a1c8cfa Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t00-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t01-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t01-colour.webp new file mode 100644 index 00000000..2fbe9c4d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t01-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t01-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t01-geometry.webp new file mode 100644 index 00000000..43046c48 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t01-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t02-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t02-colour.webp new file mode 100644 index 00000000..553db335 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t02-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t02-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t02-geometry.webp new file mode 100644 index 00000000..32a036dd Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t02-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t03-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t03-colour.webp new file mode 100644 index 00000000..838a98c6 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t03-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t03-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t03-geometry.webp new file mode 100644 index 00000000..3bcc55ef Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t03-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t04-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t04-colour.webp new file mode 100644 index 00000000..79e31c7c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t04-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t04-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t04-geometry.webp new file mode 100644 index 00000000..e54d037c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t04-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t05-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t05-colour.webp new file mode 100644 index 00000000..609f86f5 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t05-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t05-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t05-geometry.webp new file mode 100644 index 00000000..cdc9659c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t05-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t06-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t06-colour.webp new file mode 100644 index 00000000..ef30680b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t06-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t06-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t06-geometry.webp new file mode 100644 index 00000000..c47c58e8 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t06-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t07-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t07-colour.webp new file mode 100644 index 00000000..96b0b3cf Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t07-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t07-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t07-geometry.webp new file mode 100644 index 00000000..246edc76 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t07-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t08-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t08-colour.webp new file mode 100644 index 00000000..5bc0acb2 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t08-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t08-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t08-geometry.webp new file mode 100644 index 00000000..ecdfbe8d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t08-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t09-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t09-colour.webp new file mode 100644 index 00000000..7fa6e6b6 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t09-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t09-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t09-geometry.webp new file mode 100644 index 00000000..ecdfbe8d Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t09-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t10-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t10-colour.webp new file mode 100644 index 00000000..bec88168 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t10-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t10-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t10-geometry.webp new file mode 100644 index 00000000..717a9188 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t10-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t11-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t11-colour.webp new file mode 100644 index 00000000..7ef3b942 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t11-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t11-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t11-geometry.webp new file mode 100644 index 00000000..774c3af1 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t11-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t12-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t12-colour.webp new file mode 100644 index 00000000..4b7a768b Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t12-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t12-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t12-geometry.webp new file mode 100644 index 00000000..3de8626e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t12-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t13-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t13-colour.webp new file mode 100644 index 00000000..9ce6e645 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t13-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t13-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t13-geometry.webp new file mode 100644 index 00000000..6bfd9ede Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t13-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t14-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t14-colour.webp new file mode 100644 index 00000000..933c47bf Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t14-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t14-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t14-geometry.webp new file mode 100644 index 00000000..bc9df623 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t14-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t15-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t15-colour.webp new file mode 100644 index 00000000..460c1f71 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t15-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t15-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t15-geometry.webp new file mode 100644 index 00000000..bc9df623 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t15-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t16-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t16-colour.webp new file mode 100644 index 00000000..7c586d43 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t16-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t16-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t16-geometry.webp new file mode 100644 index 00000000..6497ba32 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t16-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t17-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t17-colour.webp new file mode 100644 index 00000000..daf41bf1 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t17-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t17-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t17-geometry.webp new file mode 100644 index 00000000..bc9df623 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t17-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t18-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t18-colour.webp new file mode 100644 index 00000000..66cab7c3 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t18-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t18-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t18-geometry.webp new file mode 100644 index 00000000..bc9df623 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t18-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t19-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t19-colour.webp new file mode 100644 index 00000000..8bf562d9 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t19-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t19-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t19-geometry.webp new file mode 100644 index 00000000..bc9df623 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t19-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t20-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t20-colour.webp new file mode 100644 index 00000000..b8c3a0bb Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t20-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t20-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t20-geometry.webp new file mode 100644 index 00000000..6497ba32 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t20-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t21-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t21-colour.webp new file mode 100644 index 00000000..c3ffcda2 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t21-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t21-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t21-geometry.webp new file mode 100644 index 00000000..14c2e95e Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t21-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t22-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t22-colour.webp new file mode 100644 index 00000000..546f03e1 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t22-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t22-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t22-geometry.webp new file mode 100644 index 00000000..17b2c0a7 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t22-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t23-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t23-colour.webp new file mode 100644 index 00000000..8fd8b0fd Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t23-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t23-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t23-geometry.webp new file mode 100644 index 00000000..2e8eff72 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t23-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t24-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t24-colour.webp new file mode 100644 index 00000000..8ef73d34 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t24-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t24-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t24-geometry.webp new file mode 100644 index 00000000..6a8f7a47 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t24-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t25-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t25-colour.webp new file mode 100644 index 00000000..bde2b288 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t25-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t25-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t25-geometry.webp new file mode 100644 index 00000000..b4b144fc Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t25-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t26-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t26-colour.webp new file mode 100644 index 00000000..7d1e8376 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t26-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t26-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t26-geometry.webp new file mode 100644 index 00000000..0f5a6904 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t26-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t27-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t27-colour.webp new file mode 100644 index 00000000..9e9ff5e8 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t27-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t27-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t27-geometry.webp new file mode 100644 index 00000000..5d9023b4 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t27-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t28-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t28-colour.webp new file mode 100644 index 00000000..3b7bb492 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t28-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t28-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t28-geometry.webp new file mode 100644 index 00000000..85099502 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t28-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t29-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t29-colour.webp new file mode 100644 index 00000000..1f2a8a10 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t29-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t29-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t29-geometry.webp new file mode 100644 index 00000000..d2e8f2a7 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t29-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t30-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t30-colour.webp new file mode 100644 index 00000000..91f0851c Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t30-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t30-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t30-geometry.webp new file mode 100644 index 00000000..c8c89c4f Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t30-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t31-colour.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t31-colour.webp new file mode 100644 index 00000000..2612b1f3 Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t31-colour.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/card-3-t31-geometry.webp b/public/ridge/grandcanyon-d411b94d3ada/card-3-t31-geometry.webp new file mode 100644 index 00000000..88fe821a Binary files /dev/null and b/public/ridge/grandcanyon-d411b94d3ada/card-3-t31-geometry.webp differ diff --git a/public/ridge/grandcanyon-d411b94d3ada/manifest.json b/public/ridge/grandcanyon-d411b94d3ada/manifest.json new file mode 100644 index 00000000..45604a9a --- /dev/null +++ b/public/ridge/grandcanyon-d411b94d3ada/manifest.json @@ -0,0 +1,1796 @@ +{ + "schema": 3, + "baker_version": 7, + "bake_id": "d411b94d3ada", + "place": { + "id": "grandcanyon", + "name": "Grand Canyon from Unkar and Cardenas", + "lat": 36.0817, + "lon": -111.8551, + "altitude_km": 0.9182969562014661, + "eye_m": 919.8969562014662, + "tz": "America/Phoenix" + }, + "view": { + "look_az_deg": 290, + "plane_h": 600, + "px_per_deg_h": 17.77777777777778, + "px_per_deg_v": 15.039939126168882, + "exaggeration": 0.8459965758469996, + "horizon_row": 450.0, + "sky_row": 24.0, + "near_row": 396.0, + "ring_w": 6400, + "tile_w": 200, + "tiles": 32, + "apron": 2 + }, + "curvature": { + "r_earth_m": 6371000.0, + "k_ref": 0.13 + }, + "encoding": { + "log_d_min": 6.214608098422191, + "log_d_max": 10.310144223761654, + "normal": "rt8" + }, + "camera": { + "r_max_m": 95.8, + "r_max_forward_m": 198.4 + }, + "cards": [ + { + "near_m": null, + "far_m": 12741.776324217612 + }, + { + "near_m": 12741.776324217612, + "far_m": 19190.966661904076 + }, + { + "near_m": 19190.966661904076, + "far_m": 28904.38444742736 + }, + { + "near_m": 28904.38444742736, + "far_m": null + } + ], + "tiles": [ + [ + { + "top": 331, + "h": 269, + "distance_m": 1563.0859375, + "colour": { + "file": "card-0-t00-colour.webp", + "bytes": 1330 + }, + "geometry": { + "file": "card-0-t00-geometry.webp", + "bytes": 24708 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 12087.9375, + "colour": { + "file": "card-1-t00-colour.webp", + "bytes": 616 + }, + "geometry": { + "file": "card-1-t00-geometry.webp", + "bytes": 2540 + } + }, + { + "top": 410, + "h": 190, + "distance_m": 19672.74609375, + "colour": { + "file": "card-2-t00-colour.webp", + "bytes": 910 + }, + "geometry": { + "file": "card-2-t00-geometry.webp", + "bytes": 7464 + } + }, + { + "top": 423, + "h": 177, + "distance_m": 28594.23828125, + "colour": { + "file": "card-3-t00-colour.webp", + "bytes": 354 + }, + "geometry": { + "file": "card-3-t00-geometry.webp", + "bytes": 420 + } + } + ], + [ + { + "top": 338, + "h": 262, + "distance_m": 1620.000244140625, + "colour": { + "file": "card-0-t01-colour.webp", + "bytes": 1606 + }, + "geometry": { + "file": "card-0-t01-geometry.webp", + "bytes": 25874 + } + }, + { + "top": 378, + "h": 222, + "distance_m": 13092.62109375, + "colour": { + "file": "card-1-t01-colour.webp", + "bytes": 1024 + }, + "geometry": { + "file": "card-1-t01-geometry.webp", + "bytes": 9498 + } + }, + { + "top": 406, + "h": 194, + "distance_m": 18308.744140625, + "colour": { + "file": "card-2-t01-colour.webp", + "bytes": 368 + }, + "geometry": { + "file": "card-2-t01-geometry.webp", + "bytes": 498 + } + }, + { + "top": 423, + "h": 177, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t01-colour.webp", + "bytes": 204 + }, + "geometry": { + "file": "card-3-t01-geometry.webp", + "bytes": 46 + } + } + ], + [ + { + "top": 353, + "h": 247, + "distance_m": 2692.403564453125, + "colour": { + "file": "card-0-t02-colour.webp", + "bytes": 1632 + }, + "geometry": { + "file": "card-0-t02-geometry.webp", + "bytes": 24332 + } + }, + { + "top": 382, + "h": 218, + "distance_m": 16212.6201171875, + "colour": { + "file": "card-1-t02-colour.webp", + "bytes": 414 + }, + "geometry": { + "file": "card-1-t02-geometry.webp", + "bytes": 224 + } + }, + { + "top": 406, + "h": 194, + "distance_m": 17946.91796875, + "colour": { + "file": "card-2-t02-colour.webp", + "bytes": 316 + }, + "geometry": { + "file": "card-2-t02-geometry.webp", + "bytes": 152 + } + }, + { + "top": 424, + "h": 176, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t02-colour.webp", + "bytes": 234 + }, + "geometry": { + "file": "card-3-t02-geometry.webp", + "bytes": 46 + } + } + ], + [ + { + "top": 349, + "h": 251, + "distance_m": 5589.978515625, + "colour": { + "file": "card-0-t03-colour.webp", + "bytes": 1644 + }, + "geometry": { + "file": "card-0-t03-geometry.webp", + "bytes": 26140 + } + }, + { + "top": 385, + "h": 215, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t03-colour.webp", + "bytes": 336 + }, + "geometry": { + "file": "card-1-t03-geometry.webp", + "bytes": 72 + } + }, + { + "top": 409, + "h": 191, + "distance_m": 18148.931640625, + "colour": { + "file": "card-2-t03-colour.webp", + "bytes": 566 + }, + "geometry": { + "file": "card-2-t03-geometry.webp", + "bytes": 2094 + } + }, + { + "top": 424, + "h": 176, + "distance_m": 29900.13671875, + "colour": { + "file": "card-3-t03-colour.webp", + "bytes": 284 + }, + "geometry": { + "file": "card-3-t03-geometry.webp", + "bytes": 114 + } + } + ], + [ + { + "top": 326, + "h": 274, + "distance_m": 5400.00048828125, + "colour": { + "file": "card-0-t04-colour.webp", + "bytes": 1636 + }, + "geometry": { + "file": "card-0-t04-geometry.webp", + "bytes": 23666 + } + }, + { + "top": 387, + "h": 213, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t04-colour.webp", + "bytes": 288 + }, + "geometry": { + "file": "card-1-t04-geometry.webp", + "bytes": 72 + } + }, + { + "top": 414, + "h": 186, + "distance_m": 18644.55078125, + "colour": { + "file": "card-2-t04-colour.webp", + "bytes": 756 + }, + "geometry": { + "file": "card-2-t04-geometry.webp", + "bytes": 5726 + } + }, + { + "top": 427, + "h": 173, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t04-colour.webp", + "bytes": 264 + }, + "geometry": { + "file": "card-3-t04-geometry.webp", + "bytes": 116 + } + } + ], + [ + { + "top": 296, + "h": 304, + "distance_m": 6250.08154296875, + "colour": { + "file": "card-0-t05-colour.webp", + "bytes": 1542 + }, + "geometry": { + "file": "card-0-t05-geometry.webp", + "bytes": 17214 + } + }, + { + "top": 390, + "h": 210, + "distance_m": 11934.1728515625, + "colour": { + "file": "card-1-t05-colour.webp", + "bytes": 330 + }, + "geometry": { + "file": "card-1-t05-geometry.webp", + "bytes": 200 + } + }, + { + "top": 415, + "h": 185, + "distance_m": 19785.46875, + "colour": { + "file": "card-2-t05-colour.webp", + "bytes": 458 + }, + "geometry": { + "file": "card-2-t05-geometry.webp", + "bytes": 588 + } + }, + { + "top": 429, + "h": 171, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t05-colour.webp", + "bytes": 262 + }, + "geometry": { + "file": "card-3-t05-geometry.webp", + "bytes": 122 + } + } + ], + [ + { + "top": 240, + "h": 360, + "distance_m": 4626.02001953125, + "colour": { + "file": "card-0-t06-colour.webp", + "bytes": 1452 + }, + "geometry": { + "file": "card-0-t06-geometry.webp", + "bytes": 11530 + } + }, + { + "top": 394, + "h": 206, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t06-colour.webp", + "bytes": 386 + }, + "geometry": { + "file": "card-1-t06-geometry.webp", + "bytes": 96 + } + }, + { + "top": 418, + "h": 182, + "distance_m": 17946.91796875, + "colour": { + "file": "card-2-t06-colour.webp", + "bytes": 260 + }, + "geometry": { + "file": "card-2-t06-geometry.webp", + "bytes": 66 + } + }, + { + "top": 429, + "h": 171, + "distance_m": 27179.58203125, + "colour": { + "file": "card-3-t06-colour.webp", + "bytes": 304 + }, + "geometry": { + "file": "card-3-t06-geometry.webp", + "bytes": 228 + } + } + ], + [ + { + "top": 168, + "h": 432, + "distance_m": 580.0, + "colour": { + "file": "card-0-t07-colour.webp", + "bytes": 1274 + }, + "geometry": { + "file": "card-0-t07-geometry.webp", + "bytes": 3948 + } + }, + { + "top": 399, + "h": 201, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t07-colour.webp", + "bytes": 278 + }, + "geometry": { + "file": "card-1-t07-geometry.webp", + "bytes": 106 + } + }, + { + "top": 421, + "h": 179, + "distance_m": 18163.146484375, + "colour": { + "file": "card-2-t07-colour.webp", + "bytes": 458 + }, + "geometry": { + "file": "card-2-t07-geometry.webp", + "bytes": 1330 + } + }, + { + "top": 432, + "h": 168, + "distance_m": 27182.900390625, + "colour": { + "file": "card-3-t07-colour.webp", + "bytes": 254 + }, + "geometry": { + "file": "card-3-t07-geometry.webp", + "bytes": 134 + } + } + ], + [ + { + "top": 66, + "h": 534, + "distance_m": 557.5186157226562, + "colour": { + "file": "card-0-t08-colour.webp", + "bytes": 1440 + }, + "geometry": { + "file": "card-0-t08-geometry.webp", + "bytes": 4234 + } + }, + { + "top": 394, + "h": 206, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t08-colour.webp", + "bytes": 288 + }, + "geometry": { + "file": "card-1-t08-geometry.webp", + "bytes": 164 + } + }, + { + "top": 420, + "h": 180, + "distance_m": 18251.51171875, + "colour": { + "file": "card-2-t08-colour.webp", + "bytes": 868 + }, + "geometry": { + "file": "card-2-t08-geometry.webp", + "bytes": 3768 + } + }, + { + "top": 431, + "h": 169, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t08-colour.webp", + "bytes": 264 + }, + "geometry": { + "file": "card-3-t08-geometry.webp", + "bytes": 46 + } + } + ], + [ + { + "top": 24, + "h": 576, + "distance_m": 527.2847290039062, + "colour": { + "file": "card-0-t09-colour.webp", + "bytes": 1050 + }, + "geometry": { + "file": "card-0-t09-geometry.webp", + "bytes": 4474 + } + }, + { + "top": 391, + "h": 209, + "distance_m": 12120.7451171875, + "colour": { + "file": "card-1-t09-colour.webp", + "bytes": 280 + }, + "geometry": { + "file": "card-1-t09-geometry.webp", + "bytes": 160 + } + }, + { + "top": 415, + "h": 185, + "distance_m": 18090.78125, + "colour": { + "file": "card-2-t09-colour.webp", + "bytes": 452 + }, + "geometry": { + "file": "card-2-t09-geometry.webp", + "bytes": 1402 + } + }, + { + "top": 431, + "h": 169, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t09-colour.webp", + "bytes": 242 + }, + "geometry": { + "file": "card-3-t09-geometry.webp", + "bytes": 46 + } + } + ], + [ + { + "top": 24, + "h": 576, + "distance_m": 579.9200439453125, + "colour": { + "file": "card-0-t10-colour.webp", + "bytes": 1254 + }, + "geometry": { + "file": "card-0-t10-geometry.webp", + "bytes": 8156 + } + }, + { + "top": 388, + "h": 212, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t10-colour.webp", + "bytes": 270 + }, + "geometry": { + "file": "card-1-t10-geometry.webp", + "bytes": 110 + } + }, + { + "top": 415, + "h": 185, + "distance_m": 18521.453125, + "colour": { + "file": "card-2-t10-colour.webp", + "bytes": 802 + }, + "geometry": { + "file": "card-2-t10-geometry.webp", + "bytes": 4534 + } + }, + { + "top": 428, + "h": 172, + "distance_m": 27291.634765625, + "colour": { + "file": "card-3-t10-colour.webp", + "bytes": 312 + }, + "geometry": { + "file": "card-3-t10-geometry.webp", + "bytes": 278 + } + } + ], + [ + { + "top": 53, + "h": 547, + "distance_m": 630.2824096679688, + "colour": { + "file": "card-0-t11-colour.webp", + "bytes": 1224 + }, + "geometry": { + "file": "card-0-t11-geometry.webp", + "bytes": 11310 + } + }, + { + "top": 369, + "h": 231, + "distance_m": 12087.9375, + "colour": { + "file": "card-1-t11-colour.webp", + "bytes": 550 + }, + "geometry": { + "file": "card-1-t11-geometry.webp", + "bytes": 660 + } + }, + { + "top": 409, + "h": 191, + "distance_m": 18737.1328125, + "colour": { + "file": "card-2-t11-colour.webp", + "bytes": 500 + }, + "geometry": { + "file": "card-2-t11-geometry.webp", + "bytes": 1636 + } + }, + { + "top": 412, + "h": 188, + "distance_m": 27481.455078125, + "colour": { + "file": "card-3-t11-colour.webp", + "bytes": 556 + }, + "geometry": { + "file": "card-3-t11-geometry.webp", + "bytes": 1352 + } + } + ], + [ + { + "top": 82, + "h": 518, + "distance_m": 727.6077880859375, + "colour": { + "file": "card-0-t12-colour.webp", + "bytes": 1194 + }, + "geometry": { + "file": "card-0-t12-geometry.webp", + "bytes": 11624 + } + }, + { + "top": 367, + "h": 233, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t12-colour.webp", + "bytes": 324 + }, + "geometry": { + "file": "card-1-t12-geometry.webp", + "bytes": 72 + } + }, + { + "top": 403, + "h": 197, + "distance_m": 23856.0, + "colour": { + "file": "card-2-t12-colour.webp", + "bytes": 366 + }, + "geometry": { + "file": "card-2-t12-geometry.webp", + "bytes": 386 + } + }, + { + "top": 412, + "h": 188, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t12-colour.webp", + "bytes": 388 + }, + "geometry": { + "file": "card-3-t12-geometry.webp", + "bytes": 146 + } + } + ], + [ + { + "top": 67, + "h": 533, + "distance_m": 774.0208740234375, + "colour": { + "file": "card-0-t13-colour.webp", + "bytes": 1224 + }, + "geometry": { + "file": "card-0-t13-geometry.webp", + "bytes": 13684 + } + }, + { + "top": 368, + "h": 232, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t13-colour.webp", + "bytes": 338 + }, + "geometry": { + "file": "card-1-t13-geometry.webp", + "bytes": 84 + } + }, + { + "top": 402, + "h": 198, + "distance_m": 20803.544921875, + "colour": { + "file": "card-2-t13-colour.webp", + "bytes": 362 + }, + "geometry": { + "file": "card-2-t13-geometry.webp", + "bytes": 468 + } + }, + { + "top": 414, + "h": 186, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t13-colour.webp", + "bytes": 338 + }, + "geometry": { + "file": "card-3-t13-geometry.webp", + "bytes": 76 + } + } + ], + [ + { + "top": 81, + "h": 519, + "distance_m": 713.8606567382812, + "colour": { + "file": "card-0-t14-colour.webp", + "bytes": 1348 + }, + "geometry": { + "file": "card-0-t14-geometry.webp", + "bytes": 18872 + } + }, + { + "top": 369, + "h": 231, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t14-colour.webp", + "bytes": 304 + }, + "geometry": { + "file": "card-1-t14-geometry.webp", + "bytes": 76 + } + }, + { + "top": 399, + "h": 201, + "distance_m": 20683.802734375, + "colour": { + "file": "card-2-t14-colour.webp", + "bytes": 430 + }, + "geometry": { + "file": "card-2-t14-geometry.webp", + "bytes": 892 + } + }, + { + "top": 414, + "h": 186, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t14-colour.webp", + "bytes": 304 + }, + "geometry": { + "file": "card-3-t14-geometry.webp", + "bytes": 48 + } + } + ], + [ + { + "top": 117, + "h": 483, + "distance_m": 699.9999389648438, + "colour": { + "file": "card-0-t15-colour.webp", + "bytes": 1254 + }, + "geometry": { + "file": "card-0-t15-geometry.webp", + "bytes": 17850 + } + }, + { + "top": 369, + "h": 231, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t15-colour.webp", + "bytes": 282 + }, + "geometry": { + "file": "card-1-t15-geometry.webp", + "bytes": 50 + } + }, + { + "top": 397, + "h": 203, + "distance_m": 20034.69921875, + "colour": { + "file": "card-2-t15-colour.webp", + "bytes": 412 + }, + "geometry": { + "file": "card-2-t15-geometry.webp", + "bytes": 1432 + } + }, + { + "top": 414, + "h": 186, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t15-colour.webp", + "bytes": 266 + }, + "geometry": { + "file": "card-3-t15-geometry.webp", + "bytes": 48 + } + } + ], + [ + { + "top": 228, + "h": 372, + "distance_m": 902.6199951171875, + "colour": { + "file": "card-0-t16-colour.webp", + "bytes": 1214 + }, + "geometry": { + "file": "card-0-t16-geometry.webp", + "bytes": 15780 + } + }, + { + "top": 366, + "h": 234, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t16-colour.webp", + "bytes": 308 + }, + "geometry": { + "file": "card-1-t16-geometry.webp", + "bytes": 68 + } + }, + { + "top": 393, + "h": 207, + "distance_m": 19963.576171875, + "colour": { + "file": "card-2-t16-colour.webp", + "bytes": 428 + }, + "geometry": { + "file": "card-2-t16-geometry.webp", + "bytes": 1096 + } + }, + { + "top": 415, + "h": 185, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t16-colour.webp", + "bytes": 238 + }, + "geometry": { + "file": "card-3-t16-geometry.webp", + "bytes": 48 + } + } + ], + [ + { + "top": 273, + "h": 327, + "distance_m": 4008.74755859375, + "colour": { + "file": "card-0-t17-colour.webp", + "bytes": 1426 + }, + "geometry": { + "file": "card-0-t17-geometry.webp", + "bytes": 18432 + } + }, + { + "top": 363, + "h": 237, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t17-colour.webp", + "bytes": 298 + }, + "geometry": { + "file": "card-1-t17-geometry.webp", + "bytes": 72 + } + }, + { + "top": 387, + "h": 213, + "distance_m": 18090.78125, + "colour": { + "file": "card-2-t17-colour.webp", + "bytes": 366 + }, + "geometry": { + "file": "card-2-t17-geometry.webp", + "bytes": 282 + } + }, + { + "top": 414, + "h": 186, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t17-colour.webp", + "bytes": 256 + }, + "geometry": { + "file": "card-3-t17-geometry.webp", + "bytes": 48 + } + } + ], + [ + { + "top": 300, + "h": 300, + "distance_m": 540.0000610351562, + "colour": { + "file": "card-0-t18-colour.webp", + "bytes": 812 + }, + "geometry": { + "file": "card-0-t18-geometry.webp", + "bytes": 13732 + } + }, + { + "top": 362, + "h": 238, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t18-colour.webp", + "bytes": 262 + }, + "geometry": { + "file": "card-1-t18-geometry.webp", + "bytes": 62 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 17946.91796875, + "colour": { + "file": "card-2-t18-colour.webp", + "bytes": 330 + }, + "geometry": { + "file": "card-2-t18-geometry.webp", + "bytes": 58 + } + }, + { + "top": 414, + "h": 186, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t18-colour.webp", + "bytes": 308 + }, + "geometry": { + "file": "card-3-t18-geometry.webp", + "bytes": 48 + } + } + ], + [ + { + "top": 324, + "h": 276, + "distance_m": 533.6065673828125, + "colour": { + "file": "card-0-t19-colour.webp", + "bytes": 626 + }, + "geometry": { + "file": "card-0-t19-geometry.webp", + "bytes": 8752 + } + }, + { + "top": 362, + "h": 238, + "distance_m": 13381.708984375, + "colour": { + "file": "card-1-t19-colour.webp", + "bytes": 786 + }, + "geometry": { + "file": "card-1-t19-geometry.webp", + "bytes": 2906 + } + }, + { + "top": 387, + "h": 213, + "distance_m": 17946.91796875, + "colour": { + "file": "card-2-t19-colour.webp", + "bytes": 262 + }, + "geometry": { + "file": "card-2-t19-geometry.webp", + "bytes": 48 + } + }, + { + "top": 414, + "h": 186, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t19-colour.webp", + "bytes": 248 + }, + "geometry": { + "file": "card-3-t19-geometry.webp", + "bytes": 48 + } + } + ], + [ + { + "top": 349, + "h": 251, + "distance_m": 528.2322387695312, + "colour": { + "file": "card-0-t20-colour.webp", + "bytes": 676 + }, + "geometry": { + "file": "card-0-t20-geometry.webp", + "bytes": 5564 + } + }, + { + "top": 375, + "h": 225, + "distance_m": 13652.9033203125, + "colour": { + "file": "card-1-t20-colour.webp", + "bytes": 1164 + }, + "geometry": { + "file": "card-1-t20-geometry.webp", + "bytes": 12072 + } + }, + { + "top": 387, + "h": 213, + "distance_m": 17946.91796875, + "colour": { + "file": "card-2-t20-colour.webp", + "bytes": 276 + }, + "geometry": { + "file": "card-2-t20-geometry.webp", + "bytes": 92 + } + }, + { + "top": 415, + "h": 185, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t20-colour.webp", + "bytes": 284 + }, + "geometry": { + "file": "card-3-t20-geometry.webp", + "bytes": 48 + } + } + ], + [ + { + "top": 362, + "h": 238, + "distance_m": 548.2117919921875, + "colour": { + "file": "card-0-t21-colour.webp", + "bytes": 820 + }, + "geometry": { + "file": "card-0-t21-geometry.webp", + "bytes": 6532 + } + }, + { + "top": 380, + "h": 220, + "distance_m": 14602.0859375, + "colour": { + "file": "card-1-t21-colour.webp", + "bytes": 1876 + }, + "geometry": { + "file": "card-1-t21-geometry.webp", + "bytes": 10528 + } + }, + { + "top": 388, + "h": 212, + "distance_m": 18265.353515625, + "colour": { + "file": "card-2-t21-colour.webp", + "bytes": 770 + }, + "geometry": { + "file": "card-2-t21-geometry.webp", + "bytes": 4600 + } + }, + { + "top": 416, + "h": 184, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t21-colour.webp", + "bytes": 274 + }, + "geometry": { + "file": "card-3-t21-geometry.webp", + "bytes": 48 + } + } + ], + [ + { + "top": 352, + "h": 248, + "distance_m": 573.6212158203125, + "colour": { + "file": "card-0-t22-colour.webp", + "bytes": 1168 + }, + "geometry": { + "file": "card-0-t22-geometry.webp", + "bytes": 13124 + } + }, + { + "top": 391, + "h": 209, + "distance_m": 16038.8134765625, + "colour": { + "file": "card-1-t22-colour.webp", + "bytes": 3002 + }, + "geometry": { + "file": "card-1-t22-geometry.webp", + "bytes": 12814 + } + }, + { + "top": 391, + "h": 209, + "distance_m": 18698.236328125, + "colour": { + "file": "card-2-t22-colour.webp", + "bytes": 1020 + }, + "geometry": { + "file": "card-2-t22-geometry.webp", + "bytes": 7916 + } + }, + { + "top": 415, + "h": 185, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t22-colour.webp", + "bytes": 288 + }, + "geometry": { + "file": "card-3-t22-geometry.webp", + "bytes": 58 + } + } + ], + [ + { + "top": 308, + "h": 292, + "distance_m": 4001.017333984375, + "colour": { + "file": "card-0-t23-colour.webp", + "bytes": 1710 + }, + "geometry": { + "file": "card-0-t23-geometry.webp", + "bytes": 24328 + } + }, + { + "top": 395, + "h": 205, + "distance_m": 13116.75390625, + "colour": { + "file": "card-1-t23-colour.webp", + "bytes": 1672 + }, + "geometry": { + "file": "card-1-t23-geometry.webp", + "bytes": 8016 + } + }, + { + "top": 395, + "h": 205, + "distance_m": 19894.794921875, + "colour": { + "file": "card-2-t23-colour.webp", + "bytes": 858 + }, + "geometry": { + "file": "card-2-t23-geometry.webp", + "bytes": 5726 + } + }, + { + "top": 413, + "h": 187, + "distance_m": 28205.7734375, + "colour": { + "file": "card-3-t23-colour.webp", + "bytes": 424 + }, + "geometry": { + "file": "card-3-t23-geometry.webp", + "bytes": 194 + } + } + ], + [ + { + "top": 293, + "h": 307, + "distance_m": 2579.48681640625, + "colour": { + "file": "card-0-t24-colour.webp", + "bytes": 2068 + }, + "geometry": { + "file": "card-0-t24-geometry.webp", + "bytes": 32102 + } + }, + { + "top": 374, + "h": 226, + "distance_m": 12125.716796875, + "colour": { + "file": "card-1-t24-colour.webp", + "bytes": 828 + }, + "geometry": { + "file": "card-1-t24-geometry.webp", + "bytes": 3954 + } + }, + { + "top": 420, + "h": 180, + "distance_m": 19130.62890625, + "colour": { + "file": "card-2-t24-colour.webp", + "bytes": 648 + }, + "geometry": { + "file": "card-2-t24-geometry.webp", + "bytes": 2584 + } + }, + { + "top": 425, + "h": 175, + "distance_m": 28424.0390625, + "colour": { + "file": "card-3-t24-colour.webp", + "bytes": 714 + }, + "geometry": { + "file": "card-3-t24-geometry.webp", + "bytes": 3666 + } + } + ], + [ + { + "top": 322, + "h": 278, + "distance_m": 1288.96923828125, + "colour": { + "file": "card-0-t25-colour.webp", + "bytes": 1922 + }, + "geometry": { + "file": "card-0-t25-geometry.webp", + "bytes": 32830 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 13197.5732421875, + "colour": { + "file": "card-1-t25-colour.webp", + "bytes": 910 + }, + "geometry": { + "file": "card-1-t25-geometry.webp", + "bytes": 6308 + } + }, + { + "top": 404, + "h": 196, + "distance_m": 22927.611328125, + "colour": { + "file": "card-2-t25-colour.webp", + "bytes": 878 + }, + "geometry": { + "file": "card-2-t25-geometry.webp", + "bytes": 1844 + } + }, + { + "top": 409, + "h": 191, + "distance_m": 28034.6015625, + "colour": { + "file": "card-3-t25-colour.webp", + "bytes": 870 + }, + "geometry": { + "file": "card-3-t25-geometry.webp", + "bytes": 4570 + } + } + ], + [ + { + "top": 313, + "h": 287, + "distance_m": 1936.9310302734375, + "colour": { + "file": "card-0-t26-colour.webp", + "bytes": 2232 + }, + "geometry": { + "file": "card-0-t26-geometry.webp", + "bytes": 33300 + } + }, + { + "top": 341, + "h": 259, + "distance_m": 12153.501953125, + "colour": { + "file": "card-1-t26-colour.webp", + "bytes": 722 + }, + "geometry": { + "file": "card-1-t26-geometry.webp", + "bytes": 2644 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 21626.201171875, + "colour": { + "file": "card-2-t26-colour.webp", + "bytes": 1146 + }, + "geometry": { + "file": "card-2-t26-geometry.webp", + "bytes": 4116 + } + }, + { + "top": 403, + "h": 197, + "distance_m": 27097.666015625, + "colour": { + "file": "card-3-t26-colour.webp", + "bytes": 298 + }, + "geometry": { + "file": "card-3-t26-geometry.webp", + "bytes": 184 + } + } + ], + [ + { + "top": 313, + "h": 287, + "distance_m": 1789.509033203125, + "colour": { + "file": "card-0-t27-colour.webp", + "bytes": 1510 + }, + "geometry": { + "file": "card-0-t27-geometry.webp", + "bytes": 29232 + } + }, + { + "top": 339, + "h": 261, + "distance_m": 11896.4462890625, + "colour": { + "file": "card-1-t27-colour.webp", + "bytes": 258 + }, + "geometry": { + "file": "card-1-t27-geometry.webp", + "bytes": 136 + } + }, + { + "top": 375, + "h": 225, + "distance_m": 22704.583984375, + "colour": { + "file": "card-2-t27-colour.webp", + "bytes": 794 + }, + "geometry": { + "file": "card-2-t27-geometry.webp", + "bytes": 1298 + } + }, + { + "top": 398, + "h": 202, + "distance_m": 26966.732421875, + "colour": { + "file": "card-3-t27-colour.webp", + "bytes": 248 + }, + "geometry": { + "file": "card-3-t27-geometry.webp", + "bytes": 152 + } + } + ], + [ + { + "top": 286, + "h": 314, + "distance_m": 1824.2069091796875, + "colour": { + "file": "card-0-t28-colour.webp", + "bytes": 1896 + }, + "geometry": { + "file": "card-0-t28-geometry.webp", + "bytes": 32734 + } + }, + { + "top": 338, + "h": 262, + "distance_m": 12100.0244140625, + "colour": { + "file": "card-1-t28-colour.webp", + "bytes": 820 + }, + "geometry": { + "file": "card-1-t28-geometry.webp", + "bytes": 2906 + } + }, + { + "top": 372, + "h": 228, + "distance_m": 17946.91796875, + "colour": { + "file": "card-2-t28-colour.webp", + "bytes": 252 + }, + "geometry": { + "file": "card-2-t28-geometry.webp", + "bytes": 126 + } + }, + { + "top": 395, + "h": 205, + "distance_m": 27400.80078125, + "colour": { + "file": "card-3-t28-colour.webp", + "bytes": 240 + }, + "geometry": { + "file": "card-3-t28-geometry.webp", + "bytes": 232 + } + } + ], + [ + { + "top": 259, + "h": 341, + "distance_m": 1952.825439453125, + "colour": { + "file": "card-0-t29-colour.webp", + "bytes": 1860 + }, + "geometry": { + "file": "card-0-t29-geometry.webp", + "bytes": 35160 + } + }, + { + "top": 341, + "h": 259, + "distance_m": 12648.30078125, + "colour": { + "file": "card-1-t29-colour.webp", + "bytes": 1504 + }, + "geometry": { + "file": "card-1-t29-geometry.webp", + "bytes": 8392 + } + }, + { + "top": 372, + "h": 228, + "distance_m": 18018.396484375, + "colour": { + "file": "card-2-t29-colour.webp", + "bytes": 458 + }, + "geometry": { + "file": "card-2-t29-geometry.webp", + "bytes": 630 + } + }, + { + "top": 395, + "h": 205, + "distance_m": 27240.720703125, + "colour": { + "file": "card-3-t29-colour.webp", + "bytes": 488 + }, + "geometry": { + "file": "card-3-t29-geometry.webp", + "bytes": 1446 + } + } + ], + [ + { + "top": 293, + "h": 307, + "distance_m": 1380.0001220703125, + "colour": { + "file": "card-0-t30-colour.webp", + "bytes": 1650 + }, + "geometry": { + "file": "card-0-t30-geometry.webp", + "bytes": 28478 + } + }, + { + "top": 358, + "h": 242, + "distance_m": 12885.2138671875, + "colour": { + "file": "card-1-t30-colour.webp", + "bytes": 1030 + }, + "geometry": { + "file": "card-1-t30-geometry.webp", + "bytes": 7834 + } + }, + { + "top": 392, + "h": 208, + "distance_m": 18018.70703125, + "colour": { + "file": "card-2-t30-colour.webp", + "bytes": 760 + }, + "geometry": { + "file": "card-2-t30-geometry.webp", + "bytes": 1218 + } + }, + { + "top": 400, + "h": 200, + "distance_m": 27202.21875, + "colour": { + "file": "card-3-t30-colour.webp", + "bytes": 642 + }, + "geometry": { + "file": "card-3-t30-geometry.webp", + "bytes": 1606 + } + } + ], + [ + { + "top": 299, + "h": 301, + "distance_m": 1280.1490478515625, + "colour": { + "file": "card-0-t31-colour.webp", + "bytes": 1408 + }, + "geometry": { + "file": "card-0-t31-geometry.webp", + "bytes": 24824 + } + }, + { + "top": 376, + "h": 224, + "distance_m": 12544.7021484375, + "colour": { + "file": "card-1-t31-colour.webp", + "bytes": 850 + }, + "geometry": { + "file": "card-1-t31-geometry.webp", + "bytes": 7268 + } + }, + { + "top": 410, + "h": 190, + "distance_m": 20441.794921875, + "colour": { + "file": "card-2-t31-colour.webp", + "bytes": 810 + }, + "geometry": { + "file": "card-2-t31-geometry.webp", + "bytes": 5750 + } + }, + { + "top": 411, + "h": 189, + "distance_m": 27730.93359375, + "colour": { + "file": "card-3-t31-colour.webp", + "bytes": 664 + }, + "geometry": { + "file": "card-3-t31-geometry.webp", + "bytes": 1224 + } + } + ] + ], + "bytes": 886744, + "attribution": { + "credit_line": "Contains modified Copernicus data: DEM \u00a9 DLR e.V. 2010-2014 and \u00a9 Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.", + "licence": "Copernicus DEM licence: free, full and open access, with the credit line shown", + "dem_source": "Copernicus DEM GLO-30 (30 m)", + "url": "https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model" + } +} diff --git a/public/ridge/index.json b/public/ridge/index.json new file mode 100644 index 00000000..4b1c1657 --- /dev/null +++ b/public/ridge/index.json @@ -0,0 +1,11 @@ +{ + "schema": 1, + "default": "vienna", + "places": { + "vienna": "vienna-f50ec31ee950", + "fuji": "fuji-8dac36611b90", + "matterhorn": "matterhorn-f4fa1ba3556c", + "amadablam": "amadablam-fb4b9d3701f8", + "grandcanyon": "grandcanyon-d411b94d3ada" + } +} diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t00-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t00-colour.webp new file mode 100644 index 00000000..c173391d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t00-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t00-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t00-geometry.webp new file mode 100644 index 00000000..b307fd19 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t00-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t01-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t01-colour.webp new file mode 100644 index 00000000..4feed37d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t01-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t01-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t01-geometry.webp new file mode 100644 index 00000000..b8753439 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t01-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t02-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t02-colour.webp new file mode 100644 index 00000000..a7694a1f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t02-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t02-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t02-geometry.webp new file mode 100644 index 00000000..14e07e74 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t02-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t03-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t03-colour.webp new file mode 100644 index 00000000..e960d331 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t03-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t03-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t03-geometry.webp new file mode 100644 index 00000000..6b65138f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t03-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t04-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t04-colour.webp new file mode 100644 index 00000000..bad5a964 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t04-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t04-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t04-geometry.webp new file mode 100644 index 00000000..1b523f03 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t04-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t05-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t05-colour.webp new file mode 100644 index 00000000..2e0876cb Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t05-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t05-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t05-geometry.webp new file mode 100644 index 00000000..781a5fa7 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t05-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t06-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t06-colour.webp new file mode 100644 index 00000000..f37725fc Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t06-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t06-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t06-geometry.webp new file mode 100644 index 00000000..51bda1e0 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t06-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t07-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t07-colour.webp new file mode 100644 index 00000000..af1a77f9 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t07-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t07-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t07-geometry.webp new file mode 100644 index 00000000..5777463e Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t07-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t08-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t08-colour.webp new file mode 100644 index 00000000..037aa415 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t08-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t08-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t08-geometry.webp new file mode 100644 index 00000000..760b2f51 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t08-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t09-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t09-colour.webp new file mode 100644 index 00000000..ea1f3551 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t09-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t09-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t09-geometry.webp new file mode 100644 index 00000000..1e79ac7d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t09-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t10-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t10-colour.webp new file mode 100644 index 00000000..d9774521 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t10-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t10-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t10-geometry.webp new file mode 100644 index 00000000..d706dafe Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t10-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t11-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t11-colour.webp new file mode 100644 index 00000000..90e94574 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t11-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t11-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t11-geometry.webp new file mode 100644 index 00000000..1722bfdb Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t11-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t12-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t12-colour.webp new file mode 100644 index 00000000..cea24ecd Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t12-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t12-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t12-geometry.webp new file mode 100644 index 00000000..8e081495 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t12-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t13-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t13-colour.webp new file mode 100644 index 00000000..7de285bc Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t13-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t13-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t13-geometry.webp new file mode 100644 index 00000000..2f69d037 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t13-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t14-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t14-colour.webp new file mode 100644 index 00000000..a605c3e4 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t14-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t14-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t14-geometry.webp new file mode 100644 index 00000000..b74195e9 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t14-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t15-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t15-colour.webp new file mode 100644 index 00000000..c746c2c3 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t15-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t15-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t15-geometry.webp new file mode 100644 index 00000000..2fbfb850 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t15-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t16-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t16-colour.webp new file mode 100644 index 00000000..5b49d603 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t16-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t16-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t16-geometry.webp new file mode 100644 index 00000000..47fc0546 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t16-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t17-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t17-colour.webp new file mode 100644 index 00000000..14304969 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t17-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t17-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t17-geometry.webp new file mode 100644 index 00000000..78374333 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t17-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t18-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t18-colour.webp new file mode 100644 index 00000000..baa9015c Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t18-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t18-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t18-geometry.webp new file mode 100644 index 00000000..29815f06 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t18-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t19-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t19-colour.webp new file mode 100644 index 00000000..1d47b113 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t19-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t19-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t19-geometry.webp new file mode 100644 index 00000000..a04c07db Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t19-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t20-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t20-colour.webp new file mode 100644 index 00000000..bfae6412 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t20-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t20-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t20-geometry.webp new file mode 100644 index 00000000..2dd694b5 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t20-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t21-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t21-colour.webp new file mode 100644 index 00000000..e7ea10ba Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t21-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t21-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t21-geometry.webp new file mode 100644 index 00000000..eb4cc7a3 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t21-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t22-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t22-colour.webp new file mode 100644 index 00000000..ddc5f0bb Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t22-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t22-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t22-geometry.webp new file mode 100644 index 00000000..7df790b6 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t22-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t23-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t23-colour.webp new file mode 100644 index 00000000..0bad763d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t23-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t23-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t23-geometry.webp new file mode 100644 index 00000000..6028ecc3 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t23-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t24-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t24-colour.webp new file mode 100644 index 00000000..4a07f61c Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t24-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t24-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t24-geometry.webp new file mode 100644 index 00000000..415b7004 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t24-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t25-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t25-colour.webp new file mode 100644 index 00000000..693d5fed Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t25-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t25-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t25-geometry.webp new file mode 100644 index 00000000..dca26970 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t25-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t26-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t26-colour.webp new file mode 100644 index 00000000..61d38177 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t26-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t26-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t26-geometry.webp new file mode 100644 index 00000000..37d8783b Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t26-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t27-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t27-colour.webp new file mode 100644 index 00000000..d3238c33 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t27-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t27-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t27-geometry.webp new file mode 100644 index 00000000..24854685 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t27-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t28-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t28-colour.webp new file mode 100644 index 00000000..bb344d6c Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t28-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t28-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t28-geometry.webp new file mode 100644 index 00000000..0f80cf45 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t28-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t29-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t29-colour.webp new file mode 100644 index 00000000..0c50afa5 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t29-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t29-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t29-geometry.webp new file mode 100644 index 00000000..caa1156a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t29-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t30-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t30-colour.webp new file mode 100644 index 00000000..68b04fc5 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t30-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t30-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t30-geometry.webp new file mode 100644 index 00000000..7a4bb6f2 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t30-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t31-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t31-colour.webp new file mode 100644 index 00000000..93f88317 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t31-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-0-t31-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t31-geometry.webp new file mode 100644 index 00000000..73867067 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-0-t31-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t00-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t00-colour.webp new file mode 100644 index 00000000..da7d3b5f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t00-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t00-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t00-geometry.webp new file mode 100644 index 00000000..ed1a33d8 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t00-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t01-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t01-colour.webp new file mode 100644 index 00000000..5d5d53e8 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t01-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t01-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t01-geometry.webp new file mode 100644 index 00000000..e4ab11ed Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t01-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t02-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t02-colour.webp new file mode 100644 index 00000000..fad78400 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t02-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t02-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t02-geometry.webp new file mode 100644 index 00000000..a4e5aa87 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t02-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t03-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t03-colour.webp new file mode 100644 index 00000000..c64c485c Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t03-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t03-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t03-geometry.webp new file mode 100644 index 00000000..8e0ab0f8 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t03-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t04-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t04-colour.webp new file mode 100644 index 00000000..d8a8e317 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t04-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t04-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t04-geometry.webp new file mode 100644 index 00000000..4e869919 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t04-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t05-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t05-colour.webp new file mode 100644 index 00000000..5a3bd786 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t05-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t05-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t05-geometry.webp new file mode 100644 index 00000000..82306738 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t05-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t06-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t06-colour.webp new file mode 100644 index 00000000..dd86e9e4 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t06-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t06-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t06-geometry.webp new file mode 100644 index 00000000..94195d8b Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t06-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t07-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t07-colour.webp new file mode 100644 index 00000000..0f35e691 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t07-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t07-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t07-geometry.webp new file mode 100644 index 00000000..50b7627b Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t07-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t08-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t08-colour.webp new file mode 100644 index 00000000..b0e40c1d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t08-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t08-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t08-geometry.webp new file mode 100644 index 00000000..af7f5882 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t08-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t09-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t09-colour.webp new file mode 100644 index 00000000..1739d8fd Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t09-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t09-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t09-geometry.webp new file mode 100644 index 00000000..c338c11e Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t09-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t10-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t10-colour.webp new file mode 100644 index 00000000..a2b7ce3b Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t10-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t10-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t10-geometry.webp new file mode 100644 index 00000000..e2cc72e1 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t10-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t11-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t11-colour.webp new file mode 100644 index 00000000..f6d75091 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t11-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t11-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t11-geometry.webp new file mode 100644 index 00000000..8644ac1f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t11-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t12-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t12-colour.webp new file mode 100644 index 00000000..88156530 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t12-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t12-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t12-geometry.webp new file mode 100644 index 00000000..d5020b21 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t12-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t13-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t13-colour.webp new file mode 100644 index 00000000..893f1005 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t13-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t13-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t13-geometry.webp new file mode 100644 index 00000000..91e7f64d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t13-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t14-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t14-colour.webp new file mode 100644 index 00000000..762eca45 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t14-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t14-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t14-geometry.webp new file mode 100644 index 00000000..6f6e74a0 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t14-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t15-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t15-colour.webp new file mode 100644 index 00000000..3eeff891 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t15-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t15-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t15-geometry.webp new file mode 100644 index 00000000..31888cb8 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t15-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t16-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t16-colour.webp new file mode 100644 index 00000000..3a0085cc Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t16-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t16-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t16-geometry.webp new file mode 100644 index 00000000..e6d0b342 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t16-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t17-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t17-colour.webp new file mode 100644 index 00000000..ecaed1b4 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t17-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t17-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t17-geometry.webp new file mode 100644 index 00000000..49e2acad Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t17-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t18-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t18-colour.webp new file mode 100644 index 00000000..4fee1e57 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t18-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t18-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t18-geometry.webp new file mode 100644 index 00000000..fcd4b469 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t18-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t19-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t19-colour.webp new file mode 100644 index 00000000..8ac70995 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t19-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t19-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t19-geometry.webp new file mode 100644 index 00000000..0aff65f2 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t19-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t20-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t20-colour.webp new file mode 100644 index 00000000..7e647ec8 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t20-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t20-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t20-geometry.webp new file mode 100644 index 00000000..7621b1dc Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t20-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t21-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t21-colour.webp new file mode 100644 index 00000000..5b877861 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t21-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t21-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t21-geometry.webp new file mode 100644 index 00000000..ff674d72 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t21-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t22-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t22-colour.webp new file mode 100644 index 00000000..a6208ef1 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t22-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t22-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t22-geometry.webp new file mode 100644 index 00000000..7d27887f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t22-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t23-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t23-colour.webp new file mode 100644 index 00000000..af33f56e Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t23-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t23-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t23-geometry.webp new file mode 100644 index 00000000..8027c0d7 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t23-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t24-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t24-colour.webp new file mode 100644 index 00000000..dfd4a96a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t24-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t24-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t24-geometry.webp new file mode 100644 index 00000000..f352841d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t24-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t25-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t25-colour.webp new file mode 100644 index 00000000..c04ba97b Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t25-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t25-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t25-geometry.webp new file mode 100644 index 00000000..94418a77 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t25-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t26-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t26-colour.webp new file mode 100644 index 00000000..eb945dc7 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t26-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t26-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t26-geometry.webp new file mode 100644 index 00000000..357a19e3 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t26-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t27-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t27-colour.webp new file mode 100644 index 00000000..a20b5c60 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t27-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t27-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t27-geometry.webp new file mode 100644 index 00000000..3fe3f0bc Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t27-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t28-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t28-colour.webp new file mode 100644 index 00000000..259f8b1d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t28-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t28-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t28-geometry.webp new file mode 100644 index 00000000..0c551fce Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t28-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t29-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t29-colour.webp new file mode 100644 index 00000000..0748aea2 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t29-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t29-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t29-geometry.webp new file mode 100644 index 00000000..4490fa54 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t29-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t30-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t30-colour.webp new file mode 100644 index 00000000..e24ccf9c Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t30-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t30-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t30-geometry.webp new file mode 100644 index 00000000..b8d5fbdc Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t30-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t31-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t31-colour.webp new file mode 100644 index 00000000..7605f0f1 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t31-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-1-t31-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t31-geometry.webp new file mode 100644 index 00000000..ac70b30a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-1-t31-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t00-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t00-colour.webp new file mode 100644 index 00000000..fa9cbde6 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t00-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t00-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t00-geometry.webp new file mode 100644 index 00000000..6b258017 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t00-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t01-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t01-colour.webp new file mode 100644 index 00000000..53d430a5 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t01-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t01-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t01-geometry.webp new file mode 100644 index 00000000..6e3f71c7 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t01-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t02-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t02-colour.webp new file mode 100644 index 00000000..9926656b Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t02-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t02-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t02-geometry.webp new file mode 100644 index 00000000..12446c04 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t02-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t03-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t03-colour.webp new file mode 100644 index 00000000..63fe2211 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t03-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t03-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t03-geometry.webp new file mode 100644 index 00000000..c71e8124 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t03-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t04-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t04-colour.webp new file mode 100644 index 00000000..930918d2 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t04-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t04-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t04-geometry.webp new file mode 100644 index 00000000..bbd52f53 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t04-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t05-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t05-colour.webp new file mode 100644 index 00000000..b8086dda Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t05-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t05-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t05-geometry.webp new file mode 100644 index 00000000..0034898d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t05-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t06-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t06-colour.webp new file mode 100644 index 00000000..c5f93158 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t06-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t06-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t06-geometry.webp new file mode 100644 index 00000000..5076009e Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t06-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t07-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t07-colour.webp new file mode 100644 index 00000000..701ab7de Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t07-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t07-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t07-geometry.webp new file mode 100644 index 00000000..82c94309 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t07-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t08-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t08-colour.webp new file mode 100644 index 00000000..233541ce Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t08-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t08-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t08-geometry.webp new file mode 100644 index 00000000..3dea5a38 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t08-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t09-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t09-colour.webp new file mode 100644 index 00000000..f1cbd7c5 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t09-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t09-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t09-geometry.webp new file mode 100644 index 00000000..07f5e202 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t09-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t10-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t10-colour.webp new file mode 100644 index 00000000..349f7bfe Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t10-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t10-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t10-geometry.webp new file mode 100644 index 00000000..f71940a7 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t10-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t11-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t11-colour.webp new file mode 100644 index 00000000..62a0448a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t11-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t11-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t11-geometry.webp new file mode 100644 index 00000000..235d1534 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t11-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t12-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t12-colour.webp new file mode 100644 index 00000000..fa4fb566 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t12-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t12-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t12-geometry.webp new file mode 100644 index 00000000..d03cc8fd Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t12-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t13-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t13-colour.webp new file mode 100644 index 00000000..85656767 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t13-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t13-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t13-geometry.webp new file mode 100644 index 00000000..d0495a71 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t13-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t14-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t14-colour.webp new file mode 100644 index 00000000..09106ff2 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t14-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t14-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t14-geometry.webp new file mode 100644 index 00000000..5d59e676 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t14-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t15-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t15-colour.webp new file mode 100644 index 00000000..399d9e9f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t15-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t15-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t15-geometry.webp new file mode 100644 index 00000000..39c78fd8 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t15-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t16-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t16-colour.webp new file mode 100644 index 00000000..34916d80 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t16-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t16-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t16-geometry.webp new file mode 100644 index 00000000..0141464c Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t16-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t17-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t17-colour.webp new file mode 100644 index 00000000..fd5aa34c Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t17-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t17-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t17-geometry.webp new file mode 100644 index 00000000..018dd78a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t17-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t18-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t18-colour.webp new file mode 100644 index 00000000..fcf00415 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t18-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t18-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t18-geometry.webp new file mode 100644 index 00000000..7788a160 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t18-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t19-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t19-colour.webp new file mode 100644 index 00000000..3ca580bc Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t19-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t19-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t19-geometry.webp new file mode 100644 index 00000000..7e58b465 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t19-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t20-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t20-colour.webp new file mode 100644 index 00000000..83d75920 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t20-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t20-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t20-geometry.webp new file mode 100644 index 00000000..008f6b06 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t20-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t21-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t21-colour.webp new file mode 100644 index 00000000..57a8d604 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t21-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t21-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t21-geometry.webp new file mode 100644 index 00000000..863d6b6f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t21-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t22-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t22-colour.webp new file mode 100644 index 00000000..f1b1f013 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t22-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t22-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t22-geometry.webp new file mode 100644 index 00000000..22d9b34d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t22-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t23-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t23-colour.webp new file mode 100644 index 00000000..185a406d Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t23-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t23-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t23-geometry.webp new file mode 100644 index 00000000..6cfb4391 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t23-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t24-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t24-colour.webp new file mode 100644 index 00000000..1968682a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t24-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t24-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t24-geometry.webp new file mode 100644 index 00000000..b3c47663 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t24-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t25-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t25-colour.webp new file mode 100644 index 00000000..407f588c Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t25-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t25-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t25-geometry.webp new file mode 100644 index 00000000..bc9a5a43 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t25-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t26-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t26-colour.webp new file mode 100644 index 00000000..a2aa3a85 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t26-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t26-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t26-geometry.webp new file mode 100644 index 00000000..0428d6a7 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t26-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t27-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t27-colour.webp new file mode 100644 index 00000000..4bfd3e0f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t27-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t27-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t27-geometry.webp new file mode 100644 index 00000000..0e032949 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t27-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t28-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t28-colour.webp new file mode 100644 index 00000000..950dfda7 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t28-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t28-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t28-geometry.webp new file mode 100644 index 00000000..1021d2c1 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t28-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t29-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t29-colour.webp new file mode 100644 index 00000000..2944b652 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t29-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t29-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t29-geometry.webp new file mode 100644 index 00000000..d99d5d6f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t29-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t30-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t30-colour.webp new file mode 100644 index 00000000..00da71c7 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t30-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t30-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t30-geometry.webp new file mode 100644 index 00000000..65e9ce2b Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t30-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t31-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t31-colour.webp new file mode 100644 index 00000000..4721ce12 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t31-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-2-t31-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t31-geometry.webp new file mode 100644 index 00000000..1f651ebb Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-2-t31-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t00-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t00-colour.webp new file mode 100644 index 00000000..48cbd186 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t00-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t00-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t00-geometry.webp new file mode 100644 index 00000000..7dec2d16 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t00-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t01-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t01-colour.webp new file mode 100644 index 00000000..ffde24c9 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t01-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t01-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t01-geometry.webp new file mode 100644 index 00000000..659ce87f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t01-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t02-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t02-colour.webp new file mode 100644 index 00000000..d3d3e7f9 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t02-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t02-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t02-geometry.webp new file mode 100644 index 00000000..1e8de4dd Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t02-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t03-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t03-colour.webp new file mode 100644 index 00000000..329be34a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t03-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t03-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t03-geometry.webp new file mode 100644 index 00000000..88417117 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t03-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t04-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t04-colour.webp new file mode 100644 index 00000000..3370202a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t04-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t04-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t04-geometry.webp new file mode 100644 index 00000000..cc4f5f54 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t04-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t05-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t05-colour.webp new file mode 100644 index 00000000..f48f9232 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t05-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t05-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t05-geometry.webp new file mode 100644 index 00000000..06a51e37 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t05-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t06-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t06-colour.webp new file mode 100644 index 00000000..460fd200 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t06-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t06-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t06-geometry.webp new file mode 100644 index 00000000..2c1433ef Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t06-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t07-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t07-colour.webp new file mode 100644 index 00000000..ac10f644 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t07-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t07-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t07-geometry.webp new file mode 100644 index 00000000..bf903c8a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t07-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t08-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t08-colour.webp new file mode 100644 index 00000000..cc22612f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t08-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t08-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t08-geometry.webp new file mode 100644 index 00000000..0ad712ec Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t08-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t09-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t09-colour.webp new file mode 100644 index 00000000..c66ec659 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t09-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t09-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t09-geometry.webp new file mode 100644 index 00000000..285b1d1b Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t09-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t10-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t10-colour.webp new file mode 100644 index 00000000..8a915a21 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t10-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t10-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t10-geometry.webp new file mode 100644 index 00000000..b25742dc Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t10-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t11-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t11-colour.webp new file mode 100644 index 00000000..69bf2264 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t11-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t11-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t11-geometry.webp new file mode 100644 index 00000000..52be9f57 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t11-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t12-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t12-colour.webp new file mode 100644 index 00000000..de22ac7f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t12-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t12-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t12-geometry.webp new file mode 100644 index 00000000..35854887 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t12-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t13-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t13-colour.webp new file mode 100644 index 00000000..ff49516f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t13-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t13-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t13-geometry.webp new file mode 100644 index 00000000..8b22b55f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t13-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t14-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t14-colour.webp new file mode 100644 index 00000000..d2fe52ef Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t14-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t14-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t14-geometry.webp new file mode 100644 index 00000000..4c79fb05 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t14-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t15-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t15-colour.webp new file mode 100644 index 00000000..f1ca5156 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t15-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t15-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t15-geometry.webp new file mode 100644 index 00000000..a1883501 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t15-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t16-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t16-colour.webp new file mode 100644 index 00000000..b3e79ec4 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t16-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t16-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t16-geometry.webp new file mode 100644 index 00000000..b6cd82e3 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t16-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t17-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t17-colour.webp new file mode 100644 index 00000000..c3df3db3 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t17-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t17-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t17-geometry.webp new file mode 100644 index 00000000..001a05ad Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t17-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t18-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t18-colour.webp new file mode 100644 index 00000000..7b15e54a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t18-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t18-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t18-geometry.webp new file mode 100644 index 00000000..13da6721 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t18-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t19-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t19-colour.webp new file mode 100644 index 00000000..cf33cc80 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t19-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t19-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t19-geometry.webp new file mode 100644 index 00000000..365814ea Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t19-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t20-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t20-colour.webp new file mode 100644 index 00000000..245b0d51 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t20-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t20-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t20-geometry.webp new file mode 100644 index 00000000..1c6c39a1 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t20-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t21-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t21-colour.webp new file mode 100644 index 00000000..0e74973a Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t21-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t21-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t21-geometry.webp new file mode 100644 index 00000000..ed3051df Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t21-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t22-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t22-colour.webp new file mode 100644 index 00000000..9b4fb9a5 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t22-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t22-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t22-geometry.webp new file mode 100644 index 00000000..09c108a9 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t22-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t23-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t23-colour.webp new file mode 100644 index 00000000..ca26c559 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t23-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t23-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t23-geometry.webp new file mode 100644 index 00000000..7d66bb6f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t23-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t24-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t24-colour.webp new file mode 100644 index 00000000..58b4e401 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t24-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t24-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t24-geometry.webp new file mode 100644 index 00000000..fb10bdc4 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t24-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t25-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t25-colour.webp new file mode 100644 index 00000000..eb9d5ede Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t25-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t25-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t25-geometry.webp new file mode 100644 index 00000000..8b43d3a7 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t25-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t26-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t26-colour.webp new file mode 100644 index 00000000..26e79d1f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t26-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t26-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t26-geometry.webp new file mode 100644 index 00000000..9ccfeec2 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t26-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t27-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t27-colour.webp new file mode 100644 index 00000000..d8f54c65 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t27-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t27-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t27-geometry.webp new file mode 100644 index 00000000..9df85bac Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t27-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t28-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t28-colour.webp new file mode 100644 index 00000000..89bfcc56 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t28-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t28-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t28-geometry.webp new file mode 100644 index 00000000..d498f614 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t28-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t29-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t29-colour.webp new file mode 100644 index 00000000..c7d21c15 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t29-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t29-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t29-geometry.webp new file mode 100644 index 00000000..fcd7f80f Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t29-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t30-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t30-colour.webp new file mode 100644 index 00000000..f3b486db Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t30-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t30-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t30-geometry.webp new file mode 100644 index 00000000..7ac31bea Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t30-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t31-colour.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t31-colour.webp new file mode 100644 index 00000000..6af48260 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t31-colour.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/card-3-t31-geometry.webp b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t31-geometry.webp new file mode 100644 index 00000000..fb0ea964 Binary files /dev/null and b/public/ridge/matterhorn-f4fa1ba3556c/card-3-t31-geometry.webp differ diff --git a/public/ridge/matterhorn-f4fa1ba3556c/manifest.json b/public/ridge/matterhorn-f4fa1ba3556c/manifest.json new file mode 100644 index 00000000..64565e37 --- /dev/null +++ b/public/ridge/matterhorn-f4fa1ba3556c/manifest.json @@ -0,0 +1,1796 @@ +{ + "schema": 3, + "baker_version": 7, + "bake_id": "f4fa1ba3556c", + "place": { + "id": "matterhorn", + "name": "Matterhorn from the Gornergrat", + "lat": 45.983139, + "lon": 7.782466, + "altitude_km": 3.090737150326758, + "eye_m": 3092.337150326758, + "tz": "Europe/Zurich" + }, + "view": { + "look_az_deg": 265.7572707724987, + "plane_h": 600, + "px_per_deg_h": 17.77777777777778, + "px_per_deg_v": 32.88082308679107, + "exaggeration": 1.8495462986319975, + "horizon_row": 385.03507633717794, + "sky_row": 24.0, + "near_row": 396.0, + "ring_w": 6400, + "tile_w": 200, + "tiles": 32, + "apron": 2 + }, + "curvature": { + "r_earth_m": 6371000.0, + "k_ref": 0.13 + }, + "encoding": { + "log_d_min": 6.214608098422191, + "log_d_max": 11.00475592466117, + "normal": "rt8" + }, + "camera": { + "r_max_m": 95.8, + "r_max_forward_m": 198.4 + }, + "cards": [ + { + "near_m": null, + "far_m": 30673.10182459612 + }, + { + "near_m": 30673.10182459612, + "far_m": 46643.05508137366 + }, + { + "near_m": 46643.05508137366, + "far_m": 59265.74213208556 + }, + { + "near_m": 59265.74213208556, + "far_m": null + } + ], + "tiles": [ + [ + { + "top": 382, + "h": 218, + "distance_m": 5200.7626953125, + "colour": { + "file": "card-0-t00-colour.webp", + "bytes": 5116 + }, + "geometry": { + "file": "card-0-t00-geometry.webp", + "bytes": 32912 + } + }, + { + "top": 358, + "h": 242, + "distance_m": 42748.96484375, + "colour": { + "file": "card-1-t00-colour.webp", + "bytes": 3980 + }, + "geometry": { + "file": "card-1-t00-geometry.webp", + "bytes": 20706 + } + }, + { + "top": 370, + "h": 230, + "distance_m": 52637.3125, + "colour": { + "file": "card-2-t00-colour.webp", + "bytes": 3938 + }, + "geometry": { + "file": "card-2-t00-geometry.webp", + "bytes": 14174 + } + }, + { + "top": 370, + "h": 230, + "distance_m": 56318.53125, + "colour": { + "file": "card-3-t00-colour.webp", + "bytes": 1492 + }, + "geometry": { + "file": "card-3-t00-geometry.webp", + "bytes": 4918 + } + } + ], + [ + { + "top": 254, + "h": 346, + "distance_m": 4215.55517578125, + "colour": { + "file": "card-0-t01-colour.webp", + "bytes": 5314 + }, + "geometry": { + "file": "card-0-t01-geometry.webp", + "bytes": 35936 + } + }, + { + "top": 365, + "h": 235, + "distance_m": 39018.9296875, + "colour": { + "file": "card-1-t01-colour.webp", + "bytes": 5848 + }, + "geometry": { + "file": "card-1-t01-geometry.webp", + "bytes": 27468 + } + }, + { + "top": 359, + "h": 241, + "distance_m": 48454.3671875, + "colour": { + "file": "card-2-t01-colour.webp", + "bytes": 4354 + }, + "geometry": { + "file": "card-2-t01-geometry.webp", + "bytes": 19594 + } + }, + { + "top": 359, + "h": 241, + "distance_m": 56371.99609375, + "colour": { + "file": "card-3-t01-colour.webp", + "bytes": 1742 + }, + "geometry": { + "file": "card-3-t01-geometry.webp", + "bytes": 6982 + } + } + ], + [ + { + "top": 192, + "h": 408, + "distance_m": 4912.3134765625, + "colour": { + "file": "card-0-t02-colour.webp", + "bytes": 6306 + }, + "geometry": { + "file": "card-0-t02-geometry.webp", + "bytes": 49514 + } + }, + { + "top": 387, + "h": 213, + "distance_m": 30035.7734375, + "colour": { + "file": "card-1-t02-colour.webp", + "bytes": 1508 + }, + "geometry": { + "file": "card-1-t02-geometry.webp", + "bytes": 4378 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 48779.0078125, + "colour": { + "file": "card-2-t02-colour.webp", + "bytes": 3738 + }, + "geometry": { + "file": "card-2-t02-geometry.webp", + "bytes": 15058 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 58255.13671875, + "colour": { + "file": "card-3-t02-colour.webp", + "bytes": 1652 + }, + "geometry": { + "file": "card-3-t02-geometry.webp", + "bytes": 6844 + } + } + ], + [ + { + "top": 197, + "h": 403, + "distance_m": 5298.56640625, + "colour": { + "file": "card-0-t03-colour.webp", + "bytes": 6244 + }, + "geometry": { + "file": "card-0-t03-geometry.webp", + "bytes": 47566 + } + }, + { + "top": 370, + "h": 230, + "distance_m": 36035.57421875, + "colour": { + "file": "card-1-t03-colour.webp", + "bytes": 2120 + }, + "geometry": { + "file": "card-1-t03-geometry.webp", + "bytes": 7528 + } + }, + { + "top": 387, + "h": 213, + "distance_m": 44827.15625, + "colour": { + "file": "card-2-t03-colour.webp", + "bytes": 2206 + }, + "geometry": { + "file": "card-2-t03-geometry.webp", + "bytes": 8984 + } + }, + { + "top": 394, + "h": 206, + "distance_m": 57030.5625, + "colour": { + "file": "card-3-t03-colour.webp", + "bytes": 1690 + }, + "geometry": { + "file": "card-3-t03-geometry.webp", + "bytes": 6070 + } + } + ], + [ + { + "top": 228, + "h": 372, + "distance_m": 1534.8564453125, + "colour": { + "file": "card-0-t04-colour.webp", + "bytes": 7102 + }, + "geometry": { + "file": "card-0-t04-geometry.webp", + "bytes": 47722 + } + }, + { + "top": 399, + "h": 201, + "distance_m": 37010.08203125, + "colour": { + "file": "card-1-t04-colour.webp", + "bytes": 3318 + }, + "geometry": { + "file": "card-1-t04-geometry.webp", + "bytes": 11958 + } + }, + { + "top": 399, + "h": 201, + "distance_m": 45624.83984375, + "colour": { + "file": "card-2-t04-colour.webp", + "bytes": 3714 + }, + "geometry": { + "file": "card-2-t04-geometry.webp", + "bytes": 19808 + } + }, + { + "top": 404, + "h": 196, + "distance_m": 56994.40234375, + "colour": { + "file": "card-3-t04-colour.webp", + "bytes": 1810 + }, + "geometry": { + "file": "card-3-t04-geometry.webp", + "bytes": 7890 + } + } + ], + [ + { + "top": 175, + "h": 425, + "distance_m": 1364.1209716796875, + "colour": { + "file": "card-0-t05-colour.webp", + "bytes": 5118 + }, + "geometry": { + "file": "card-0-t05-geometry.webp", + "bytes": 39596 + } + }, + { + "top": 414, + "h": 186, + "distance_m": 29493.169921875, + "colour": { + "file": "card-1-t05-colour.webp", + "bytes": 2236 + }, + "geometry": { + "file": "card-1-t05-geometry.webp", + "bytes": 10228 + } + }, + { + "top": 407, + "h": 193, + "distance_m": 50090.2109375, + "colour": { + "file": "card-2-t05-colour.webp", + "bytes": 3600 + }, + "geometry": { + "file": "card-2-t05-geometry.webp", + "bytes": 23392 + } + }, + { + "top": 407, + "h": 193, + "distance_m": 57102.5625, + "colour": { + "file": "card-3-t05-colour.webp", + "bytes": 1606 + }, + "geometry": { + "file": "card-3-t05-geometry.webp", + "bytes": 5904 + } + } + ], + [ + { + "top": 177, + "h": 423, + "distance_m": 1182.6668701171875, + "colour": { + "file": "card-0-t06-colour.webp", + "bytes": 4482 + }, + "geometry": { + "file": "card-0-t06-geometry.webp", + "bytes": 29128 + } + }, + { + "top": 423, + "h": 177, + "distance_m": 30519.244140625, + "colour": { + "file": "card-1-t06-colour.webp", + "bytes": 4036 + }, + "geometry": { + "file": "card-1-t06-geometry.webp", + "bytes": 22168 + } + }, + { + "top": 423, + "h": 177, + "distance_m": 45924.69921875, + "colour": { + "file": "card-2-t06-colour.webp", + "bytes": 2914 + }, + "geometry": { + "file": "card-2-t06-geometry.webp", + "bytes": 19660 + } + }, + { + "top": 424, + "h": 176, + "distance_m": 56655.05859375, + "colour": { + "file": "card-3-t06-colour.webp", + "bytes": 1038 + }, + "geometry": { + "file": "card-3-t06-geometry.webp", + "bytes": 6434 + } + } + ], + [ + { + "top": 198, + "h": 402, + "distance_m": 2050.119140625, + "colour": { + "file": "card-0-t07-colour.webp", + "bytes": 5192 + }, + "geometry": { + "file": "card-0-t07-geometry.webp", + "bytes": 31830 + } + }, + { + "top": 432, + "h": 168, + "distance_m": 34567.80078125, + "colour": { + "file": "card-1-t07-colour.webp", + "bytes": 3088 + }, + "geometry": { + "file": "card-1-t07-geometry.webp", + "bytes": 19350 + } + }, + { + "top": 424, + "h": 176, + "distance_m": 47590.3671875, + "colour": { + "file": "card-2-t07-colour.webp", + "bytes": 2098 + }, + "geometry": { + "file": "card-2-t07-geometry.webp", + "bytes": 15776 + } + }, + { + "top": 424, + "h": 176, + "distance_m": 56721.65625, + "colour": { + "file": "card-3-t07-colour.webp", + "bytes": 1236 + }, + "geometry": { + "file": "card-3-t07-geometry.webp", + "bytes": 7468 + } + } + ], + [ + { + "top": 238, + "h": 362, + "distance_m": 3579.99951171875, + "colour": { + "file": "card-0-t08-colour.webp", + "bytes": 4910 + }, + "geometry": { + "file": "card-0-t08-geometry.webp", + "bytes": 45504 + } + }, + { + "top": 429, + "h": 171, + "distance_m": 30154.337890625, + "colour": { + "file": "card-1-t08-colour.webp", + "bytes": 1882 + }, + "geometry": { + "file": "card-1-t08-geometry.webp", + "bytes": 19770 + } + }, + { + "top": 434, + "h": 166, + "distance_m": 46581.98046875, + "colour": { + "file": "card-2-t08-colour.webp", + "bytes": 1262 + }, + "geometry": { + "file": "card-2-t08-geometry.webp", + "bytes": 5610 + } + }, + { + "top": 459, + "h": 141, + "distance_m": 57186.70703125, + "colour": { + "file": "card-3-t08-colour.webp", + "bytes": 646 + }, + "geometry": { + "file": "card-3-t08-geometry.webp", + "bytes": 2126 + } + } + ], + [ + { + "top": 251, + "h": 349, + "distance_m": 4235.15966796875, + "colour": { + "file": "card-0-t09-colour.webp", + "bytes": 1402 + }, + "geometry": { + "file": "card-0-t09-geometry.webp", + "bytes": 39436 + } + }, + { + "top": 440, + "h": 160, + "distance_m": 33119.98828125, + "colour": { + "file": "card-1-t09-colour.webp", + "bytes": 1482 + }, + "geometry": { + "file": "card-1-t09-geometry.webp", + "bytes": 10982 + } + }, + { + "top": 449, + "h": 151, + "distance_m": 45002.60546875, + "colour": { + "file": "card-2-t09-colour.webp", + "bytes": 1332 + }, + "geometry": { + "file": "card-2-t09-geometry.webp", + "bytes": 7202 + } + }, + { + "top": 460, + "h": 140, + "distance_m": 56251.703125, + "colour": { + "file": "card-3-t09-colour.webp", + "bytes": 578 + }, + "geometry": { + "file": "card-3-t09-geometry.webp", + "bytes": 2594 + } + } + ], + [ + { + "top": 55, + "h": 545, + "distance_m": 4756.9658203125, + "colour": { + "file": "card-0-t10-colour.webp", + "bytes": 7252 + }, + "geometry": { + "file": "card-0-t10-geometry.webp", + "bytes": 67260 + } + }, + { + "top": 461, + "h": 139, + "distance_m": 29934.087890625, + "colour": { + "file": "card-1-t10-colour.webp", + "bytes": 1212 + }, + "geometry": { + "file": "card-1-t10-geometry.webp", + "bytes": 8122 + } + }, + { + "top": 467, + "h": 133, + "distance_m": 45674.9921875, + "colour": { + "file": "card-2-t10-colour.webp", + "bytes": 1068 + }, + "geometry": { + "file": "card-2-t10-geometry.webp", + "bytes": 7526 + } + }, + { + "top": 471, + "h": 129, + "distance_m": 56747.79296875, + "colour": { + "file": "card-3-t10-colour.webp", + "bytes": 514 + }, + "geometry": { + "file": "card-3-t10-geometry.webp", + "bytes": 2212 + } + } + ], + [ + { + "top": 55, + "h": 545, + "distance_m": 4971.21337890625, + "colour": { + "file": "card-0-t11-colour.webp", + "bytes": 8670 + }, + "geometry": { + "file": "card-0-t11-geometry.webp", + "bytes": 68938 + } + }, + { + "top": 441, + "h": 159, + "distance_m": 34451.1953125, + "colour": { + "file": "card-1-t11-colour.webp", + "bytes": 1460 + }, + "geometry": { + "file": "card-1-t11-geometry.webp", + "bytes": 14376 + } + }, + { + "top": 470, + "h": 130, + "distance_m": 51066.16796875, + "colour": { + "file": "card-2-t11-colour.webp", + "bytes": 1110 + }, + "geometry": { + "file": "card-2-t11-geometry.webp", + "bytes": 4576 + } + }, + { + "top": 472, + "h": 128, + "distance_m": 56986.30859375, + "colour": { + "file": "card-3-t11-colour.webp", + "bytes": 454 + }, + "geometry": { + "file": "card-3-t11-geometry.webp", + "bytes": 2358 + } + } + ], + [ + { + "top": 107, + "h": 493, + "distance_m": 4934.541015625, + "colour": { + "file": "card-0-t12-colour.webp", + "bytes": 6688 + }, + "geometry": { + "file": "card-0-t12-geometry.webp", + "bytes": 64866 + } + }, + { + "top": 448, + "h": 152, + "distance_m": 31824.158203125, + "colour": { + "file": "card-1-t12-colour.webp", + "bytes": 1444 + }, + "geometry": { + "file": "card-1-t12-geometry.webp", + "bytes": 16024 + } + }, + { + "top": 464, + "h": 136, + "distance_m": 45762.671875, + "colour": { + "file": "card-2-t12-colour.webp", + "bytes": 676 + }, + "geometry": { + "file": "card-2-t12-geometry.webp", + "bytes": 2428 + } + }, + { + "top": 481, + "h": 119, + "distance_m": 57345.6328125, + "colour": { + "file": "card-3-t12-colour.webp", + "bytes": 252 + }, + "geometry": { + "file": "card-3-t12-geometry.webp", + "bytes": 1694 + } + } + ], + [ + { + "top": 31, + "h": 569, + "distance_m": 5699.51953125, + "colour": { + "file": "card-0-t13-colour.webp", + "bytes": 3424 + }, + "geometry": { + "file": "card-0-t13-geometry.webp", + "bytes": 64924 + } + }, + { + "top": 416, + "h": 184, + "distance_m": 30396.14453125, + "colour": { + "file": "card-1-t13-colour.webp", + "bytes": 1818 + }, + "geometry": { + "file": "card-1-t13-geometry.webp", + "bytes": 11370 + } + }, + { + "top": 466, + "h": 134, + "distance_m": 47246.19140625, + "colour": { + "file": "card-2-t13-colour.webp", + "bytes": 720 + }, + "geometry": { + "file": "card-2-t13-geometry.webp", + "bytes": 2078 + } + }, + { + "top": 481, + "h": 119, + "distance_m": 57345.6328125, + "colour": { + "file": "card-3-t13-colour.webp", + "bytes": 242 + }, + "geometry": { + "file": "card-3-t13-geometry.webp", + "bytes": 1692 + } + } + ], + [ + { + "top": 76, + "h": 524, + "distance_m": 4679.2646484375, + "colour": { + "file": "card-0-t14-colour.webp", + "bytes": 5998 + }, + "geometry": { + "file": "card-0-t14-geometry.webp", + "bytes": 60814 + } + }, + { + "top": 416, + "h": 184, + "distance_m": 33286.3515625, + "colour": { + "file": "card-1-t14-colour.webp", + "bytes": 1790 + }, + "geometry": { + "file": "card-1-t14-geometry.webp", + "bytes": 9784 + } + }, + { + "top": 424, + "h": 176, + "distance_m": 44325.48828125, + "colour": { + "file": "card-2-t14-colour.webp", + "bytes": 934 + }, + "geometry": { + "file": "card-2-t14-geometry.webp", + "bytes": 2340 + } + }, + { + "top": 472, + "h": 128, + "distance_m": 57117.16015625, + "colour": { + "file": "card-3-t14-colour.webp", + "bytes": 390 + }, + "geometry": { + "file": "card-3-t14-geometry.webp", + "bytes": 2114 + } + } + ], + [ + { + "top": 93, + "h": 507, + "distance_m": 3718.8134765625, + "colour": { + "file": "card-0-t15-colour.webp", + "bytes": 6092 + }, + "geometry": { + "file": "card-0-t15-geometry.webp", + "bytes": 54590 + } + }, + { + "top": 393, + "h": 207, + "distance_m": 29459.6875, + "colour": { + "file": "card-1-t15-colour.webp", + "bytes": 2484 + }, + "geometry": { + "file": "card-1-t15-geometry.webp", + "bytes": 11778 + } + }, + { + "top": 423, + "h": 177, + "distance_m": 48277.2421875, + "colour": { + "file": "card-2-t15-colour.webp", + "bytes": 1188 + }, + "geometry": { + "file": "card-2-t15-geometry.webp", + "bytes": 6648 + } + }, + { + "top": 469, + "h": 131, + "distance_m": 57345.6328125, + "colour": { + "file": "card-3-t15-colour.webp", + "bytes": 422 + }, + "geometry": { + "file": "card-3-t15-geometry.webp", + "bytes": 1948 + } + } + ], + [ + { + "top": 42, + "h": 558, + "distance_m": 4111.91357421875, + "colour": { + "file": "card-0-t16-colour.webp", + "bytes": 5116 + }, + "geometry": { + "file": "card-0-t16-geometry.webp", + "bytes": 50356 + } + }, + { + "top": 403, + "h": 197, + "distance_m": 34945.5, + "colour": { + "file": "card-1-t16-colour.webp", + "bytes": 5388 + }, + "geometry": { + "file": "card-1-t16-geometry.webp", + "bytes": 22758 + } + }, + { + "top": 412, + "h": 188, + "distance_m": 45557.578125, + "colour": { + "file": "card-2-t16-colour.webp", + "bytes": 2200 + }, + "geometry": { + "file": "card-2-t16-geometry.webp", + "bytes": 17398 + } + }, + { + "top": 416, + "h": 184, + "distance_m": 55988.37890625, + "colour": { + "file": "card-3-t16-colour.webp", + "bytes": 902 + }, + "geometry": { + "file": "card-3-t16-geometry.webp", + "bytes": 3484 + } + } + ], + [ + { + "top": 24, + "h": 576, + "distance_m": 4138.59521484375, + "colour": { + "file": "card-0-t17-colour.webp", + "bytes": 4186 + }, + "geometry": { + "file": "card-0-t17-geometry.webp", + "bytes": 53810 + } + }, + { + "top": 398, + "h": 202, + "distance_m": 36938.1171875, + "colour": { + "file": "card-1-t17-colour.webp", + "bytes": 6772 + }, + "geometry": { + "file": "card-1-t17-geometry.webp", + "bytes": 36414 + } + }, + { + "top": 398, + "h": 202, + "distance_m": 45468.5546875, + "colour": { + "file": "card-2-t17-colour.webp", + "bytes": 2606 + }, + "geometry": { + "file": "card-2-t17-geometry.webp", + "bytes": 13168 + } + }, + { + "top": 415, + "h": 185, + "distance_m": 55893.73828125, + "colour": { + "file": "card-3-t17-colour.webp", + "bytes": 1082 + }, + "geometry": { + "file": "card-3-t17-geometry.webp", + "bytes": 3378 + } + } + ], + [ + { + "top": 25, + "h": 575, + "distance_m": 4345.9052734375, + "colour": { + "file": "card-0-t18-colour.webp", + "bytes": 4400 + }, + "geometry": { + "file": "card-0-t18-geometry.webp", + "bytes": 54898 + } + }, + { + "top": 376, + "h": 224, + "distance_m": 34020.55078125, + "colour": { + "file": "card-1-t18-colour.webp", + "bytes": 6162 + }, + "geometry": { + "file": "card-1-t18-geometry.webp", + "bytes": 38018 + } + }, + { + "top": 376, + "h": 224, + "distance_m": 46033.62109375, + "colour": { + "file": "card-2-t18-colour.webp", + "bytes": 2404 + }, + "geometry": { + "file": "card-2-t18-geometry.webp", + "bytes": 8386 + } + }, + { + "top": 378, + "h": 222, + "distance_m": 58590.1015625, + "colour": { + "file": "card-3-t18-colour.webp", + "bytes": 2098 + }, + "geometry": { + "file": "card-3-t18-geometry.webp", + "bytes": 7536 + } + } + ], + [ + { + "top": 133, + "h": 467, + "distance_m": 4712.76806640625, + "colour": { + "file": "card-0-t19-colour.webp", + "bytes": 5342 + }, + "geometry": { + "file": "card-0-t19-geometry.webp", + "bytes": 51372 + } + }, + { + "top": 375, + "h": 225, + "distance_m": 41753.94921875, + "colour": { + "file": "card-1-t19-colour.webp", + "bytes": 6084 + }, + "geometry": { + "file": "card-1-t19-geometry.webp", + "bytes": 26460 + } + }, + { + "top": 369, + "h": 231, + "distance_m": 45021.44921875, + "colour": { + "file": "card-2-t19-colour.webp", + "bytes": 3274 + }, + "geometry": { + "file": "card-2-t19-geometry.webp", + "bytes": 10926 + } + }, + { + "top": 369, + "h": 231, + "distance_m": 57015.609375, + "colour": { + "file": "card-3-t19-colour.webp", + "bytes": 2592 + }, + "geometry": { + "file": "card-3-t19-geometry.webp", + "bytes": 9752 + } + } + ], + [ + { + "top": 269, + "h": 331, + "distance_m": 4853.74560546875, + "colour": { + "file": "card-0-t20-colour.webp", + "bytes": 4084 + }, + "geometry": { + "file": "card-0-t20-geometry.webp", + "bytes": 40014 + } + }, + { + "top": 384, + "h": 216, + "distance_m": 42653.47265625, + "colour": { + "file": "card-1-t20-colour.webp", + "bytes": 2514 + }, + "geometry": { + "file": "card-1-t20-geometry.webp", + "bytes": 7660 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 50108.26953125, + "colour": { + "file": "card-2-t20-colour.webp", + "bytes": 4602 + }, + "geometry": { + "file": "card-2-t20-geometry.webp", + "bytes": 20942 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 56993.9140625, + "colour": { + "file": "card-3-t20-colour.webp", + "bytes": 1858 + }, + "geometry": { + "file": "card-3-t20-geometry.webp", + "bytes": 11374 + } + } + ], + [ + { + "top": 288, + "h": 312, + "distance_m": 4818.70654296875, + "colour": { + "file": "card-0-t21-colour.webp", + "bytes": 4582 + }, + "geometry": { + "file": "card-0-t21-geometry.webp", + "bytes": 40282 + } + }, + { + "top": 383, + "h": 217, + "distance_m": 29521.30859375, + "colour": { + "file": "card-1-t21-colour.webp", + "bytes": 2596 + }, + "geometry": { + "file": "card-1-t21-geometry.webp", + "bytes": 11918 + } + }, + { + "top": 394, + "h": 206, + "distance_m": 46590.4609375, + "colour": { + "file": "card-2-t21-colour.webp", + "bytes": 2394 + }, + "geometry": { + "file": "card-2-t21-geometry.webp", + "bytes": 16616 + } + }, + { + "top": 404, + "h": 196, + "distance_m": 56939.96484375, + "colour": { + "file": "card-3-t21-colour.webp", + "bytes": 1042 + }, + "geometry": { + "file": "card-3-t21-geometry.webp", + "bytes": 3196 + } + } + ], + [ + { + "top": 290, + "h": 310, + "distance_m": 4831.7939453125, + "colour": { + "file": "card-0-t22-colour.webp", + "bytes": 4572 + }, + "geometry": { + "file": "card-0-t22-geometry.webp", + "bytes": 44246 + } + }, + { + "top": 363, + "h": 237, + "distance_m": 33445.0078125, + "colour": { + "file": "card-1-t22-colour.webp", + "bytes": 2468 + }, + "geometry": { + "file": "card-1-t22-geometry.webp", + "bytes": 10830 + } + }, + { + "top": 388, + "h": 212, + "distance_m": 55223.69921875, + "colour": { + "file": "card-2-t22-colour.webp", + "bytes": 1818 + }, + "geometry": { + "file": "card-2-t22-geometry.webp", + "bytes": 4430 + } + }, + { + "top": 388, + "h": 212, + "distance_m": 55958.26953125, + "colour": { + "file": "card-3-t22-colour.webp", + "bytes": 1248 + }, + "geometry": { + "file": "card-3-t22-geometry.webp", + "bytes": 4024 + } + } + ], + [ + { + "top": 148, + "h": 452, + "distance_m": 7991.69677734375, + "colour": { + "file": "card-0-t23-colour.webp", + "bytes": 5978 + }, + "geometry": { + "file": "card-0-t23-geometry.webp", + "bytes": 54266 + } + }, + { + "top": 330, + "h": 270, + "distance_m": 35701.03515625, + "colour": { + "file": "card-1-t23-colour.webp", + "bytes": 2580 + }, + "geometry": { + "file": "card-1-t23-geometry.webp", + "bytes": 12230 + } + }, + { + "top": 369, + "h": 231, + "distance_m": 54297.42578125, + "colour": { + "file": "card-2-t23-colour.webp", + "bytes": 5658 + }, + "geometry": { + "file": "card-2-t23-geometry.webp", + "bytes": 15656 + } + }, + { + "top": 369, + "h": 231, + "distance_m": 56929.9765625, + "colour": { + "file": "card-3-t23-colour.webp", + "bytes": 2360 + }, + "geometry": { + "file": "card-3-t23-geometry.webp", + "bytes": 9738 + } + } + ], + [ + { + "top": 287, + "h": 313, + "distance_m": 7433.8583984375, + "colour": { + "file": "card-0-t24-colour.webp", + "bytes": 7246 + }, + "geometry": { + "file": "card-0-t24-geometry.webp", + "bytes": 49400 + } + }, + { + "top": 343, + "h": 257, + "distance_m": 30422.564453125, + "colour": { + "file": "card-1-t24-colour.webp", + "bytes": 1708 + }, + "geometry": { + "file": "card-1-t24-geometry.webp", + "bytes": 8764 + } + }, + { + "top": 382, + "h": 218, + "distance_m": 46458.15625, + "colour": { + "file": "card-2-t24-colour.webp", + "bytes": 2910 + }, + "geometry": { + "file": "card-2-t24-geometry.webp", + "bytes": 11038 + } + }, + { + "top": 382, + "h": 218, + "distance_m": 56836.88671875, + "colour": { + "file": "card-3-t24-colour.webp", + "bytes": 1666 + }, + "geometry": { + "file": "card-3-t24-geometry.webp", + "bytes": 7624 + } + } + ], + [ + { + "top": 238, + "h": 362, + "distance_m": 10644.763671875, + "colour": { + "file": "card-0-t25-colour.webp", + "bytes": 6366 + }, + "geometry": { + "file": "card-0-t25-geometry.webp", + "bytes": 53384 + } + }, + { + "top": 365, + "h": 235, + "distance_m": 32008.306640625, + "colour": { + "file": "card-1-t25-colour.webp", + "bytes": 1230 + }, + "geometry": { + "file": "card-1-t25-geometry.webp", + "bytes": 4182 + } + }, + { + "top": 403, + "h": 197, + "distance_m": 47011.2578125, + "colour": { + "file": "card-2-t25-colour.webp", + "bytes": 1948 + }, + "geometry": { + "file": "card-2-t25-geometry.webp", + "bytes": 7998 + } + }, + { + "top": 403, + "h": 197, + "distance_m": 56836.078125, + "colour": { + "file": "card-3-t25-colour.webp", + "bytes": 1292 + }, + "geometry": { + "file": "card-3-t25-geometry.webp", + "bytes": 8980 + } + } + ], + [ + { + "top": 229, + "h": 371, + "distance_m": 8270.6533203125, + "colour": { + "file": "card-0-t26-colour.webp", + "bytes": 6442 + }, + "geometry": { + "file": "card-0-t26-geometry.webp", + "bytes": 53612 + } + }, + { + "top": 386, + "h": 214, + "distance_m": 29769.423828125, + "colour": { + "file": "card-1-t26-colour.webp", + "bytes": 2580 + }, + "geometry": { + "file": "card-1-t26-geometry.webp", + "bytes": 13894 + } + }, + { + "top": 398, + "h": 202, + "distance_m": 53755.09375, + "colour": { + "file": "card-2-t26-colour.webp", + "bytes": 4126 + }, + "geometry": { + "file": "card-2-t26-geometry.webp", + "bytes": 16184 + } + }, + { + "top": 398, + "h": 202, + "distance_m": 56437.1875, + "colour": { + "file": "card-3-t26-colour.webp", + "bytes": 2052 + }, + "geometry": { + "file": "card-3-t26-geometry.webp", + "bytes": 7216 + } + } + ], + [ + { + "top": 242, + "h": 358, + "distance_m": 7733.07861328125, + "colour": { + "file": "card-0-t27-colour.webp", + "bytes": 7702 + }, + "geometry": { + "file": "card-0-t27-geometry.webp", + "bytes": 54418 + } + }, + { + "top": 391, + "h": 209, + "distance_m": 31635.669921875, + "colour": { + "file": "card-1-t27-colour.webp", + "bytes": 1170 + }, + "geometry": { + "file": "card-1-t27-geometry.webp", + "bytes": 5642 + } + }, + { + "top": 390, + "h": 210, + "distance_m": 49537.48046875, + "colour": { + "file": "card-2-t27-colour.webp", + "bytes": 4302 + }, + "geometry": { + "file": "card-2-t27-geometry.webp", + "bytes": 26440 + } + }, + { + "top": 390, + "h": 210, + "distance_m": 56523.26171875, + "colour": { + "file": "card-3-t27-colour.webp", + "bytes": 1538 + }, + "geometry": { + "file": "card-3-t27-geometry.webp", + "bytes": 7538 + } + } + ], + [ + { + "top": 231, + "h": 369, + "distance_m": 8952.802734375, + "colour": { + "file": "card-0-t28-colour.webp", + "bytes": 8324 + }, + "geometry": { + "file": "card-0-t28-geometry.webp", + "bytes": 58204 + } + }, + { + "top": 389, + "h": 211, + "distance_m": 29559.9609375, + "colour": { + "file": "card-1-t28-colour.webp", + "bytes": 2618 + }, + "geometry": { + "file": "card-1-t28-geometry.webp", + "bytes": 10096 + } + }, + { + "top": 388, + "h": 212, + "distance_m": 47157.2421875, + "colour": { + "file": "card-2-t28-colour.webp", + "bytes": 3038 + }, + "geometry": { + "file": "card-2-t28-geometry.webp", + "bytes": 22630 + } + }, + { + "top": 404, + "h": 196, + "distance_m": 55958.64453125, + "colour": { + "file": "card-3-t28-colour.webp", + "bytes": 1204 + }, + "geometry": { + "file": "card-3-t28-geometry.webp", + "bytes": 2670 + } + } + ], + [ + { + "top": 243, + "h": 357, + "distance_m": 7626.91552734375, + "colour": { + "file": "card-0-t29-colour.webp", + "bytes": 6618 + }, + "geometry": { + "file": "card-0-t29-geometry.webp", + "bytes": 51022 + } + }, + { + "top": 391, + "h": 209, + "distance_m": 43394.55078125, + "colour": { + "file": "card-1-t29-colour.webp", + "bytes": 5902 + }, + "geometry": { + "file": "card-1-t29-geometry.webp", + "bytes": 20418 + } + }, + { + "top": 387, + "h": 213, + "distance_m": 45741.1640625, + "colour": { + "file": "card-2-t29-colour.webp", + "bytes": 2548 + }, + "geometry": { + "file": "card-2-t29-geometry.webp", + "bytes": 16600 + } + }, + { + "top": 415, + "h": 185, + "distance_m": 56662.9375, + "colour": { + "file": "card-3-t29-colour.webp", + "bytes": 978 + }, + "geometry": { + "file": "card-3-t29-geometry.webp", + "bytes": 4000 + } + } + ], + [ + { + "top": 209, + "h": 391, + "distance_m": 8535.6982421875, + "colour": { + "file": "card-0-t30-colour.webp", + "bytes": 6504 + }, + "geometry": { + "file": "card-0-t30-geometry.webp", + "bytes": 54608 + } + }, + { + "top": 379, + "h": 221, + "distance_m": 30519.244140625, + "colour": { + "file": "card-1-t30-colour.webp", + "bytes": 3252 + }, + "geometry": { + "file": "card-1-t30-geometry.webp", + "bytes": 10042 + } + }, + { + "top": 379, + "h": 221, + "distance_m": 46410.1953125, + "colour": { + "file": "card-2-t30-colour.webp", + "bytes": 2922 + }, + "geometry": { + "file": "card-2-t30-geometry.webp", + "bytes": 14372 + } + }, + { + "top": 397, + "h": 203, + "distance_m": 56393.33984375, + "colour": { + "file": "card-3-t30-colour.webp", + "bytes": 1230 + }, + "geometry": { + "file": "card-3-t30-geometry.webp", + "bytes": 4024 + } + } + ], + [ + { + "top": 303, + "h": 297, + "distance_m": 14576.4990234375, + "colour": { + "file": "card-0-t31-colour.webp", + "bytes": 5654 + }, + "geometry": { + "file": "card-0-t31-geometry.webp", + "bytes": 48236 + } + }, + { + "top": 370, + "h": 230, + "distance_m": 41007.98046875, + "colour": { + "file": "card-1-t31-colour.webp", + "bytes": 4592 + }, + "geometry": { + "file": "card-1-t31-geometry.webp", + "bytes": 13188 + } + }, + { + "top": 370, + "h": 230, + "distance_m": 48204.4140625, + "colour": { + "file": "card-2-t31-colour.webp", + "bytes": 3650 + }, + "geometry": { + "file": "card-2-t31-geometry.webp", + "bytes": 15018 + } + }, + { + "top": 374, + "h": 226, + "distance_m": 56437.1875, + "colour": { + "file": "card-3-t31-colour.webp", + "bytes": 1212 + }, + "geometry": { + "file": "card-3-t31-geometry.webp", + "bytes": 3638 + } + } + ] + ], + "bytes": 3056362, + "attribution": { + "credit_line": "Contains modified Copernicus data: DEM \u00a9 DLR e.V. 2010-2014 and \u00a9 Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.", + "licence": "Copernicus DEM licence: free, full and open access, with the credit line shown", + "dem_source": "Copernicus DEM GLO-30 (30 m)", + "url": "https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model" + } +} diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t00-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t00-colour.webp new file mode 100644 index 00000000..686362d9 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t00-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t00-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t00-geometry.webp new file mode 100644 index 00000000..404e34f3 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t00-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t01-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t01-colour.webp new file mode 100644 index 00000000..8b23e1cb Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t01-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t01-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t01-geometry.webp new file mode 100644 index 00000000..df1f1e86 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t01-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t02-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t02-colour.webp new file mode 100644 index 00000000..ee2f52bb Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t02-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t02-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t02-geometry.webp new file mode 100644 index 00000000..a119adf7 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t02-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t03-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t03-colour.webp new file mode 100644 index 00000000..8f032bc9 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t03-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t03-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t03-geometry.webp new file mode 100644 index 00000000..a3d9c65a Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t03-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t04-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t04-colour.webp new file mode 100644 index 00000000..e4157192 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t04-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t04-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t04-geometry.webp new file mode 100644 index 00000000..f787120e Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t04-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t05-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t05-colour.webp new file mode 100644 index 00000000..13d4b141 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t05-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t05-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t05-geometry.webp new file mode 100644 index 00000000..a26acc06 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t05-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t06-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t06-colour.webp new file mode 100644 index 00000000..a3d23180 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t06-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t06-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t06-geometry.webp new file mode 100644 index 00000000..00abe410 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t06-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t07-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t07-colour.webp new file mode 100644 index 00000000..67fd7605 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t07-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t07-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t07-geometry.webp new file mode 100644 index 00000000..998d80ca Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t07-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t08-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t08-colour.webp new file mode 100644 index 00000000..d47c3d71 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t08-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t08-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t08-geometry.webp new file mode 100644 index 00000000..1c2e742c Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t08-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t09-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t09-colour.webp new file mode 100644 index 00000000..43545dad Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t09-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t09-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t09-geometry.webp new file mode 100644 index 00000000..7c06ba9b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t09-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t10-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t10-colour.webp new file mode 100644 index 00000000..71db26f9 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t10-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t10-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t10-geometry.webp new file mode 100644 index 00000000..64b8f54e Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t10-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t11-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t11-colour.webp new file mode 100644 index 00000000..217387dc Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t11-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t11-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t11-geometry.webp new file mode 100644 index 00000000..f2127ce4 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t11-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t12-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t12-colour.webp new file mode 100644 index 00000000..908e626b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t12-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t12-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t12-geometry.webp new file mode 100644 index 00000000..1ccc9f79 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t12-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t13-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t13-colour.webp new file mode 100644 index 00000000..a7406271 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t13-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t13-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t13-geometry.webp new file mode 100644 index 00000000..36933b0d Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t13-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t14-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t14-colour.webp new file mode 100644 index 00000000..ee3823c5 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t14-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t14-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t14-geometry.webp new file mode 100644 index 00000000..064ee277 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t14-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t15-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t15-colour.webp new file mode 100644 index 00000000..29409430 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t15-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t15-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t15-geometry.webp new file mode 100644 index 00000000..75ae86c3 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t15-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t16-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t16-colour.webp new file mode 100644 index 00000000..a50024d4 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t16-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t16-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t16-geometry.webp new file mode 100644 index 00000000..c0286780 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t16-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t17-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t17-colour.webp new file mode 100644 index 00000000..df1d26bc Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t17-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t17-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t17-geometry.webp new file mode 100644 index 00000000..ad94826f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t17-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t18-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t18-colour.webp new file mode 100644 index 00000000..51b89544 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t18-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t18-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t18-geometry.webp new file mode 100644 index 00000000..717fb6f8 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t18-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t19-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t19-colour.webp new file mode 100644 index 00000000..dbdac364 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t19-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t19-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t19-geometry.webp new file mode 100644 index 00000000..ec133982 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t19-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t20-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t20-colour.webp new file mode 100644 index 00000000..b1eccb3c Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t20-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t20-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t20-geometry.webp new file mode 100644 index 00000000..64692465 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t20-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t21-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t21-colour.webp new file mode 100644 index 00000000..8eeb4af1 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t21-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t21-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t21-geometry.webp new file mode 100644 index 00000000..e01306ad Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t21-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t22-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t22-colour.webp new file mode 100644 index 00000000..070d8d99 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t22-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t22-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t22-geometry.webp new file mode 100644 index 00000000..42c7ba9f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t22-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t23-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t23-colour.webp new file mode 100644 index 00000000..26820fc4 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t23-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t23-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t23-geometry.webp new file mode 100644 index 00000000..d578769b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t23-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t24-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t24-colour.webp new file mode 100644 index 00000000..944d2d7f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t24-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t24-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t24-geometry.webp new file mode 100644 index 00000000..a18af569 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t24-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t25-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t25-colour.webp new file mode 100644 index 00000000..f902bea7 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t25-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t25-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t25-geometry.webp new file mode 100644 index 00000000..b9e726d1 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t25-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t26-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t26-colour.webp new file mode 100644 index 00000000..de1883f1 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t26-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t26-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t26-geometry.webp new file mode 100644 index 00000000..c4f2c33d Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t26-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t27-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t27-colour.webp new file mode 100644 index 00000000..8e6f04e5 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t27-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t27-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t27-geometry.webp new file mode 100644 index 00000000..26dc3c1c Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t27-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t28-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t28-colour.webp new file mode 100644 index 00000000..682b4975 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t28-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t28-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t28-geometry.webp new file mode 100644 index 00000000..1eb9681a Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t28-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t29-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t29-colour.webp new file mode 100644 index 00000000..ebbfad82 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t29-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t29-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t29-geometry.webp new file mode 100644 index 00000000..cb9f1d35 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t29-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t30-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t30-colour.webp new file mode 100644 index 00000000..6e93f4a0 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t30-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t30-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t30-geometry.webp new file mode 100644 index 00000000..03fba725 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t30-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t31-colour.webp b/public/ridge/vienna-f50ec31ee950/card-0-t31-colour.webp new file mode 100644 index 00000000..0bc262e2 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t31-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-0-t31-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-0-t31-geometry.webp new file mode 100644 index 00000000..97214f10 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-0-t31-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t00-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t00-colour.webp new file mode 100644 index 00000000..c5af4bb6 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t00-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t00-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t00-geometry.webp new file mode 100644 index 00000000..58cd96a5 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t00-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t01-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t01-colour.webp new file mode 100644 index 00000000..a6439983 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t01-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t01-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t01-geometry.webp new file mode 100644 index 00000000..aad4b786 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t01-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t02-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t02-colour.webp new file mode 100644 index 00000000..6ea1f7af Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t02-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t02-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t02-geometry.webp new file mode 100644 index 00000000..0c103115 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t02-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t03-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t03-colour.webp new file mode 100644 index 00000000..1a779093 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t03-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t03-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t03-geometry.webp new file mode 100644 index 00000000..28a2644b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t03-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t04-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t04-colour.webp new file mode 100644 index 00000000..950fc2a6 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t04-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t04-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t04-geometry.webp new file mode 100644 index 00000000..708c2c10 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t04-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t05-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t05-colour.webp new file mode 100644 index 00000000..46107bf7 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t05-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t05-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t05-geometry.webp new file mode 100644 index 00000000..d249f8de Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t05-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t06-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t06-colour.webp new file mode 100644 index 00000000..2a32bca9 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t06-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t06-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t06-geometry.webp new file mode 100644 index 00000000..f3250ed8 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t06-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t07-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t07-colour.webp new file mode 100644 index 00000000..41081904 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t07-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t07-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t07-geometry.webp new file mode 100644 index 00000000..d5e46567 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t07-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t08-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t08-colour.webp new file mode 100644 index 00000000..97db459b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t08-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t08-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t08-geometry.webp new file mode 100644 index 00000000..554e502e Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t08-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t09-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t09-colour.webp new file mode 100644 index 00000000..c30c2166 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t09-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t09-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t09-geometry.webp new file mode 100644 index 00000000..fb7f668d Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t09-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t10-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t10-colour.webp new file mode 100644 index 00000000..981fe509 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t10-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t10-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t10-geometry.webp new file mode 100644 index 00000000..27b1fb7a Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t10-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t11-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t11-colour.webp new file mode 100644 index 00000000..763fed8f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t11-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t11-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t11-geometry.webp new file mode 100644 index 00000000..d64787ea Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t11-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t12-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t12-colour.webp new file mode 100644 index 00000000..55103a11 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t12-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t12-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t12-geometry.webp new file mode 100644 index 00000000..7e71327f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t12-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t13-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t13-colour.webp new file mode 100644 index 00000000..84863b23 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t13-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t13-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t13-geometry.webp new file mode 100644 index 00000000..0cf1bfa6 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t13-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t14-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t14-colour.webp new file mode 100644 index 00000000..26a04948 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t14-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t14-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t14-geometry.webp new file mode 100644 index 00000000..f513b6de Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t14-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t15-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t15-colour.webp new file mode 100644 index 00000000..5c449c09 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t15-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t15-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t15-geometry.webp new file mode 100644 index 00000000..c4fa92b3 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t15-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t16-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t16-colour.webp new file mode 100644 index 00000000..2b2a61ce Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t16-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t16-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t16-geometry.webp new file mode 100644 index 00000000..42d24b90 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t16-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t17-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t17-colour.webp new file mode 100644 index 00000000..b6522d96 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t17-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t17-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t17-geometry.webp new file mode 100644 index 00000000..d50da47f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t17-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t18-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t18-colour.webp new file mode 100644 index 00000000..45e7edb8 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t18-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t18-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t18-geometry.webp new file mode 100644 index 00000000..af61ad07 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t18-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t19-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t19-colour.webp new file mode 100644 index 00000000..df60d40a Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t19-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t19-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t19-geometry.webp new file mode 100644 index 00000000..66127020 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t19-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t20-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t20-colour.webp new file mode 100644 index 00000000..b6659fdd Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t20-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t20-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t20-geometry.webp new file mode 100644 index 00000000..0bca3b52 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t20-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t21-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t21-colour.webp new file mode 100644 index 00000000..987eaac3 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t21-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t21-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t21-geometry.webp new file mode 100644 index 00000000..9d623baf Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t21-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t22-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t22-colour.webp new file mode 100644 index 00000000..9d947e7b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t22-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t22-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t22-geometry.webp new file mode 100644 index 00000000..84f0813e Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t22-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t23-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t23-colour.webp new file mode 100644 index 00000000..6a0fb7ab Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t23-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t23-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t23-geometry.webp new file mode 100644 index 00000000..c05fd3c7 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t23-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t24-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t24-colour.webp new file mode 100644 index 00000000..2aae2a91 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t24-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t24-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t24-geometry.webp new file mode 100644 index 00000000..02be7816 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t24-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t25-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t25-colour.webp new file mode 100644 index 00000000..d88a2cf5 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t25-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t25-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t25-geometry.webp new file mode 100644 index 00000000..5a840047 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t25-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t26-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t26-colour.webp new file mode 100644 index 00000000..ca02aa50 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t26-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t26-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t26-geometry.webp new file mode 100644 index 00000000..d1274f06 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t26-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t27-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t27-colour.webp new file mode 100644 index 00000000..368ed321 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t27-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t27-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t27-geometry.webp new file mode 100644 index 00000000..acfcf68e Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t27-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t28-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t28-colour.webp new file mode 100644 index 00000000..99278ff3 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t28-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t28-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t28-geometry.webp new file mode 100644 index 00000000..97c25e93 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t28-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t29-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t29-colour.webp new file mode 100644 index 00000000..6896f47c Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t29-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t29-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t29-geometry.webp new file mode 100644 index 00000000..b86f0e94 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t29-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t30-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t30-colour.webp new file mode 100644 index 00000000..7053645b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t30-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t30-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t30-geometry.webp new file mode 100644 index 00000000..29f233d2 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t30-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t31-colour.webp b/public/ridge/vienna-f50ec31ee950/card-1-t31-colour.webp new file mode 100644 index 00000000..a67cd724 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t31-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-1-t31-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-1-t31-geometry.webp new file mode 100644 index 00000000..b1365240 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-1-t31-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t00-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t00-colour.webp new file mode 100644 index 00000000..8bfde290 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t00-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t00-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t00-geometry.webp new file mode 100644 index 00000000..ae5550f5 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t00-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t01-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t01-colour.webp new file mode 100644 index 00000000..8039a109 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t01-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t01-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t01-geometry.webp new file mode 100644 index 00000000..6b086a39 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t01-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t02-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t02-colour.webp new file mode 100644 index 00000000..1317a36d Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t02-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t02-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t02-geometry.webp new file mode 100644 index 00000000..1ba99ab8 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t02-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t03-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t03-colour.webp new file mode 100644 index 00000000..e1be6372 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t03-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t03-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t03-geometry.webp new file mode 100644 index 00000000..6cb9b9c5 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t03-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t04-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t04-colour.webp new file mode 100644 index 00000000..45d9819b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t04-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t04-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t04-geometry.webp new file mode 100644 index 00000000..6a0204d6 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t04-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t05-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t05-colour.webp new file mode 100644 index 00000000..a3e8391e Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t05-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t05-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t05-geometry.webp new file mode 100644 index 00000000..58b0f626 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t05-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t06-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t06-colour.webp new file mode 100644 index 00000000..40674442 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t06-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t06-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t06-geometry.webp new file mode 100644 index 00000000..8b9fdb41 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t06-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t07-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t07-colour.webp new file mode 100644 index 00000000..ec5da0e4 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t07-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t07-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t07-geometry.webp new file mode 100644 index 00000000..4cb83331 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t07-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t08-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t08-colour.webp new file mode 100644 index 00000000..b7c9cccf Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t08-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t08-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t08-geometry.webp new file mode 100644 index 00000000..5ae5e3ae Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t08-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t09-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t09-colour.webp new file mode 100644 index 00000000..b9fa4d48 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t09-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t09-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t09-geometry.webp new file mode 100644 index 00000000..cc630325 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t09-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t10-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t10-colour.webp new file mode 100644 index 00000000..b63b2a9b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t10-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t10-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t10-geometry.webp new file mode 100644 index 00000000..c634800f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t10-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t11-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t11-colour.webp new file mode 100644 index 00000000..f0c1b27e Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t11-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t11-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t11-geometry.webp new file mode 100644 index 00000000..8d79bb99 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t11-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t12-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t12-colour.webp new file mode 100644 index 00000000..42cf3107 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t12-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t12-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t12-geometry.webp new file mode 100644 index 00000000..f2dafbd9 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t12-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t13-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t13-colour.webp new file mode 100644 index 00000000..07dd9300 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t13-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t13-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t13-geometry.webp new file mode 100644 index 00000000..e20a9170 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t13-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t14-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t14-colour.webp new file mode 100644 index 00000000..623e6edb Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t14-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t14-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t14-geometry.webp new file mode 100644 index 00000000..02b1258f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t14-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t15-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t15-colour.webp new file mode 100644 index 00000000..079fd725 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t15-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t15-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t15-geometry.webp new file mode 100644 index 00000000..cea2b8e4 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t15-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t16-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t16-colour.webp new file mode 100644 index 00000000..67f196c1 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t16-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t16-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t16-geometry.webp new file mode 100644 index 00000000..3702ec15 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t16-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t17-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t17-colour.webp new file mode 100644 index 00000000..b2c864e2 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t17-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t17-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t17-geometry.webp new file mode 100644 index 00000000..133bb147 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t17-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t18-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t18-colour.webp new file mode 100644 index 00000000..a0d4d8fa Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t18-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t18-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t18-geometry.webp new file mode 100644 index 00000000..34949f41 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t18-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t19-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t19-colour.webp new file mode 100644 index 00000000..7a44160b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t19-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t19-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t19-geometry.webp new file mode 100644 index 00000000..bffe85bd Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t19-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t20-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t20-colour.webp new file mode 100644 index 00000000..760155fd Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t20-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t20-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t20-geometry.webp new file mode 100644 index 00000000..c24bf013 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t20-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t21-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t21-colour.webp new file mode 100644 index 00000000..b38a28e1 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t21-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t21-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t21-geometry.webp new file mode 100644 index 00000000..60482a18 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t21-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t22-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t22-colour.webp new file mode 100644 index 00000000..b0dc679f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t22-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t22-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t22-geometry.webp new file mode 100644 index 00000000..35103f4a Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t22-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t23-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t23-colour.webp new file mode 100644 index 00000000..30cd1c5b Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t23-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t23-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t23-geometry.webp new file mode 100644 index 00000000..d9c75f82 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t23-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t24-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t24-colour.webp new file mode 100644 index 00000000..5233fb24 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t24-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t24-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t24-geometry.webp new file mode 100644 index 00000000..48a2aa42 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t24-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t25-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t25-colour.webp new file mode 100644 index 00000000..fc092679 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t25-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t25-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t25-geometry.webp new file mode 100644 index 00000000..4c5e7fc8 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t25-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t26-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t26-colour.webp new file mode 100644 index 00000000..aa277098 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t26-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t26-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t26-geometry.webp new file mode 100644 index 00000000..06258cf4 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t26-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t27-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t27-colour.webp new file mode 100644 index 00000000..34d07fee Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t27-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t27-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t27-geometry.webp new file mode 100644 index 00000000..f23c776f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t27-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t28-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t28-colour.webp new file mode 100644 index 00000000..f3dbe838 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t28-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t28-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t28-geometry.webp new file mode 100644 index 00000000..c3157c79 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t28-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t29-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t29-colour.webp new file mode 100644 index 00000000..6319a327 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t29-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t29-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t29-geometry.webp new file mode 100644 index 00000000..c02f2b73 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t29-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t30-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t30-colour.webp new file mode 100644 index 00000000..4a604811 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t30-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t30-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t30-geometry.webp new file mode 100644 index 00000000..f0f62f6f Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t30-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t31-colour.webp b/public/ridge/vienna-f50ec31ee950/card-2-t31-colour.webp new file mode 100644 index 00000000..ac008a73 Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t31-colour.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/card-2-t31-geometry.webp b/public/ridge/vienna-f50ec31ee950/card-2-t31-geometry.webp new file mode 100644 index 00000000..b60767fd Binary files /dev/null and b/public/ridge/vienna-f50ec31ee950/card-2-t31-geometry.webp differ diff --git a/public/ridge/vienna-f50ec31ee950/manifest.json b/public/ridge/vienna-f50ec31ee950/manifest.json new file mode 100644 index 00000000..caca5704 --- /dev/null +++ b/public/ridge/vienna-f50ec31ee950/manifest.json @@ -0,0 +1,1376 @@ +{ + "schema": 3, + "baker_version": 7, + "bake_id": "f50ec31ee950", + "place": { + "id": "vienna", + "name": "Vienna, looking SW to Rax/Schneeberg", + "lat": 48.1929826, + "lon": 16.3534237, + "altitude_km": 0.18330000000000002, + "eye_m": 213.3, + "tz": "Europe/Vienna" + }, + "view": { + "look_az_deg": 214.0, + "plane_h": 600, + "px_per_deg_h": 17.77777777777778, + "px_per_deg_v": 171.73831979090915, + "exaggeration": 9.660280488238639, + "horizon_row": 357.01990847502145, + "sky_row": 24.0, + "near_row": 396.0, + "ring_w": 6400, + "tile_w": 200, + "tiles": 32, + "apron": 2 + }, + "curvature": { + "r_earth_m": 6371000.0, + "k_ref": 0.13 + }, + "encoding": { + "log_d_min": 6.214608098422191, + "log_d_max": 11.462786662662916, + "normal": "rt8" + }, + "camera": { + "r_max_m": 95.8, + "r_max_forward_m": 198.4 + }, + "cards": [ + { + "near_m": null, + "far_m": 4013.740853069043 + }, + { + "near_m": 4013.740853069043, + "far_m": 41206.78494161152 + }, + { + "near_m": 41206.78494161152, + "far_m": null + } + ], + "tiles": [ + [ + { + "top": 337, + "h": 263, + "distance_m": 612.7647094726562, + "colour": { + "file": "card-0-t00-colour.webp", + "bytes": 850 + }, + "geometry": { + "file": "card-0-t00-geometry.webp", + "bytes": 7502 + } + }, + { + "top": 254, + "h": 346, + "distance_m": 7923.6240234375, + "colour": { + "file": "card-1-t00-colour.webp", + "bytes": 1328 + }, + "geometry": { + "file": "card-1-t00-geometry.webp", + "bytes": 21430 + } + }, + { + "top": 326, + "h": 274, + "distance_m": 41265.13671875, + "colour": { + "file": "card-2-t00-colour.webp", + "bytes": 894 + }, + "geometry": { + "file": "card-2-t00-geometry.webp", + "bytes": 8502 + } + } + ], + [ + { + "top": 397, + "h": 203, + "distance_m": 681.6199951171875, + "colour": { + "file": "card-0-t01-colour.webp", + "bytes": 702 + }, + "geometry": { + "file": "card-0-t01-geometry.webp", + "bytes": 5444 + } + }, + { + "top": 294, + "h": 306, + "distance_m": 12328.642578125, + "colour": { + "file": "card-1-t01-colour.webp", + "bytes": 1202 + }, + "geometry": { + "file": "card-1-t01-geometry.webp", + "bytes": 19568 + } + }, + { + "top": 359, + "h": 241, + "distance_m": 41087.56640625, + "colour": { + "file": "card-2-t01-colour.webp", + "bytes": 652 + }, + "geometry": { + "file": "card-2-t01-geometry.webp", + "bytes": 3190 + } + } + ], + [ + { + "top": 437, + "h": 163, + "distance_m": 802.34912109375, + "colour": { + "file": "card-0-t02-colour.webp", + "bytes": 634 + }, + "geometry": { + "file": "card-0-t02-geometry.webp", + "bytes": 7220 + } + }, + { + "top": 353, + "h": 247, + "distance_m": 9379.99609375, + "colour": { + "file": "card-1-t02-colour.webp", + "bytes": 956 + }, + "geometry": { + "file": "card-1-t02-geometry.webp", + "bytes": 16212 + } + }, + { + "top": 362, + "h": 238, + "distance_m": 38873.109375, + "colour": { + "file": "card-2-t02-colour.webp", + "bytes": 506 + }, + "geometry": { + "file": "card-2-t02-geometry.webp", + "bytes": 2514 + } + } + ], + [ + { + "top": 439, + "h": 161, + "distance_m": 1497.642333984375, + "colour": { + "file": "card-0-t03-colour.webp", + "bytes": 600 + }, + "geometry": { + "file": "card-0-t03-geometry.webp", + "bytes": 9330 + } + }, + { + "top": 357, + "h": 243, + "distance_m": 9379.99609375, + "colour": { + "file": "card-1-t03-colour.webp", + "bytes": 986 + }, + "geometry": { + "file": "card-1-t03-geometry.webp", + "bytes": 15134 + } + }, + { + "top": 371, + "h": 229, + "distance_m": 39822.90234375, + "colour": { + "file": "card-2-t03-colour.webp", + "bytes": 482 + }, + "geometry": { + "file": "card-2-t03-geometry.webp", + "bytes": 1748 + } + } + ], + [ + { + "top": 455, + "h": 145, + "distance_m": 1587.480712890625, + "colour": { + "file": "card-0-t04-colour.webp", + "bytes": 678 + }, + "geometry": { + "file": "card-0-t04-geometry.webp", + "bytes": 7418 + } + }, + { + "top": 363, + "h": 237, + "distance_m": 7940.0009765625, + "colour": { + "file": "card-1-t04-colour.webp", + "bytes": 1008 + }, + "geometry": { + "file": "card-1-t04-geometry.webp", + "bytes": 15664 + } + }, + { + "top": 380, + "h": 220, + "distance_m": 42715.42578125, + "colour": { + "file": "card-2-t04-colour.webp", + "bytes": 510 + }, + "geometry": { + "file": "card-2-t04-geometry.webp", + "bytes": 516 + } + } + ], + [ + { + "top": 461, + "h": 139, + "distance_m": 1739.9998779296875, + "colour": { + "file": "card-0-t05-colour.webp", + "bytes": 552 + }, + "geometry": { + "file": "card-0-t05-geometry.webp", + "bytes": 9882 + } + }, + { + "top": 390, + "h": 210, + "distance_m": 7191.796875, + "colour": { + "file": "card-1-t05-colour.webp", + "bytes": 498 + }, + "geometry": { + "file": "card-1-t05-geometry.webp", + "bytes": 9640 + } + }, + { + "top": 342, + "h": 258, + "distance_m": 73387.6015625, + "colour": { + "file": "card-2-t05-colour.webp", + "bytes": 994 + }, + "geometry": { + "file": "card-2-t05-geometry.webp", + "bytes": 6354 + } + } + ], + [ + { + "top": 461, + "h": 139, + "distance_m": 1397.39599609375, + "colour": { + "file": "card-0-t06-colour.webp", + "bytes": 384 + }, + "geometry": { + "file": "card-0-t06-geometry.webp", + "bytes": 7150 + } + }, + { + "top": 393, + "h": 207, + "distance_m": 6499.99853515625, + "colour": { + "file": "card-1-t06-colour.webp", + "bytes": 514 + }, + "geometry": { + "file": "card-1-t06-geometry.webp", + "bytes": 10622 + } + }, + { + "top": 323, + "h": 277, + "distance_m": 60884.40234375, + "colour": { + "file": "card-2-t06-colour.webp", + "bytes": 1652 + }, + "geometry": { + "file": "card-2-t06-geometry.webp", + "bytes": 18624 + } + } + ], + [ + { + "top": 440, + "h": 160, + "distance_m": 1639.5902099609375, + "colour": { + "file": "card-0-t07-colour.webp", + "bytes": 584 + }, + "geometry": { + "file": "card-0-t07-geometry.webp", + "bytes": 9288 + } + }, + { + "top": 393, + "h": 207, + "distance_m": 7020.00244140625, + "colour": { + "file": "card-1-t07-colour.webp", + "bytes": 604 + }, + "geometry": { + "file": "card-1-t07-geometry.webp", + "bytes": 8706 + } + }, + { + "top": 332, + "h": 268, + "distance_m": 53030.578125, + "colour": { + "file": "card-2-t07-colour.webp", + "bytes": 1356 + }, + "geometry": { + "file": "card-2-t07-geometry.webp", + "bytes": 14322 + } + } + ], + [ + { + "top": 404, + "h": 196, + "distance_m": 1494.0631103515625, + "colour": { + "file": "card-0-t08-colour.webp", + "bytes": 728 + }, + "geometry": { + "file": "card-0-t08-geometry.webp", + "bytes": 9320 + } + }, + { + "top": 393, + "h": 207, + "distance_m": 7499.99755859375, + "colour": { + "file": "card-1-t08-colour.webp", + "bytes": 700 + }, + "geometry": { + "file": "card-1-t08-geometry.webp", + "bytes": 10602 + } + }, + { + "top": 329, + "h": 271, + "distance_m": 44656.86328125, + "colour": { + "file": "card-2-t08-colour.webp", + "bytes": 1258 + }, + "geometry": { + "file": "card-2-t08-geometry.webp", + "bytes": 9538 + } + } + ], + [ + { + "top": 396, + "h": 204, + "distance_m": 1222.066650390625, + "colour": { + "file": "card-0-t09-colour.webp", + "bytes": 558 + }, + "geometry": { + "file": "card-0-t09-geometry.webp", + "bytes": 8568 + } + }, + { + "top": 360, + "h": 240, + "distance_m": 9976.568359375, + "colour": { + "file": "card-1-t09-colour.webp", + "bytes": 876 + }, + "geometry": { + "file": "card-1-t09-geometry.webp", + "bytes": 12968 + } + }, + { + "top": 370, + "h": 230, + "distance_m": 44772.3828125, + "colour": { + "file": "card-2-t09-colour.webp", + "bytes": 626 + }, + "geometry": { + "file": "card-2-t09-geometry.webp", + "bytes": 2232 + } + } + ], + [ + { + "top": 380, + "h": 220, + "distance_m": 1104.7967529296875, + "colour": { + "file": "card-0-t10-colour.webp", + "bytes": 576 + }, + "geometry": { + "file": "card-0-t10-geometry.webp", + "bytes": 6836 + } + }, + { + "top": 355, + "h": 245, + "distance_m": 14817.3876953125, + "colour": { + "file": "card-1-t10-colour.webp", + "bytes": 938 + }, + "geometry": { + "file": "card-1-t10-geometry.webp", + "bytes": 12918 + } + }, + { + "top": 370, + "h": 230, + "distance_m": 38822.984375, + "colour": { + "file": "card-2-t10-colour.webp", + "bytes": 474 + }, + "geometry": { + "file": "card-2-t10-geometry.webp", + "bytes": 2060 + } + } + ], + [ + { + "top": 285, + "h": 315, + "distance_m": 1123.831787109375, + "colour": { + "file": "card-0-t11-colour.webp", + "bytes": 1002 + }, + "geometry": { + "file": "card-0-t11-geometry.webp", + "bytes": 10782 + } + }, + { + "top": 312, + "h": 288, + "distance_m": 16307.2421875, + "colour": { + "file": "card-1-t11-colour.webp", + "bytes": 544 + }, + "geometry": { + "file": "card-1-t11-geometry.webp", + "bytes": 2216 + } + }, + { + "top": 358, + "h": 242, + "distance_m": 37985.00390625, + "colour": { + "file": "card-2-t11-colour.webp", + "bytes": 630 + }, + "geometry": { + "file": "card-2-t11-geometry.webp", + "bytes": 1840 + } + } + ], + [ + { + "top": 272, + "h": 328, + "distance_m": 1142.0506591796875, + "colour": { + "file": "card-0-t12-colour.webp", + "bytes": 758 + }, + "geometry": { + "file": "card-0-t12-geometry.webp", + "bytes": 13578 + } + }, + { + "top": 281, + "h": 319, + "distance_m": 5059.99853515625, + "colour": { + "file": "card-1-t12-colour.webp", + "bytes": 520 + }, + "geometry": { + "file": "card-1-t12-geometry.webp", + "bytes": 176 + } + }, + { + "top": 350, + "h": 250, + "distance_m": 37450.98828125, + "colour": { + "file": "card-2-t12-colour.webp", + "bytes": 646 + }, + "geometry": { + "file": "card-2-t12-geometry.webp", + "bytes": 612 + } + } + ], + [ + { + "top": 265, + "h": 335, + "distance_m": 1120.1195068359375, + "colour": { + "file": "card-0-t13-colour.webp", + "bytes": 582 + }, + "geometry": { + "file": "card-0-t13-geometry.webp", + "bytes": 11368 + } + }, + { + "top": 309, + "h": 291, + "distance_m": 35995.66015625, + "colour": { + "file": "card-1-t13-colour.webp", + "bytes": 952 + }, + "geometry": { + "file": "card-1-t13-geometry.webp", + "bytes": 5842 + } + }, + { + "top": 332, + "h": 268, + "distance_m": 37581.2578125, + "colour": { + "file": "card-2-t13-colour.webp", + "bytes": 634 + }, + "geometry": { + "file": "card-2-t13-geometry.webp", + "bytes": 1514 + } + } + ], + [ + { + "top": 247, + "h": 353, + "distance_m": 1184.9326171875, + "colour": { + "file": "card-0-t14-colour.webp", + "bytes": 608 + }, + "geometry": { + "file": "card-0-t14-geometry.webp", + "bytes": 10944 + } + }, + { + "top": 312, + "h": 288, + "distance_m": 33968.61328125, + "colour": { + "file": "card-1-t14-colour.webp", + "bytes": 1280 + }, + "geometry": { + "file": "card-1-t14-geometry.webp", + "bytes": 15154 + } + }, + { + "top": 318, + "h": 282, + "distance_m": 37484.328125, + "colour": { + "file": "card-2-t14-colour.webp", + "bytes": 678 + }, + "geometry": { + "file": "card-2-t14-geometry.webp", + "bytes": 1148 + } + } + ], + [ + { + "top": 244, + "h": 356, + "distance_m": 1333.3995361328125, + "colour": { + "file": "card-0-t15-colour.webp", + "bytes": 684 + }, + "geometry": { + "file": "card-0-t15-geometry.webp", + "bytes": 10824 + } + }, + { + "top": 346, + "h": 254, + "distance_m": 7460.00048828125, + "colour": { + "file": "card-1-t15-colour.webp", + "bytes": 602 + }, + "geometry": { + "file": "card-1-t15-geometry.webp", + "bytes": 6172 + } + }, + { + "top": 315, + "h": 285, + "distance_m": 56122.19140625, + "colour": { + "file": "card-2-t15-colour.webp", + "bytes": 1052 + }, + "geometry": { + "file": "card-2-t15-geometry.webp", + "bytes": 10512 + } + } + ], + [ + { + "top": 248, + "h": 352, + "distance_m": 1396.94775390625, + "colour": { + "file": "card-0-t16-colour.webp", + "bytes": 810 + }, + "geometry": { + "file": "card-0-t16-geometry.webp", + "bytes": 11362 + } + }, + { + "top": 364, + "h": 236, + "distance_m": 6820.00048828125, + "colour": { + "file": "card-1-t16-colour.webp", + "bytes": 436 + }, + "geometry": { + "file": "card-1-t16-geometry.webp", + "bytes": 4668 + } + }, + { + "top": 303, + "h": 297, + "distance_m": 53429.6796875, + "colour": { + "file": "card-2-t16-colour.webp", + "bytes": 1488 + }, + "geometry": { + "file": "card-2-t16-geometry.webp", + "bytes": 18396 + } + } + ], + [ + { + "top": 286, + "h": 314, + "distance_m": 1396.3682861328125, + "colour": { + "file": "card-0-t17-colour.webp", + "bytes": 684 + }, + "geometry": { + "file": "card-0-t17-geometry.webp", + "bytes": 10000 + } + }, + { + "top": 240, + "h": 360, + "distance_m": 14172.7490234375, + "colour": { + "file": "card-1-t17-colour.webp", + "bytes": 1104 + }, + "geometry": { + "file": "card-1-t17-geometry.webp", + "bytes": 10308 + } + }, + { + "top": 235, + "h": 365, + "distance_m": 65859.734375, + "colour": { + "file": "card-2-t17-colour.webp", + "bytes": 1674 + }, + "geometry": { + "file": "card-2-t17-geometry.webp", + "bytes": 16832 + } + } + ], + [ + { + "top": 314, + "h": 286, + "distance_m": 1440.37646484375, + "colour": { + "file": "card-0-t18-colour.webp", + "bytes": 552 + }, + "geometry": { + "file": "card-0-t18-geometry.webp", + "bytes": 11138 + } + }, + { + "top": 122, + "h": 478, + "distance_m": 14387.8525390625, + "colour": { + "file": "card-1-t18-colour.webp", + "bytes": 1796 + }, + "geometry": { + "file": "card-1-t18-geometry.webp", + "bytes": 30488 + } + }, + { + "top": 211, + "h": 389, + "distance_m": 44942.2578125, + "colour": { + "file": "card-2-t18-colour.webp", + "bytes": 1396 + }, + "geometry": { + "file": "card-2-t18-geometry.webp", + "bytes": 17582 + } + } + ], + [ + { + "top": 317, + "h": 283, + "distance_m": 1704.598388671875, + "colour": { + "file": "card-0-t19-colour.webp", + "bytes": 704 + }, + "geometry": { + "file": "card-0-t19-geometry.webp", + "bytes": 12068 + } + }, + { + "top": 144, + "h": 456, + "distance_m": 11607.04296875, + "colour": { + "file": "card-1-t19-colour.webp", + "bytes": 1898 + }, + "geometry": { + "file": "card-1-t19-geometry.webp", + "bytes": 27774 + } + }, + { + "top": 111, + "h": 489, + "distance_m": 53726.9609375, + "colour": { + "file": "card-2-t19-colour.webp", + "bytes": 2010 + }, + "geometry": { + "file": "card-2-t19-geometry.webp", + "bytes": 24316 + } + } + ], + [ + { + "top": 297, + "h": 303, + "distance_m": 2042.0157470703125, + "colour": { + "file": "card-0-t20-colour.webp", + "bytes": 724 + }, + "geometry": { + "file": "card-0-t20-geometry.webp", + "bytes": 11566 + } + }, + { + "top": 95, + "h": 505, + "distance_m": 10982.046875, + "colour": { + "file": "card-1-t20-colour.webp", + "bytes": 1794 + }, + "geometry": { + "file": "card-1-t20-geometry.webp", + "bytes": 28234 + } + }, + { + "top": 171, + "h": 429, + "distance_m": 40730.703125, + "colour": { + "file": "card-2-t20-colour.webp", + "bytes": 1772 + }, + "geometry": { + "file": "card-2-t20-geometry.webp", + "bytes": 17478 + } + } + ], + [ + { + "top": 269, + "h": 331, + "distance_m": 2420.00048828125, + "colour": { + "file": "card-0-t21-colour.webp", + "bytes": 998 + }, + "geometry": { + "file": "card-0-t21-geometry.webp", + "bytes": 18072 + } + }, + { + "top": 174, + "h": 426, + "distance_m": 8230.6103515625, + "colour": { + "file": "card-1-t21-colour.webp", + "bytes": 1386 + }, + "geometry": { + "file": "card-1-t21-geometry.webp", + "bytes": 15038 + } + }, + { + "top": 199, + "h": 401, + "distance_m": 41044.6015625, + "colour": { + "file": "card-2-t21-colour.webp", + "bytes": 1644 + }, + "geometry": { + "file": "card-2-t21-geometry.webp", + "bytes": 16786 + } + } + ], + [ + { + "top": 279, + "h": 321, + "distance_m": 1978.4818115234375, + "colour": { + "file": "card-0-t22-colour.webp", + "bytes": 1478 + }, + "geometry": { + "file": "card-0-t22-geometry.webp", + "bytes": 19720 + } + }, + { + "top": 80, + "h": 520, + "distance_m": 7335.22265625, + "colour": { + "file": "card-1-t22-colour.webp", + "bytes": 1866 + }, + "geometry": { + "file": "card-1-t22-geometry.webp", + "bytes": 21744 + } + }, + { + "top": 232, + "h": 368, + "distance_m": 40101.375, + "colour": { + "file": "card-2-t22-colour.webp", + "bytes": 1206 + }, + "geometry": { + "file": "card-2-t22-geometry.webp", + "bytes": 6988 + } + } + ], + [ + { + "top": 351, + "h": 249, + "distance_m": 925.3698120117188, + "colour": { + "file": "card-0-t23-colour.webp", + "bytes": 946 + }, + "geometry": { + "file": "card-0-t23-geometry.webp", + "bytes": 10266 + } + }, + { + "top": 79, + "h": 521, + "distance_m": 7168.36474609375, + "colour": { + "file": "card-1-t23-colour.webp", + "bytes": 1384 + }, + "geometry": { + "file": "card-1-t23-geometry.webp", + "bytes": 20954 + } + }, + { + "top": 289, + "h": 311, + "distance_m": 41300.6875, + "colour": { + "file": "card-2-t23-colour.webp", + "bytes": 934 + }, + "geometry": { + "file": "card-2-t23-geometry.webp", + "bytes": 4296 + } + } + ], + [ + { + "top": 244, + "h": 356, + "distance_m": 1025.4903564453125, + "colour": { + "file": "card-0-t24-colour.webp", + "bytes": 1106 + }, + "geometry": { + "file": "card-0-t24-geometry.webp", + "bytes": 11518 + } + }, + { + "top": 159, + "h": 441, + "distance_m": 11321.796875, + "colour": { + "file": "card-1-t24-colour.webp", + "bytes": 1558 + }, + "geometry": { + "file": "card-1-t24-geometry.webp", + "bytes": 18134 + } + }, + { + "top": 319, + "h": 281, + "distance_m": 57565.35546875, + "colour": { + "file": "card-2-t24-colour.webp", + "bytes": 954 + }, + "geometry": { + "file": "card-2-t24-geometry.webp", + "bytes": 6602 + } + } + ], + [ + { + "top": 229, + "h": 371, + "distance_m": 1073.8558349609375, + "colour": { + "file": "card-0-t25-colour.webp", + "bytes": 808 + }, + "geometry": { + "file": "card-0-t25-geometry.webp", + "bytes": 12526 + } + }, + { + "top": 72, + "h": 528, + "distance_m": 5733.2158203125, + "colour": { + "file": "card-1-t25-colour.webp", + "bytes": 1614 + }, + "geometry": { + "file": "card-1-t25-geometry.webp", + "bytes": 15386 + } + }, + { + "top": 313, + "h": 287, + "distance_m": 59443.39453125, + "colour": { + "file": "card-2-t25-colour.webp", + "bytes": 1490 + }, + "geometry": { + "file": "card-2-t25-geometry.webp", + "bytes": 16294 + } + } + ], + [ + { + "top": 250, + "h": 350, + "distance_m": 766.68505859375, + "colour": { + "file": "card-0-t26-colour.webp", + "bytes": 676 + }, + "geometry": { + "file": "card-0-t26-geometry.webp", + "bytes": 10752 + } + }, + { + "top": 28, + "h": 572, + "distance_m": 5613.7412109375, + "colour": { + "file": "card-1-t26-colour.webp", + "bytes": 1432 + }, + "geometry": { + "file": "card-1-t26-geometry.webp", + "bytes": 20908 + } + }, + { + "top": 338, + "h": 262, + "distance_m": 65859.734375, + "colour": { + "file": "card-2-t26-colour.webp", + "bytes": 1384 + }, + "geometry": { + "file": "card-2-t26-geometry.webp", + "bytes": 14708 + } + } + ], + [ + { + "top": 278, + "h": 322, + "distance_m": 715.7683715820312, + "colour": { + "file": "card-0-t27-colour.webp", + "bytes": 708 + }, + "geometry": { + "file": "card-0-t27-geometry.webp", + "bytes": 8710 + } + }, + { + "top": 24, + "h": 576, + "distance_m": 6389.61474609375, + "colour": { + "file": "card-1-t27-colour.webp", + "bytes": 1470 + }, + "geometry": { + "file": "card-1-t27-geometry.webp", + "bytes": 23794 + } + }, + { + "top": 344, + "h": 256, + "distance_m": 50670.5078125, + "colour": { + "file": "card-2-t27-colour.webp", + "bytes": 1080 + }, + "geometry": { + "file": "card-2-t27-geometry.webp", + "bytes": 11834 + } + } + ], + [ + { + "top": 309, + "h": 291, + "distance_m": 851.5679321289062, + "colour": { + "file": "card-0-t28-colour.webp", + "bytes": 560 + }, + "geometry": { + "file": "card-0-t28-geometry.webp", + "bytes": 6160 + } + }, + { + "top": 94, + "h": 506, + "distance_m": 5985.80078125, + "colour": { + "file": "card-1-t28-colour.webp", + "bytes": 1472 + }, + "geometry": { + "file": "card-1-t28-geometry.webp", + "bytes": 23606 + } + }, + { + "top": 338, + "h": 262, + "distance_m": 41220.84765625, + "colour": { + "file": "card-2-t28-colour.webp", + "bytes": 782 + }, + "geometry": { + "file": "card-2-t28-geometry.webp", + "bytes": 5094 + } + } + ], + [ + { + "top": 327, + "h": 273, + "distance_m": 591.9729614257812, + "colour": { + "file": "card-0-t29-colour.webp", + "bytes": 600 + }, + "geometry": { + "file": "card-0-t29-geometry.webp", + "bytes": 5650 + } + }, + { + "top": 53, + "h": 547, + "distance_m": 7741.88134765625, + "colour": { + "file": "card-1-t29-colour.webp", + "bytes": 1768 + }, + "geometry": { + "file": "card-1-t29-geometry.webp", + "bytes": 26930 + } + }, + { + "top": 334, + "h": 266, + "distance_m": 39778.60546875, + "colour": { + "file": "card-2-t29-colour.webp", + "bytes": 802 + }, + "geometry": { + "file": "card-2-t29-geometry.webp", + "bytes": 4504 + } + } + ], + [ + { + "top": 324, + "h": 276, + "distance_m": 592.1824951171875, + "colour": { + "file": "card-0-t30-colour.webp", + "bytes": 488 + }, + "geometry": { + "file": "card-0-t30-geometry.webp", + "bytes": 5312 + } + }, + { + "top": 58, + "h": 542, + "distance_m": 7652.43017578125, + "colour": { + "file": "card-1-t30-colour.webp", + "bytes": 1816 + }, + "geometry": { + "file": "card-1-t30-geometry.webp", + "bytes": 28380 + } + }, + { + "top": 344, + "h": 256, + "distance_m": 39515.10546875, + "colour": { + "file": "card-2-t30-colour.webp", + "bytes": 756 + }, + "geometry": { + "file": "card-2-t30-geometry.webp", + "bytes": 4638 + } + } + ], + [ + { + "top": 330, + "h": 270, + "distance_m": 597.7586059570312, + "colour": { + "file": "card-0-t31-colour.webp", + "bytes": 506 + }, + "geometry": { + "file": "card-0-t31-geometry.webp", + "bytes": 5788 + } + }, + { + "top": 85, + "h": 515, + "distance_m": 7773.806640625, + "colour": { + "file": "card-1-t31-colour.webp", + "bytes": 1642 + }, + "geometry": { + "file": "card-1-t31-geometry.webp", + "bytes": 25034 + } + }, + { + "top": 326, + "h": 274, + "distance_m": 39216.27734375, + "colour": { + "file": "card-2-t31-colour.webp", + "bytes": 760 + }, + "geometry": { + "file": "card-2-t31-geometry.webp", + "bytes": 4148 + } + } + ] + ], + "bytes": 1210136, + "attribution": { + "credit_line": "Contains modified Copernicus data: DEM \u00a9 DLR e.V. 2010-2014 and \u00a9 Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.", + "licence": "Copernicus DEM licence: free, full and open access, with the credit line shown", + "dem_source": "Copernicus DEM GLO-30 (30 m)", + "url": "https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model" + } +} diff --git a/scripts/build-dev-preview.sh b/scripts/build-dev-preview.sh new file mode 100755 index 00000000..8f89dce8 --- /dev/null +++ b/scripts/build-dev-preview.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# Build this checkout as the offline demo for the standing dev preview: base /void/rat-dev/, the pretend +# homeserver, scene tier $TIER (default full). Output: ./dist, ready for the shared publisher +# (gamecult-ops scripts/publish-mind-preview.sh dist rat-dev), which owns publishing. Publishes nothing. +set -euo pipefail +cd "$(dirname "$0")/.." +node scripts/sync-poses.mjs >/dev/null +VITE_PREVIEW_DEMO=1 CINNY_BASE=/void/rat-dev/ NODE_OPTIONS=--max_old_space_size=4096 nice -n 10 npx vite build +node scripts/preview-config.js "${TIER:-full}" --demo diff --git a/scripts/buildSha.js b/scripts/buildSha.js new file mode 100644 index 00000000..61a89445 --- /dev/null +++ b/scripts/buildSha.js @@ -0,0 +1,56 @@ +// The commit a bundle was built from, stamped into its index.html as , so a built +// folder says what it is without a build log: `grep -o 'build-sha" content="[^"]*' dist/index.html`. +// Where git governs the tree (REPO_DIR is a repository root) git decides: HEAD, suffixed -dirty when the tree has +// uncommitted changes, or `-mismatch` when an explicit BUILD_SHA names a different commit, so a stamp +// never vouches for code it does not hold; a git failure there is 'unknown'. Where git does not govern (a source +// archive), a full-sha BUILD_SHA stands, else 'unknown'. +import { execFileSync } from 'child_process'; +import { dirname, resolve } from 'path'; +import { fileURLToPath } from 'url'; + +const REPO_DIR = resolve(dirname(fileURLToPath(import.meta.url)), '..'); + +// Vite writes vite.config.js.timestamp-*.mjs next to the config while it loads it; that file is the +// build's own, not source, so an UNTRACKED one must not mark the tree dirty. A tracked file of that name, +// or any other change, still does. Filtering status lines (not a pathspec) is what keeps it untracked-only. +const VITE_TEMP = /^\?\? (?:.*\/)?vite\.config\.[a-z]+\.timestamp-\d+-[0-9a-f]+\.mjs$/; + +export const gitIn = + (cwd) => + (...args) => + execFileSync('git', args, { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }); + +const FULL_SHA = /^[0-9a-f]{40}$/; + +export const readBuildSha = (env = process.env, run = gitIn(REPO_DIR)) => { + const fromEnv = (env.BUILD_SHA ?? '').trim(); + const explicit = FULL_SHA.test(fromEnv) ? fromEnv : null; + // Git governs this tree only when REPO_DIR is its root: a source archive unpacked inside some other + // repository has no git of its own, and that repository's HEAD says nothing about it. + let governed; + try { + governed = run('rev-parse', '--show-prefix').trim() === ''; + } catch { + governed = false; + } + if (!governed) return explicit ?? 'unknown'; + // Git governs and answers: from here a failure is 'unknown', never the bare explicit sha. + try { + const head = run('rev-parse', 'HEAD').trim(); + if (!FULL_SHA.test(head)) return 'unknown'; + if (explicit && explicit !== head) return `${explicit}-mismatch`; + const dirty = run('status', '--porcelain', '-uall', '--', '.') + .split('\n') + .some((l) => l.trim() !== '' && !VITE_TEMP.test(l)); + return dirty ? `${head}-dirty` : head; + } catch { + return 'unknown'; + } +}; + +export const buildShaPlugin = (sha = readBuildSha()) => ({ + name: 'ratatoskr-build-sha', + transformIndexHtml: () => [ + { tag: 'meta', attrs: { name: 'build-sha', content: sha }, injectTo: 'head-prepend' }, + ], +}); diff --git a/scripts/buildSha.test.js b/scripts/buildSha.test.js new file mode 100644 index 00000000..4a270867 --- /dev/null +++ b/scripts/buildSha.test.js @@ -0,0 +1,170 @@ +import { execFileSync } from 'child_process'; +import { mkdtempSync, mkdirSync, rmSync, writeFileSync } from 'fs'; +import { tmpdir } from 'os'; +import { join } from 'path'; +import { afterEach, describe, expect, it } from 'vitest'; +import { buildShaPlugin, gitIn, readBuildSha } from './buildSha'; + +const SHA = 'b6b1d522f1c0a9d3e2b4c5d6e7f8091a2b3c4d5e'; +const gitAt = + (head, status = '') => + (cmd, ...args) => + cmd === 'rev-parse' ? (args[0] === '--show-prefix' ? '\n' : `${head}\n`) : status; + +describe('readBuildSha', () => { + it('reads the checkout it is built from', () => { + expect(readBuildSha({}, gitAt(SHA))).toBe(SHA); + }); + it('marks a tree with uncommitted changes, so a stamp never vouches for code it does not hold', () => { + expect(readBuildSha({}, gitAt(SHA, ' M src/x.ts\n'))).toBe(`${SHA}-dirty`); + }); + it('lets BUILD_SHA stand in where there is no git, and ignores a value that is not a full sha', () => { + const noGit = () => { + throw new Error('not a git repository'); + }; + expect(readBuildSha({ BUILD_SHA: SHA }, noGit)).toBe(SHA); + expect(readBuildSha({ BUILD_SHA: SHA }, gitAt(SHA))).toBe(SHA); + // a different HEAD is a mismatch, not a clean stamp of the explicit sha + expect(readBuildSha({ BUILD_SHA: SHA }, gitAt('c'.repeat(40)))).toBe(`${SHA}-mismatch`); + // a value that is not a lowercase full sha is ignored + ['b6b1d52', SHA.toUpperCase(), `${SHA}0`].forEach((v) => + expect(readBuildSha({ BUILD_SHA: v }, noGit)).toBe('unknown') + ); + // git that answers but cannot say what the tree holds fails closed + const brokenStatus = (cmd, ...args) => { + if (cmd === 'status') throw new Error('index file smaller than expected'); + return args[0] === '--show-prefix' ? '\n' : `${SHA}\n`; + }; + expect(readBuildSha({ BUILD_SHA: SHA }, brokenStatus)).toBe('unknown'); + expect(readBuildSha({}, brokenStatus)).toBe('unknown'); + expect(readBuildSha({}, gitAt('nope'))).toBe('unknown'); + // inside another repository's subfolder git does not govern: the explicit sha stands + const nested = (cmd, ...args) => (args[0] === '--show-prefix' ? 'vendor/ratatoskr/\n' : SHA); + expect(readBuildSha({ BUILD_SHA: SHA }, nested)).toBe(SHA); + expect(readBuildSha({}, nested)).toBe('unknown'); + expect(readBuildSha({ BUILD_SHA: 'main' }, noGit)).toBe('unknown'); + }); + it("says 'unknown' rather than failing the build when git is absent", () => { + expect( + readBuildSha({}, () => { + throw new Error('spawn git ENOENT'); + }) + ).toBe('unknown'); + }); +}); + +describe('readBuildSha against a real repository', () => { + const made = []; + afterEach(() => { + made.splice(0).forEach((d) => rmSync(d, { recursive: true, force: true })); + }); + const repo = () => { + const dir = mkdtempSync(join(tmpdir(), 'buildsha-')); + made.push(dir); + const g = (...a) => execFileSync('git', a, { cwd: dir, stdio: 'ignore' }); + g('init', '-q'); + mkdirSync(join(dir, 'src')); + writeFileSync(join(dir, 'src', 'a.ts'), 'export {};\n'); + g('add', '.'); + g('-c', 'user.name=t', '-c', 'user.email=t@t', 'commit', '-qm', 'x'); + return dir; + }; + it("stays clean with vite's temp config file present, and is dirty with a stray source file", () => { + const dir = repo(); + const run = gitIn(dir); + writeFileSync(join(dir, 'vite.config.js.timestamp-1700000000-abc123.mjs'), ''); + expect(readBuildSha({}, run)).toMatch(/^[0-9a-f]{40}$/); + writeFileSync(join(dir, 'src', 'zz-stray.ts'), ''); + expect(readBuildSha({}, run)).toMatch(/^[0-9a-f]{40}-dirty$/); + }); +}); + +describe('readBuildSha dirty rules against a real repository', () => { + const made2 = []; + afterEach(() => { + made2.splice(0).forEach((d) => rmSync(d, { recursive: true, force: true })); + }); + const TEMP = 'vite.config.js.timestamp-1700000000-abc123.mjs'; + const repo2 = (tracked = []) => { + const dir = mkdtempSync(join(tmpdir(), 'buildsha-')); + made2.push(dir); + const g = (...a) => execFileSync('git', a, { cwd: dir, stdio: 'ignore' }); + g('init', '-q'); + mkdirSync(join(dir, 'src')); + writeFileSync(join(dir, 'src', 'a.ts'), 'export {};\n'); + tracked.forEach((f) => writeFileSync(join(dir, f), 'x\n')); + g('add', '.'); + g('-c', 'user.name=t', '-c', 'user.email=t@t', 'commit', '-qm', 'x'); + return { + dir, + head: execFileSync('git', ['rev-parse', 'HEAD'], { cwd: dir, encoding: 'utf8' }).trim(), + }; + }; + it('does not let an explicit BUILD_SHA mask a dirty tree', () => { + const { dir, head } = repo2(); + const run = gitIn(dir); + expect(readBuildSha({ BUILD_SHA: head }, run)).toBe(head); + writeFileSync(join(dir, 'src', 'zz-stray.ts'), ''); + expect(readBuildSha({ BUILD_SHA: head }, run)).toBe(`${head}-dirty`); + }); + it('lets git speak only for a tree whose root it is: an archive unpacked inside another repository keeps its explicit sha', () => { + const { dir } = repo2(); + const inner = join(dir, 'vendor', 'ratatoskr'); + mkdirSync(inner, { recursive: true }); + writeFileSync(join(inner, 'x.ts'), ''); + expect(readBuildSha({ BUILD_SHA: SHA }, gitIn(inner))).toBe(SHA); + expect(readBuildSha({}, gitIn(inner))).toBe('unknown'); + }); + it("notices an untracked .mjs that is not vite's temp file", () => { + const { dir, head } = repo2(); + writeFileSync(join(dir, 'foo.mjs'), ''); + expect(readBuildSha({}, gitIn(dir))).toBe(`${head}-dirty`); + rmSync(join(dir, 'foo.mjs')); + // only vite's exact shape is its own: vite.config..timestamp--.mjs + [ + 'vite.config.js.timestamp-1-ab.mjs.bak', + 'vite.config.js.timestamp-x-ab.mjs', + 'vite.config.js.timestamp-1-zz.mjs', + 'vite.config.a.b.timestamp-1-ab.mjs', + 'vite.config.js.timestamp-1-ab-c.mjs', + ].forEach((name) => { + writeFileSync(join(dir, name), ''); + expect(readBuildSha({}, gitIn(dir)), name).toBe(`${head}-dirty`); + rmSync(join(dir, name)); + }); + expect(readBuildSha({}, gitIn(dir))).toBe(head); + }); + it('treats a stray source file as dirty even beside the vite temp file, in the root or a subfolder', () => { + const { dir, head } = repo2(); + const run = gitIn(dir); + writeFileSync(join(dir, TEMP), ''); + writeFileSync(join(dir, 'src', TEMP), ''); + expect(readBuildSha({}, run)).toBe(head); + writeFileSync(join(dir, 'src', 'zz-stray.ts'), ''); + expect(readBuildSha({}, run)).toBe(`${head}-dirty`); + }); + it('marks a tracked file of the temp name dirty once it changes', () => { + const { dir, head } = repo2([TEMP]); + const run = gitIn(dir); + expect(readBuildSha({}, run)).toBe(head); + writeFileSync(join(dir, TEMP), 'changed\n'); + expect(readBuildSha({}, run)).toBe(`${head}-dirty`); + }); + it('marks an untracked file in a new folder dirty (status lists files, not the folder)', () => { + const { dir, head } = repo2(); + mkdirSync(join(dir, 'new')); + writeFileSync(join(dir, 'new', TEMP), ''); + expect(readBuildSha({}, gitIn(dir))).toBe(head); + writeFileSync(join(dir, 'new', 'b.ts'), ''); + expect(readBuildSha({}, gitIn(dir))).toBe(`${head}-dirty`); + }); +}); + +describe('buildShaPlugin', () => { + it("hands vite a meta tag for the page's head carrying the sha", () => { + const plugin = buildShaPlugin(SHA); + expect(plugin.transformIndexHtml()).toEqual([ + { tag: 'meta', attrs: { name: 'build-sha', content: SHA }, injectTo: 'head-prepend' }, + ]); + }); +}); diff --git a/scripts/make-pose-thumbs.mjs b/scripts/make-pose-thumbs.mjs index f78fc19e..b7acc050 100644 --- a/scripts/make-pose-thumbs.mjs +++ b/scripts/make-pose-thumbs.mjs @@ -1,5 +1,6 @@ // Regenerates preview-demo/poses from the cast-art poses: PNG thumbnails sized for the -// portrait's displayed width x a phone's device pixel ratio (not for the 124px desktop box). +// portrait's displayed width x device pixel ratio: the bubble portrait is 190 CSS px on desktop and +// min(38vw, 160px) on a phone (layout.css.ts), the desk booth 168 / 88 px (DeskView.css.ts). // Dependency-free: decodes 8-bit RGBA PNGs, area-averages in premultiplied alpha, writes a // 256-colour palette PNG with a tRNS alpha table. Usage: node scripts/make-pose-thumbs.mjs [src] import { readFileSync, writeFileSync, mkdirSync } from 'node:fs'; @@ -7,7 +8,7 @@ import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; import { inflateSync, deflateSync, crc32 } from 'node:zlib'; -const WIDTH = 480; // phone portrait: min(50vw, 210px) x DPR 2.5; art is never upscaled +const WIDTH = 480; // about the 190px desktop portrait x DPR 2.5; art is never upscaled const src = process.argv[2] ?? '/opt/commons/cast-art/poses'; const root = join(dirname(fileURLToPath(import.meta.url)), '..'); const outDir = join(root, 'preview-demo/poses'); diff --git a/scripts/preview-config.js b/scripts/preview-config.js index dbd50049..29bfa793 100644 --- a/scripts/preview-config.js +++ b/scripts/preview-config.js @@ -1,5 +1,6 @@ // Preview builds: set the background scene tier in dist/config.json (default 'low'); config.json -// in the repo stays 'off'. Previews are static directories with no SPA fallback, so they also switch +// in the repo is the live chat.gamecult.org config (style ridge), and previews pin the style too, ridge unless +// given. Previews are static directories with no SPA fallback, so they also switch // to the hash router: a reload on /login/matrix.org would otherwise be an nginx 404. With --demo it // also switches on the pretend homeserver (src/preview-demo): previewDemo true, and the pretend // server as the only homeserver. Usage: @@ -10,11 +11,11 @@ import { fileURLToPath } from 'url'; const args = process.argv.slice(2); const demo = args.includes('--demo'); -const [tier = 'low', style] = args.filter((a) => !a.startsWith('--')); +const [tier = 'low', style = 'ridge'] = args.filter((a) => !a.startsWith('--')); const file = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'dist', 'config.json'); const config = JSON.parse(fs.readFileSync(file, 'utf8')); config.hashRouter = { enabled: true, basename: '/' }; -config.backgroundScene = { ...config.backgroundScene, tier, ...(style ? { style } : {}) }; +config.backgroundScene = { ...config.backgroundScene, tier, style }; if (demo) { config.previewDemo = true; config.defaultHomeserver = 0; @@ -29,5 +30,5 @@ if (demo) { } fs.writeFileSync(file, `${JSON.stringify(config, null, 2)}\n`); console.log( - `${file}: backgroundScene.tier = ${tier}${style ? `, style = ${style}` : ''}${demo ? ', previewDemo on' : ''}` + `${file}: backgroundScene.tier = ${tier}, style = ${style}${demo ? ', previewDemo on' : ''}` ); diff --git a/scripts/ridge-bake/.gitignore b/scripts/ridge-bake/.gitignore new file mode 100644 index 00000000..c18dd8d8 --- /dev/null +++ b/scripts/ridge-bake/.gitignore @@ -0,0 +1 @@ +__pycache__/ diff --git a/scripts/ridge-bake/README.md b/scripts/ridge-bake/README.md new file mode 100644 index 00000000..1df5fb94 --- /dev/null +++ b/scripts/ridge-bake/README.md @@ -0,0 +1,58 @@ +# ridge-bake + +Offline baker for the ridge backdrop: it turns a Copernicus DEM into K+1 G-buffer cards per place, split by K authored seams and cut into 32 azimuth tiles round the whole 360 degree ring, plus a `manifest.json` (schema 3) and an `index.json` that the runtime reads. Each card tile is a colour WebP (albedo and coverage) and a geometry WebP (normal and log-distance). The baker is not shipped; `public/ridge/` holds its output. The client owns lighting, haze and ink: no sun, haze or shadow is baked. + +## Run + +```sh +python3 -I scripts/ridge-bake/export.py --tiles DIR --out public/ridge/ [--work DIR] [--sheet contact.png] +``` + +Needs Python 3 with `numpy`, `tifffile` and `imagecodecs`. `--tiles` is a directory of Copernicus GLO-30 tiles (never committed); `--work` caches the mosaic and rays (default `$TMPDIR/ridge-bake-work`); `--sheet` writes the contact sheet at 1/4 of the ring's width (the ring composite, every card's strip alone and the depth image with every seam, the 32 tile boundaries drawn, lit by one fixed light). The bake prints `r_max_m`, the resident run and the worst fit error per card. `python3 -I scripts/ridge-bake/export.py --write-schema` rewrites `ridge-bake.schema.json`, which the tests pin. + +Tests: `RIDGE_PY= RIDGE_TILES=DIR scripts/ridge-bake/tests/run.sh [test_ridge.py|mutate.py]` (`mutate.py` re-introduces each rule's failure into a copy of the baker and fails if a test does not notice). + +## Tiles per preset (`places.json`) + +Files are `Copernicus_DSM_COG_10_dd_00_ddd_00_DEM.tif`; the list below is `ddddd`. + +| place id | tiles | +|---|---| +| vienna | N47E015 N47E016 N47E017 N48E015 N48E016 N48E017 N49E015 N49E016 | +| matterhorn | N45E007 N45E008 N46E007 N46E008 | +| fuji | N34E138 N34E139 N35E137 N35E138 N35E139 | +| halfdome | N37W121 N37W120 N38W120 | +| grandcanyon | N35W113 N35W112 N36W113 N36W112 | +| amadablam | N27E086 N27E087 N28E086 N28E087 | +| trecime | N46E011 N46E012 | + +## Where the bakes ran + +Yggdrasil (16 cores, 62 GB), as `mind-void-self`, work under `/var/tmp/ridge-bake` (never `/tmp`, a 31 GB tmpfs): `venv/` (python 3.13 with `numpy`, `tifffile`, `imagecodecs` from PyPI), `tiles/`, `work//`, one `out//` per place until its look is accepted. Tiles come from the public Copernicus DEM GLO-30 AWS Open Data bucket: `https://copernicus-dem-30m.s3.amazonaws.com//.tif` with `` = `Copernicus_DSM_COG_10_dd_00_ddd_00_DEM` (17 tiles, 598 MB). + +The authored splits sit in depth gaps found by scanning candidate lists (seam medians printed per list): `seams` flees a split that falls inside a continuous mass of visible terrain to the nearest gap, so a split inside the mass yields an empty card 0 (Matterhorn's visible terrain is one mass from 4.9 to 15 km; gaps at 19, 28 and 43 km). Place splits at the gap medians the scan reports. + +## Cards + +`places.json` gives each preset `card_split_km`, an ordered list of 1 to 5 seam depths in km, and optionally `prefilter_m`. A preset without `card_split_km` is refused, and so is a split that leaves a card empty (the message names the splits); K splits make K+1 cards, at most `MAX_CARDS` = 6 per place. New places get a seam probe look before their first bake. + +1. **March.** `stage0` marches 6400 azimuth columns of rays over the DEM with Earth curvature and refraction (`ridge.elev`), cached by a key of its inputs. +2. **Low-pass.** `prefilter` blurs the sampled heights with a Gaussian of `prefilter_m` metres along each ray and across rays at equal distance (sigma = `prefilter_m` / (distance x column width) columns), then recomputes the angles. Roofs go, hills stay. +3. **View.** `set_view` maps angle to row linearly: the highest skyline angle of the whole ring sits at 4% of the frame height, the lowest at 66%, and the horizon keeps `GROUND_ROWS_MIN` = 150 rows under it (the runtime's `groundRowsNeeded`: (1 - 0.85) x 600 / 0.6, so the plane reaches the bottom of every viewport at rest). The scale is the lesser of the two fits, clamped to 0.5x to 10x vertical exaggeration (rulings `ridge-ring-vertical-anchors`, `ridge-ground-rows-below-horizon`: every azimuth sits inside one frame; a place whose whole-ring relief leaves too few ground rows is flattened below 1x); a skyline that cannot hold the rows even at 0.5x is refused naming `sky_deg` and the floor. `export.validate_manifest` refuses a plane with fewer than 150 rows under the horizon and `manifest.ts` refuses it at load. +4. **Seams.** `coverage` counts the visible rows of the opaque view per log-distance bin and column. `seams` finds one seam per authored split per column by dynamic programming (seam carving, forward energy): it sits in a gap between depths, moving it costs 2 per bin plus the visible rows it sweeps (so it never hops across a ridge between two columns and splits it side by side), a seam inside visible terrain is cheap to cross-fade, the authored depth only breaks ties. Seam k stays 0.4 nat beyond seam k-1. The DP runs over the ring three times side by side and keeps the middle lap, so a seam is continuous across the wrap (column 6399 to 0) and a tile boundary is only a crop. +5. **Cards.** `cards` runs per tile, on that tile's columns and the matching normals (it is column-independent: a tile is a crop of per-column results, so no seam appears at a tile boundary). It makes card i from the first visible hit at or beyond seam i-1 (layered depth: a farther card keeps the terrain a nearer ridge hides), alpha 1 minus a smoothstep over seam i in log-distance (the cross-fade), crest rows with fractional coverage, distance and normal interpolated between samples by angle, albedo from a small height and slope material, cropped to the rows where alpha is not zero. The rows of card i > 0 below the angle of its first sample (hit and first sample of the card) are its **wall**: the extruded face of the ridge the card starts at, which keeps that sample's distance, wears the ground material at its height with the face up, and is flagged `wall`. Card 0 also draws the **near march** (ruling `ridge-near-ground-outline`): the place's own DEM from `NEAR_START_M` = 1 m to the near clip `NEAR_CLIP_M` = 500 m (`near_march`: float64 bilinear samples every max(1 m, 0.02 d) up to 10 m, about 170 per column, low-passed with the place's own `prefilter_m`), joined to the far march by `join_near` on the whole ring before the tile cut, its angles capped per column at the angle of the clip sample so the near ground draws inside the silhouette of the terrain at the clip (a near hill above that edge is cut along it). Its rows are ordinary terrain with their own normal and the albedo of their own height and n_up, flagged `near` in memory; `cards` refuses a march that starts at the clip. The runtime reads them as ground at the clip distance (they decode at `log_d_min`) and lights them like any card pixel. The alpha-over composite of the cards equals the opaque view; `check_cover` refuses a tile that differs by more than 0.02. +6. **Tiles.** The ring is absolute compass, column 0 = north, column c at azimuth (c + 0.5) / 6400 x 360; `places.json`'s `az_deg` / `look_at` is only the rest azimuth (`view.look_az_deg`). Tile t owns columns [200 t, 200 t + 200) (11.25 degrees) and its files hold [200 t - 2, 200 t + 202): two columns of real neighbour data each side (the client's ink pass and lighting read one texel each way; the client crops it), taken periodically by `ridge.ring_cols`. Per card and tile the file is cropped to the rows where that tile's 8-bit alpha is not zero (`top`, `h`); a card that holds nothing in a tile is `null` there (the client interpolates its distance from the neighbours); a card with no solid pixel in any tile is refused. +7. **Distance and the offset range.** The bake holds no camera (ruling `ridge-camera-full-ring`). `pack` gives each card tile `distance_m` = exp(median ln d) over the tile's solid pixels that are neither wall nor near ground (its interior 200 columns); the client derives each card's slide from that and the viewer's offset r and heading. `camera.r_max_m` is the largest |r| (never above half the nearest terrain's distance) at which, for every tile, card and phi (24 steps of the camera's angle on the circle against its heading; the offset-only rotation mode moves phi round the whole circle), the least-squares line `a + s beta` fitted to the exact view angle `atan2(R sin beta - r sin phi, R cos beta - r cos phi)` over the widest viewport (`HFOV_MAX_DEG` = 72 / 1.1) errs by at most `FIT_PX_MAX` = 24 card px (the continuous error: the line by quadrature over the viewport, the worst error looked for on 513 points, so a handful of samples cannot undercount it); the distance d is that of the NEAREST solid (alpha >= 0.5, neither wall nor near ground) pixel the card draws in the tile's interior columns, which is where the slide errs most (the line is fitted for the tile's `distance_m`, the median, but the bound is held for the nearest terrain: a tile whose terrain spans 600 to 2000 m is bound at 600 m); each tile's near pixels (under the clip) count as terrain at the clip, 500 m, alongside its solid pixels, whatever else the tile holds (they are drawn at the clip; a tile of near ground only is slid there too), so a tile with any near pixel binds at 500 m at the latest; and the resident gate (below) must hold at r_max_m too. `camera.r_max_forward_m` is the same search at phi = 0 alone (same `FIT_PX_MAX`, the same half-distance cap, the same resident gate): the camera pushed forward along its heading, which is where the offset stays when the view direction turns with it (the modes 'still' and 'both'), so it is at least `r_max_m`; the client takes `r_max_m` for the offset-only mode and for a backward offset, `r_max_forward_m` for a forward one in the other modes (`view.ts` `offsetRange`). `FIT_PX_MAX` is provisional, tuned by eye (ruling `ridge-offset-range-fit`). A bake whose `r_max_m` is below `R_MAX_FLOOR_M` = 25 m is refused, naming the card and tile. `distance_m` and the nearest-terrain table exclude the near ground (a tile with nothing outside it gets `distance_m` = 500 m), so card 0's distances are never nearer than the near clip (`write_bake` refuses one that is), and `r_max_m` and `r_max_forward_m` hold for the nearest solid terrain each card draws in each tile, at or beyond 500 m, a tile with near pixels counts them at 500 m: the ground nearer than that rides card 0's slide and is not measured beyond that. +8. **Normals.** `normals` takes the along-ray slope and the across-ray slope at equal distance (neighbouring columns, same sample), both times the vertical exaggeration. + +Files per card `i` and tile `t`: `card--t-colour.webp` (lossy RGB albedo, lossless straight alpha) and `card--t-geometry.webp` (lossless: R, G = (n + 1) / 2 for the normal's along and across components, B = log-distance normalised between `encoding.log_d_min` and `log_d_max`; wall pixels write R = G = 255, a code outside the unit disc that no real normal reaches), each 204 columns wide. The manifest lists the cards nearest first (`near_m`, `far_m`: the median seam depths over the ring) and `tiles[t][i]` = `{ top, h, distance_m, colour, geometry }` or `null`; the runtime paints the cards last to first. The `bake_id` is the sha256 of the files, tile-major, then card, colour then geometry. + +Budgets (`check_budget`; a cap is never raised to fit a bake, the lever is `TILES` = 64): every file of one tile at most 235 kB (1.5 MB per 72 degrees), every file of the place at most 7.5 MB, at most 6 cards, and the lit canvases (4 bytes x 202 columns x band rows, per card) of the worst run of N consecutive tiles, cyclic, at most 20 MB, where N = ceil(arc_max / 11.25) + 5 and arc_max = `HFOV_MAX_DEG` / s_min + 2 (r_max / Rmin) 57.3 degrees with Rmin the nearest card's smallest tile distance and s_min = Rmin / (Rmin + r_max). The loader decodes one tile at a time, so the decode transient is not gated. + +## Licence + +Elevation: Copernicus DEM GLO-30. The credit line is written into every manifest (`attribution`) and must be shown with any rendering: + +> Contains modified Copernicus data: DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved. + +Licence: free, full and open access, with the credit line shown (https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model). diff --git a/scripts/ridge-bake/export.py b/scripts/ridge-bake/export.py new file mode 100644 index 00000000..5e72ae01 --- /dev/null +++ b/scripts/ridge-bake/export.py @@ -0,0 +1,314 @@ +"""Ridge backdrop export: bake a place with ridge.py and write its K+1 G-buffer cards as 32 azimuth tiles each (colour + geometry WebP per card per tile), a manifest v3 and the index. + + python3 -I scripts/ridge-bake/export.py --tiles DIR --out public/ridge/ [--work DIR] [--sheet contact.png] + python3 -I scripts/ridge-bake/export.py --write-schema (rewrites ridge-bake.schema.json from SCHEMA below) + +The runtime reads manifest.json (SCHEMA is its contract) and nothing else about the bake. The ring is the whole 360 degrees (ruling ridge-camera-full-ring), absolute compass, column 0 = north, cut into TILES tiles of TILE_W columns plus an APRON of real neighbour +columns each side; the bake holds no camera: it ships each card tile's distance_m and camera.r_max_m, the largest offset the per-card linear slide can take (ruling ridge-offset-range-fit); the client lights the cards itself (ruling ridge-cards-runtime-lit). +The pure parts (budget, bake_id, index, schema check) import no baker; bake_place imports ridge, which needs RIDGE_TILES and RIDGE_WORK (main sets them from --tiles / --work), and so do pack, validate_manifest and write_bake, which read ridge's NEAR_CLIP_M and GROUND_ROWS_MIN.""" +import os, sys, json, math, shutil, hashlib, argparse, tempfile +from pathlib import Path +from zoneinfo import ZoneInfo, ZoneInfoNotFoundError +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +from refusal import Refusal +import numpy as np, imagecodecs + +BAKER_VERSION = 7 +RING_W = 6400 # the ring's columns (ridge.W, asserted in bake_place): column c is at azimuth (c + 0.5) / RING_W x 360, column 0 = north +TILES = 32 # azimuth tiles of the ring, each card cut into TILES files per kind (ruling ridge-camera-full-ring: the client loads the arc near its heading) +TILE_W = RING_W // TILES # 200 columns = 11.25 degrees owned by a tile +APRON = 2 # real neighbour columns each side in a tile's file: the client's ink pass and lighting read +-1 texel; the client crops it +LIT_W = TILE_W + 2 # a lit canvas keeps one apron texel each side +TILE_DEG = 360.0 / TILES +MAX_CARDS = 6 # per place; a card is cropped to its row band in every tile, which is what lets a livelier place have more +TILE_BYTES_MAX = 235_000 # every file of one tile (1.5 MB per 72 degrees, scaled to 11.25) +PLACE_BYTES_MAX = 7_500_000 # every file of the place +RESIDENT_BYTES_MAX = 20_000_000 # the lit canvases (4 B x LIT_W x band h per card) of the worst run of consecutive tiles, cyclic; the loader decodes one tile at a time, so the decode transient is not gated +HFOV_MAX_DEG = 72 / 1.1 # the widest viewport: a 16:9 viewport with 1.1 widths of plane (view.ts windowFor) +FIT_PX_MAX = 24.0 # the per-card linear slide may err by this many card pixels over the viewport (provisional, tuned by eye: ruling ridge-offset-range-fit) +R_MAX_FLOOR_M = 25.0 # a bake whose cards cannot take this offset is refused +PHI_STEPS = 24 # the camera's angle on its circle against its heading, sampled by the r_max search +COVER_TOL = 0.02 # the composite of a tile's cards may differ from the opaque view by this much of a pixel, nowhere more +WEBP_QUALITY = 80 +SHEET_SKY = (0.80, 0.86, 0.94) # the flat sky of the contact sheet +SHEET_LIGHT = (-0.35, 0.55, 0.76) # the fixed light of the contact sheet in (along ray, across ray, up); the sheet is a look at the cards, the client lights the real thing +ATTRIBUTION = dict( + credit_line='Contains modified Copernicus data: DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.', + licence='Copernicus DEM licence: free, full and open access, with the credit line shown', + dem_source='Copernicus DEM GLO-30 (30 m)', + url='https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model') + +# ------------------------------------------------------------------------------------ schema (the one dict the schema file and the validator both come from) +_num, _int, _str = {'type': 'number'}, {'type': 'integer'}, {'type': 'string'} +_numnull = {'type': ['number', 'null']} +_tz = {'type': 'string', 'format': 'iana-tz'} # an IANA zone the system knows, as ridge.load_preset requires; validate() checks it +def _obj(**props): return {'type': 'object', 'required': list(props), 'additionalProperties': False, 'properties': props} +def _objnull(**props): return dict(_obj(**props), type=['object', 'null']) +_file = _obj(file=_str, bytes=_int) +SCHEMA = {'$schema': 'https://json-schema.org/draft/2020-12/schema', 'title': 'ridge-bake manifest v3 and index v1', '$defs': { + 'manifest': _obj(schema={'const': 3}, baker_version=_int, bake_id=_str, + place=_obj(id=_str, name=_str, lat=_num, lon=_num, altitude_km=_num, eye_m=_num, tz=_tz), + view=_obj(look_az_deg=_num, ring_w={'const': RING_W}, tile_w={'const': TILE_W}, tiles={'const': TILES}, apron={'const': APRON}, plane_h=_int, px_per_deg_h=_num, px_per_deg_v=_num, exaggeration=_num, horizon_row=_num, sky_row=_num, near_row=_num), + curvature=_obj(r_earth_m=_num, k_ref=_num), + encoding=_obj(log_d_min=_num, log_d_max=_num, normal={'const': 'rt8'}), + camera=dict(_obj(r_max_m=_num, r_max_forward_m=_num), description="r_max_m (every camera angle on its circle) and r_max_forward_m (the camera on its heading) are the offsets up to which the linear slide holds (the fit error at most FIT_PX_MAX card px) for the NEAREST solid terrain (at or beyond the near clip, ridge.NEAR_CLIP_M, 500 m) that each card draws in each tile, not for the tile's median distance_m; a tile whose card 0 draws only near ground (under the clip) is slid at the clip distance (its distance_m) and binds at 500 m. The ground under the clip is drawn by card 0 from the near march and is otherwise not measured."), + cards={'type': 'array', 'minItems': 1, 'maxItems': MAX_CARDS, 'items': _obj(near_m=_numnull, far_m=_numnull), + 'description': "nearest first; the runtime paints the list last to first. near_m and far_m are the median seam depths over the ring, null at the ends."}, + tiles={'type': 'array', 'minItems': TILES, 'maxItems': TILES, 'items': {'type': 'array', 'minItems': 1, 'maxItems': MAX_CARDS, 'items': _objnull(top=_int, h=_int, distance_m=_num, colour=_file, geometry=_file)}, + 'description': "tiles[t][i] is card i in tile t, or null where the card holds nothing in that tile (the client takes its distance from the neighbouring tiles). Tile t owns the ring columns [tile_w t, tile_w (t + 1)), column c at azimuth (c + 0.5) / ring_w x 360, 0 = north; its files hold [tile_w t - apron, tile_w (t + 1) + apron), wrapping at the ring's end, and are tile_w + 2 apron columns wide. top and h place the card's band back at its rows of the frame; distance_m = exp(median ln d) of the card's solid pixels in the tile that are neither wall nor near ground, under the near clip (the interior tile_w columns); a tile whose card draws only near ground gets the clip distance."}, + bytes=_int, + attribution=_obj(credit_line=_str, licence=_str, dem_source=_str, url=_str)), + 'index': _obj(schema={'const': 1}, default=_str, places={'type': 'object', 'additionalProperties': _str})}} +def tile_file(i, t, kind): return f'card-{i}-t{t:02d}-{kind}.webp' + +def validate(x, s, path='$'): + """The subset of JSON Schema SCHEMA uses; raises Refusal naming the path.""" + if '$ref' in s: return validate(x, SCHEMA['$defs'][s['$ref'].split('/')[-1]], path) + tys = s.get('type'); tys = [tys] if isinstance(tys, str) else tys; py = {'object': dict, 'array': list, 'string': str, 'number': (int, float), 'integer': int, 'null': type(None)} + if tys and not any(isinstance(x, py[t]) and not (isinstance(x, bool) and t != 'null') for t in tys): raise Refusal(f'{path}: not a {"/".join(tys)}') + if s.get('format') == 'iana-tz': + try: ZoneInfo(x) + except (ZoneInfoNotFoundError, ValueError, OSError): raise Refusal(f'{path}: {x!r} is not a time zone the system knows') + if 'const' in s and x != s['const']: raise Refusal(f"{path}: must be {s['const']!r}") + if 'enum' in s and x not in s['enum']: raise Refusal(f'{path}: not one of {s["enum"]}') + if 'maximum' in s and x > s['maximum']: raise Refusal(f'{path}: above {s["maximum"]}') + if isinstance(x, list): + if not s.get('minItems', 0) <= len(x) <= s.get('maxItems', 1 << 30): raise Refusal(f'{path}: wrong length') + for i, v in enumerate(x): validate(v, s['items'], f'{path}[{i}]') + if isinstance(x, dict): + props = s.get('properties', {}); extra = s.get('additionalProperties', True) + for k in s.get('required', []): + if k not in x: raise Refusal(f'{path}: missing {k}') + for k, v in x.items(): + if k in props: validate(v, props[k], f'{path}.{k}') + elif extra is False: raise Refusal(f'{path}: extra key {k}') + elif isinstance(extra, dict): validate(v, extra, f'{path}.{k}') + +def validate_manifest(m): + """The schema plus what it cannot say: the plane keeps ridge.GROUND_ROWS_MIN rows under the horizon, every tile lists one entry per card, every card holds something in some tile, each file is named for its card and tile, bytes is the sum of the files.""" + import ridge + validate(m, SCHEMA['$defs']['manifest']); k = len(m['cards']); v = m['view'] + if v['plane_h'] - v['horizon_row'] < ridge.GROUND_ROWS_MIN - 1e-6: raise Refusal(f"$.view: {v['plane_h'] - v['horizon_row']:.1f} rows under the horizon, below the {ridge.GROUND_ROWS_MIN} the runtime needs (ridge.GROUND_ROWS_MIN)") + for t, row in enumerate(m['tiles']): + if len(row) != k: raise Refusal(f'$.tiles[{t}]: {len(row)} entries for {k} cards') + for i, e in enumerate(row): + for kind in (('colour', 'geometry') if e else ()): + if e[kind]['file'] != tile_file(i, t, kind): raise Refusal(f'$.tiles[{t}][{i}].{kind}: file {e[kind]["file"]!r} is not {tile_file(i, t, kind)!r}') + for i in range(k): + if all(row[i] is None for row in m['tiles']): raise Refusal(f'card {i} is null in every tile') + if m['bytes'] != sum(e[kind]['bytes'] for row in m['tiles'] for e in row if e for kind in ('colour', 'geometry')): raise Refusal('bytes is not the sum of the files') + +# ------------------------------------------------------------------------------------ cards -> bytes +def u8(a): return np.clip(np.rint(np.asarray(a) * 255.0), 0, 255).astype(np.uint8) +def encode_colour(albedo, alpha): + """Lossy RGB albedo with lossless alpha coverage, straight (not premultiplied); the colour under a zero alpha is zeroed.""" + a = u8(alpha); rgb = u8(albedo) * (a[..., None] > 0); return bytes(imagecodecs.webp_encode(np.dstack([rgb, a]), level=WEBP_QUALITY, lossless=False)) +def encode_geometry(n_r, n_t, logd, enc, wall=None): + """Lossless, opaque RGB: R, G = (n_r + 1) / 2, (n_t + 1) / 2 ('rt8'), B = the log-distance normalised between enc log_d_min and log_d_max (a log-distance under log_d_min, the near ground under the clip, encodes as 0: the clip distance). Wall pixels (the extruded face under a ridge; wall (h, w) bool) write R = G = 255: a code outside the unit disc + that no real normal reaches (real r2 + t2 peaks at 0.998), which the runtime reads as 'normal up, no crease'.""" + b = (np.asarray(logd) - enc['log_d_min']) / (enc['log_d_max'] - enc['log_d_min']); r, t = u8((np.asarray(n_r) + 1) / 2), u8((np.asarray(n_t) + 1) / 2) + if wall is not None: m = np.asarray(wall, bool); r, t = np.where(m, 255, r).astype(np.uint8), np.where(m, 255, t).astype(np.uint8) + return bytes(imagecodecs.webp_encode(np.dstack([r, t, u8(b)]), lossless=True)) +def decode(b): + """A WebP's bytes as RGBA uint8; the codec returns RGB for an image that is opaque everywhere, which is solid.""" + a = imagecodecs.webp_decode(b) + return a if a.shape[-1] == 4 else np.concatenate([a, np.full(a.shape[:2] + (1,), 255, np.uint8)], -1) + +def composite_alpha(cards, h, w): + """Coverage of the alpha-over of all cards, each (top, rgba uint8 or float alpha (rows, w)) placed at its rows of an h x w frame.""" + clear = np.ones((h, w)) + for top, al in cards: clear[top:top + al.shape[0]] *= 1 - np.asarray(al, np.float64) + return 1 - clear +def check_cover(cards, opaque, tol=COVER_TOL): + """Refuse a bake whose cards, alpha-over, differ from the opaque view's coverage by more than tol anywhere: a hole shows the sky through terrain, an excess is a ghost. cards: [(top, alpha 0..1 (rows, w))], opaque (h, w).""" + err = np.abs(composite_alpha(cards, *opaque.shape) - opaque); bad = err > tol + if bad.any(): y, x = np.unravel_index(int(np.argmax(err)), err.shape); raise Refusal(f'the cards do not composite to the opaque view within {tol}: {int(bad.sum())} pixels differ, worst {err.max():.3f} at x={x} row {y}') + +def run_tiles(r_max_m, rmin_m): + """N, the consecutive tiles the loader keeps resident: the viewport arc at the smallest slide rate plus the offset's own swing (arc_max = HFOV_MAX_DEG / s_min + 2 (r_max / Rmin) 57.3 degrees, s_min = Rmin / (Rmin + r_max)), one straddled tile and two tiles of margin each side.""" + s_min = rmin_m / (rmin_m + r_max_m); arc = HFOV_MAX_DEG / s_min + 2 * (r_max_m / rmin_m) * 57.3 + return min(TILES, math.ceil(arc / TILE_DEG) + 1 + 4) +def resident_bytes(bands, n): + """The lit canvases (4 bytes x LIT_W x band rows, per card) of the worst run of n consecutive tiles of the ring, wrapping. bands[t]: the row counts of the cards that tile holds.""" + per = [sum(4 * LIT_W * h for h in b) for b in bands]; n = min(n, TILES) + return max(sum(per[(t + k) % TILES] for k in range(n)) for t in range(TILES)) +def check_budget(n_cards, tile_bytes, bands, r_max_m, rmin_m): + """Refuse a bake the runtime could not hold: more than MAX_CARDS cards, a tile whose files together are above TILE_BYTES_MAX, every file of the place above PLACE_BYTES_MAX, or the worst run of run_tiles(r_max_m, rmin_m) consecutive tiles lit above RESIDENT_BYTES_MAX.""" + if n_cards > MAX_CARDS: raise Refusal(f'{n_cards} cards, above {MAX_CARDS}') + for t, b in enumerate(tile_bytes): + if b > TILE_BYTES_MAX: raise Refusal(f'tile {t} is {b} bytes, above {TILE_BYTES_MAX}') + if sum(tile_bytes) > PLACE_BYTES_MAX: raise Refusal(f'the place is {sum(tile_bytes)} bytes, above {PLACE_BYTES_MAX}') + n = run_tiles(r_max_m, rmin_m); res = resident_bytes(bands, n) + if res > RESIDENT_BYTES_MAX: raise Refusal(f'{n} consecutive tiles light to {res} bytes, above {RESIDENT_BYTES_MAX}') + +FIT_QUAD = 48 # Gauss-Legendre nodes for the least-squares line (exact for the smooth alpha(beta) to far below a card pixel) +FIT_GRID = 513 # points the worst error is looked for on, ends included: the error is smooth between them, so the maximum found is within 0.01 card px of the continuous one +def fit_px(d, r, px_per_deg, phis=None): + """The worst error, in card pixels, of a card tile's linear slide at offset r (m): over the camera's angle phi on its circle against its heading (`phis` steps, PHI_STEPS by default; 1 is phi = 0 alone, the camera pushed forward along its heading) and the viewport (beta in +-HFOV_MAX_DEG / 2), the exact view angle of a cylinder point at the tile's + distance d, alpha = atan2(d sin beta - r sin phi, d cos beta - r cos phi), against the continuous least-squares line a + s beta over the viewport (ruling ridge-offset-range-fit; the line by quadrature, the error on FIT_GRID points: it is the continuous worst error, not the error of a few samples).""" + half = math.radians(HFOV_MAX_DEG) / 2; p = np.linspace(0, 2 * math.pi, PHI_STEPS if phis is None else phis, endpoint=False)[:, None] + alpha = lambda b: np.arctan2(d * np.sin(b) - r * np.sin(p), d * np.cos(b) - r * np.cos(p)); x, w = np.polynomial.legendre.leggauss(FIT_QUAD); bq = half * x[None, :]; A = alpha(bq) + a0 = (A * w).sum(-1, keepdims=True) / 2; s = (A * bq * w).sum(-1, keepdims=True) / (bq * bq * w).sum(); b = np.linspace(-half, half, FIT_GRID)[None, :] + return math.degrees(float(np.abs(alpha(b) - (a0 + s * b)).max())) * px_per_deg +def fit_table(dist, r, px_per_deg, phis=None): + """(tiles, cards) fit_px of every card tile at offset r; nan where the card is null in that tile.""" + return np.array([[np.nan if d is None else fit_px(d, r, px_per_deg, phis) for d in row] for row in dist]) +def solve_r_max(dist, bands, px_per_deg, phis=None): + """dist: [tiles][cards] the distance of the NEAREST solid terrain each card draws in each tile (None where it draws none): the line of a tile is fitted for one distance but its terrain spans many, and the nearest is where the slide errs most (ruling ridge-offset-range-fit, up to where the linear map holds). + The largest offset r (m, down to 0.1 m) at which every card tile fits within FIT_PX_MAX over `phis` camera angles (PHI_STEPS: the whole circle, the offset-only rotation mode; 1: phi = 0 alone, the modes where the offset turns with the view) and the resident gate holds: never above half the nearest card's smallest tile distance. Scans r upward from 0 on 128 steps to the first failure, then bisects that step. + Refuses (naming the card and tile that bind) a bake whose r_max_m is below R_MAX_FLOOR_M.""" + near = min((row[0], t) for t, row in enumerate(dist) if row[0] is not None); rmin = near[0]; cap = 0.5 * rmin + ok = lambda r: bool(np.nanmax(fit_table(dist, r, px_per_deg, phis)) <= FIT_PX_MAX) and resident_bytes(bands, run_tiles(r, rmin)) <= RESIDENT_BYTES_MAX + lo, hi = 0.0, None + for r in np.linspace(0, cap, 129)[1:]: + if ok(r): lo = float(r) + else: hi = float(r); break + if hi is None: lo = cap + else: + for _ in range(24): + mid = 0.5 * (lo + hi) + if ok(mid): lo = mid + else: hi = mid + r_max = math.floor(lo * 10) / 10 + if r_max < R_MAX_FLOOR_M: + if cap < R_MAX_FLOOR_M: raise Refusal(f'r_max_m {r_max:g} is below {R_MAX_FLOOR_M:g} m: card 0 stands {rmin:.0f} m away in tile {near[1]} and the offset stays under half of that') + tb = fit_table(dist, R_MAX_FLOOR_M, px_per_deg, phis); t, i = np.unravel_index(int(np.nanargmax(tb)), tb.shape) + if tb[t, i] > FIT_PX_MAX: raise Refusal(f'r_max_m {r_max:g} is below {R_MAX_FLOOR_M:g} m: card {i} in tile {t} errs {tb[t, i]:.1f} card px at {R_MAX_FLOOR_M:g} m (the bound is {FIT_PX_MAX:g})') + n = run_tiles(R_MAX_FLOOR_M, rmin); raise Refusal(f'r_max_m {r_max:g} is below {R_MAX_FLOOR_M:g} m: at {R_MAX_FLOOR_M:g} m, {n} consecutive tiles light to {resident_bytes(bands, n)} bytes, above {RESIDENT_BYTES_MAX}') + return r_max + +BAKE_ID_BLANK = '0' * 12 +def bake_id(manifest_text, files): + """First 12 hex of sha256 over the whole bake: the manifest.json text as written with its bake_id value BAKE_ID_BLANK (the id cannot hash itself), then the tile files, tile-major then card, colour then geometry (a null card tile writes none), so any change to the manifest or a tile is a new directory. + files: [(colour bytes, geometry bytes)] in that order.""" + h = hashlib.sha256(); h.update(manifest_text.encode('utf-8')) + for colour, geometry in files: h.update(colour); h.update(geometry) + return h.hexdigest()[:12] + +def write_bake(out, place, view, meta, packed, opaque, default=None): + """Write out/-/ (tile WebPs + manifest.json; the id addresses both), rewrite out/index.json, delete the place's previous dir. packed: dict(cards [dict(near_m, far_m)], tiles [TILES][cards] of dict(top, colour bytes, geometry bytes, distance_m) or None, + camera dict(r_max_m, r_max_forward_m)); opaque: TILES arrays (plane_h, TILE_W + 2 APRON), each the opaque view's coverage over a tile's columns. Refuses before writing a bake whose files decode to the wrong size, leave the frame, break a budget (the resident gate at r_max_m and at r_max_forward_m) or composite + away from the opaque view in any tile. meta: dict(curvature, encoding). Returns the directory.""" + cards, tiles, camera = packed['cards'], packed['tiles'], packed['camera']; k = len(cards); h = view['plane_h']; w = TILE_W + 2 * APRON + if len(tiles) != TILES or len(opaque) != TILES or any(len(row) != k for row in tiles): raise Refusal(f'the bake needs {TILES} tiles of {k} cards each') + for i in range(k): + if all(row[i] is None for row in tiles): raise Refusal(f'card {i} is null in every tile') + dec = [[None if e is None else (decode(e['colour']), decode(e['geometry'])) for e in row] for row in tiles]; bands = [[pair[0].shape[0] for pair in row if pair] for row in dec]; tile_bytes = [] + for t, (row, drow) in enumerate(zip(tiles, dec)): + tile_bytes.append(sum(len(e['colour']) + len(e['geometry']) for e in row if e)) + for i, (e, pair) in enumerate(zip(row, drow)): + if e is None: continue + c, g = pair + if c.shape[:2] != g.shape[:2]: raise Refusal(f'tile {t} card {i}: colour and geometry are not one size') + if c.shape[1] != w: raise Refusal(f'tile {t} card {i} is {c.shape[1]} columns wide, not {w} (tile {TILE_W} + 2 apron {APRON})') + if c.shape[0] < 1 or e['top'] < 0 or e['top'] + c.shape[0] > h: raise Refusal(f'tile {t} card {i} leaves the {h} rows of the frame') + if opaque[t].shape != (h, w): raise Refusal(f'tile {t}: the opaque view is {opaque[t].shape}, the frame {(h, w)}') + import ridge + rmin = min(row[0]['distance_m'] for row in tiles if row[0]) # distance_m is exp of a float32 log: it lands a few parts in 1e7 off the clip, so the compare keeps 1e-5 of slack + if rmin < ridge.NEAR_CLIP_M * (1 - 1e-5): raise Refusal(f'card 0 stands {rmin:.1f} m away, nearer than the near clip {ridge.NEAR_CLIP_M:g} m: the distance of card 0 is measured at or beyond the clip (the near ground under it is not measured)') + if camera['r_max_forward_m'] < camera['r_max_m']: raise Refusal(f"r_max_forward_m {camera['r_max_forward_m']:g} is below r_max_m {camera['r_max_m']:g}: phi = 0 is one of the angles r_max_m holds for") + for r in (camera['r_max_m'], camera['r_max_forward_m']): check_budget(k, tile_bytes, bands, r, rmin) + for t, (row, drow) in enumerate(zip(tiles, dec)): + try: check_cover([(e['top'], pair[0][..., 3] / 255.0) for e, pair in zip(row, drow) if e], opaque[t]) + except Refusal as ex: raise Refusal(f'tile {t}: {ex}') + out = Path(out) + manifest = dict(schema=3, baker_version=BAKER_VERSION, bake_id=BAKE_ID_BLANK, place=place, view=dict(view, ring_w=RING_W, tile_w=TILE_W, tiles=TILES, apron=APRON), curvature=meta['curvature'], encoding=dict(meta['encoding'], normal='rt8'), camera=dict(r_max_m=camera['r_max_m'], r_max_forward_m=camera['r_max_forward_m']), + cards=[dict(near_m=c['near_m'], far_m=c['far_m']) for c in cards], + tiles=[[None if e is None else dict(top=e['top'], h=pair[0].shape[0], distance_m=e['distance_m'], colour=dict(file=tile_file(i, t, 'colour'), bytes=len(e['colour'])), geometry=dict(file=tile_file(i, t, 'geometry'), bytes=len(e['geometry']))) + for i, (e, pair) in enumerate(zip(row, drow))] for t, (row, drow) in enumerate(zip(tiles, dec))], bytes=sum(tile_bytes), attribution=ATTRIBUTION) + validate_manifest(manifest); text = json.dumps(manifest, indent=1) + '\n'; blank = f'"bake_id": "{BAKE_ID_BLANK}"'; assert text.count(blank) == 1 + bid = bake_id(text, [(e['colour'], e['geometry']) for row in tiles for e in row if e]); name = f"{place['id']}-{bid}"; dest = out / name; text = text.replace(blank, f'"bake_id": "{bid}"') + out.mkdir(parents=True, exist_ok=True); tmp = Path(tempfile.mkdtemp(dir=out, prefix='.bake-')) + for t, row in enumerate(tiles): + for i, e in enumerate(row): + if e: (tmp / tile_file(i, t, 'colour')).write_bytes(e['colour']); (tmp / tile_file(i, t, 'geometry')).write_bytes(e['geometry']) + (tmp / 'manifest.json').write_bytes(text.encode('utf-8')) # bytes, so the platform's newline cannot move the file under its id + idx_path = out / 'index.json'; idx = json.loads(idx_path.read_text()) if idx_path.exists() else dict(schema=1, default=place['id'], places={}) + old = idx['places'].get(place['id']); idx['places'][place['id']] = name; idx['default'] = default or (idx['default'] if idx['default'] in idx['places'] else place['id']) + validate(idx, SCHEMA['$defs']['index']) + if dest.exists(): shutil.rmtree(dest) + os.rename(tmp, dest); (out / '.index.tmp').write_bytes((json.dumps(idx, indent=1) + '\n').encode('utf-8')); os.replace(out / '.index.tmp', idx_path) + if old and old != name: shutil.rmtree(out / old, ignore_errors=True) + return dest + +# ------------------------------------------------------------------------------------ the bake +def cut_ring(d, a, h, splits_km, near): + """The ring cut of a prefiltered march (set_view done) and its near march (ridge.near_march): coverage, the periodic seams and the opaque view on the far march (d, a), the join of the near ground and the normals on all RING_W columns (ridge.join_near), then ridge.cards per tile on its TILE_W + 2 APRON columns of the joined march. Returns dict(cards [TILES][cards] (ridge.cards arrays), + splits_km, seams (K, ring) in m, cov (bins, ring), opaque [TILES] (rows, TILE_W + 2 APRON) coverage, edges).""" + import ridge + cov = ridge.coverage(d, a); sm = ridge.seams(cov, [k * 1000.0 for k in splits_km], d); op = ridge.opaque(a); D, A, Hc, nrm = ridge.join_near(d, a, h, near); cols = lambda x, t: ridge.ring_cols(x, t * TILE_W - APRON, TILE_W + 2 * APRON); tiles = [] + for t in range(TILES): tiles.append(ridge.cards(D, cols(A, t), cols(Hc, t), cols(sm, t), tuple(cols(x, t) for x in nrm))); print(f'tile {t + 1}/{TILES}', file=sys.stderr, flush=True) + return dict(cards=tiles, splits_km=list(splits_km), seams=sm, cov=cov, opaque=[cols(op, t) for t in range(TILES)], edges=ridge.log_edges(d)) + +def bake_place(pid): + """stage 0, prefilter, set_view on the whole ring, cut_ring: dict(place, view, meta, v, and cut_ring's cards, splits_km, seams, cov, opaque, edges). Needs RIDGE_TILES / RIDGE_WORK.""" + import ridge + assert ridge.W == RING_W and ridge.H > 0 + p = ridge.configure(ridge.load_preset(pid)); ridge.mosaic(p); d, _, Hh, _ = ridge.stage0(False); a, h = ridge.prefilter(d, Hh, p.get('prefilter_m', 0)); v = ridge.set_view(a.max(0)); ring = cut_ring(d, a, h, p['card_split_km'], ridge.near_march(p.get('prefilter_m', 0) or 0)) + place = dict(id=p['id'], name=p['name'], lat=p['lat'], lon=p['lon'], altitude_km=p['ground_m'] / 1000.0, eye_m=p['eye_m'], tz=p['tz']) + view = dict(look_az_deg=p['az_center'], plane_h=ridge.H, px_per_deg_h=ridge.HPX_DEG, px_per_deg_v=v['px_per_deg'], exaggeration=v['exaggeration'], horizon_row=v['horizon_row'], sky_row=v['sky_row'] * ridge.H, near_row=v['near_row'] * ridge.H) + meta = dict(curvature=dict(r_earth_m=ridge.R_EARTH, k_ref=ridge.KREF), encoding=dict(log_d_min=math.log(d[0]), log_d_max=math.log(d[-1]))) + return dict(place=place, view=view, meta=meta, v=v, **ring) + +def pack(bake): + """The tiles of a bake as bytes plus their manifest facts. Per card tile: distance_m = exp(median ln d) over the solid (alpha >= 0.5) pixels that are neither wall nor near ground (under the clip) of the interior TILE_W columns (a tile with none falls back to its non-wall, then any, lit pixels, near ground never; a tile with nothing outside the near ground gets ridge.NEAR_CLIP_M: the near ground itself is not measured, but such a tile is slid at that distance and binds r_max there); + a card with no rows in a tile is null there. Per card: the median seam depths over the ring. camera.r_max_m: solve_r_max over the NEAREST solid non-wall pixel of each card tile (not its median distance_m; each tile's near pixels, under the clip, count as terrain at the clip alongside its solid pixels, whatever else the tile holds: they are drawn at the clip) and every camera angle on its circle (the offset-only rotation mode), camera.r_max_forward_m: the same at phi = 0 alone (the modes where the offset turns with the view). Refuses a card empty in every tile (naming the splits) and a card with + no solid terrain apart from its wall in any tile. Returns dict(cards, tiles, camera, report) (report is printed, not written).""" + import ridge + sm = bake['seams']; sp = bake['splits_km']; k = len(sp) + 1; ppd = bake['view']['px_per_deg_h']; inner = slice(APRON, APRON + TILE_W); enc = bake['meta']['encoding'] + for i in range(k): + if all(tile[i]['alpha'].shape[0] == 0 for tile in bake['cards']): raise Refusal(f"card {i} is empty: it lies between the splits {' and '.join(f'{sp[j]:g} km' for j in (i - 1, i) if 0 <= j < len(sp))} (card_split_km {sp}) and holds no terrain nothing nearer hides; move or remove a split") + tiles, dist, near, bands = [], [], [], []; any_solid = [False] * k + for tile in bake['cards']: + row, drow, nrow, brow = [], [], [], [] + for i, c in enumerate(tile): + if c['alpha'].shape[0] == 0: row.append(None); drow.append(None); nrow.append(None); continue + al, wl, ld, nr = c['alpha'][:, inner], c['wall'][:, inner], c['logd'][:, inner], c['near'][:, inner]; solid = (al >= 0.5) & ~wl & ~nr; any_solid[i] |= bool(solid.any()) + pool = next(((m, l) for m, l in ((solid, ld), ((al > 0) & ~wl & ~nr, ld), ((al > 0) & ~nr, ld), ((c['alpha'] > 0) & ~c['near'], c['logd'])) if m.any()), None) + dm = float(np.exp(np.median(pool[1][pool[0]]))) if pool else ridge.NEAR_CLIP_M; nrow.append(min((v for v in (float(np.exp(ld[solid].min())) if solid.any() else None, ridge.NEAR_CLIP_M if ((al >= 0.5) & nr).any() else None) if v is not None), default=None)) # the nearest terrain the card draws in this tile: its solid pixels, and its near pixels as terrain at the clip (they are drawn at the clip whatever else the tile holds); None where it draws only wall or faint pixels + row.append(dict(top=c['top'], colour=encode_colour(c['albedo'], c['alpha']), geometry=encode_geometry(c['n_r'], c['n_t'], c['logd'], enc, c['wall']), distance_m=dm)); drow.append(dm); brow.append(c['alpha'].shape[0]) + tiles.append(row); dist.append(drow); near.append(nrow); bands.append(brow) + for i in range(k): + if not any_solid[i]: raise Refusal(f'card {i} holds no solid terrain apart from its wall rows') + r_max = solve_r_max(near, bands, ppd); r_fwd = solve_r_max(near, bands, ppd, phis=1); rmin = min(row[0] for row in near if row[0] is not None); n = run_tiles(r_fwd, rmin); worst = np.nanmax(fit_table(near, r_max, ppd), axis=0) + cards = [dict(near_m=float(np.median(sm[i - 1])) if i else None, far_m=float(np.median(sm[i])) if i < len(sm) else None) for i in range(k)] + return dict(cards=cards, tiles=tiles, camera=dict(r_max_m=r_max, r_max_forward_m=r_fwd), report=dict(fit_px=[float(x) for x in worst], run_tiles=n, resident_bytes=resident_bytes(bands, n), nearest_m=rmin)) # nearest_m: the nearest solid terrain of the place + +def lit(c): + """albedo x (0.35 + 0.65 max(n.L, 0)) under the fixed sheet light, with the card's alpha: (rgb, alpha). Wall pixels are lit with the face up, as the runtime reads their code.""" + wall = c['wall']; n_r, n_t = np.where(wall, 0.0, c['n_r']), np.where(wall, 0.0, c['n_t']) + up = np.sqrt(np.clip(1 - n_r ** 2 - n_t ** 2, 0, 1)); L = np.array(SHEET_LIGHT) / np.linalg.norm(SHEET_LIGHT); nl = np.clip(n_r * L[0] + n_t * L[1] + up * L[2], 0, 1) + return c['albedo'] * (0.35 + 0.65 * nl)[..., None], c['alpha'] +def sheet(bake): + """Contact sheet (png bytes) at 1/4 of the ring's width, stacked: the ring composite, every card's strip alone, and the depth image (log-distance bins, far at the top, every seam); the TILES tile boundaries drawn on each. All lit by SHEET_LIGHT over the flat + SHEET_SKY; reads the arrays the encoder writes (each tile's interior columns, the apron dropped).""" + h = bake['opaque'][0].shape[0]; k = len(bake['cards'][0]); sky = np.broadcast_to(np.array(SHEET_SKY, np.float32), (h, RING_W, 3)); rgbs = [np.zeros((h, RING_W, 3), np.float32) for _ in range(k)]; als = [np.zeros((h, RING_W), np.float32) for _ in range(k)] + for t, tile in enumerate(bake['cards']): + for i, c in enumerate(tile): + if c['alpha'].shape[0] == 0: continue + rgb, al = lit(c); sl = slice(c['top'], c['top'] + al.shape[0]); x0 = t * TILE_W; rgbs[i][sl, x0:x0 + TILE_W] = rgb[:, APRON:APRON + TILE_W]; als[i][sl, x0:x0 + TILE_W] = al[:, APRON:APRON + TILE_W] + comp = sky.copy(); panels = [] + for rgb, al in zip(rgbs, als): panels.append(sky * (1 - al[..., None]) + rgb * al[..., None]) + for rgb, al in zip(reversed(rgbs), reversed(als)): comp = comp * (1 - al[..., None]) + rgb * al[..., None] + q = lambda a: a.reshape((a.shape[0], RING_W // 4, 4) + a.shape[2:]).mean(2); mark = np.arange(TILES) * TILE_W // 4; red = np.array([1.0, 0.2, 0.2]) + def bounds(img): img[:, mark] = 0.45 * img[:, mark] + 0.55 * red; return img + cov = bake['cov'][:, ::4]; w = cov.shape[1]; img = np.repeat(np.log1p(cov[::-1]) / np.log1p(cov.max()), 2, 0); depth = np.dstack([img] * 3) * 0.92 + 0.04; nb = cov.shape[0]; cols = np.arange(w) + for j, s in enumerate(bake['seams']): + b = np.clip(np.searchsorted(bake['edges'], np.log(s[::4]), 'right') - 1, 0, nb - 1); col = [(0.24, 0.78, 1.0), (1.0, 0.47, 0.24), (0.6, 1.0, 0.4), (1.0, 0.9, 0.3), (0.9, 0.4, 1.0)][j % 5] + for dy in (0, 1): depth[(nb - 1 - b) * 2 + dy, cols] = col + return bytes(imagecodecs.png_encode(u8(np.concatenate([bounds(q(comp))] + [bounds(q(p)) for p in panels] + [bounds(depth)], 0)))) + +def main(argv=None): + ap = argparse.ArgumentParser(description=__doc__.split('\n')[0]); ap.add_argument('place', nargs='?'); ap.add_argument('--tiles'); ap.add_argument('--out'); ap.add_argument('--work'); ap.add_argument('--sheet'); ap.add_argument('--write-schema', action='store_true') + a = ap.parse_args(argv) + if a.write_schema: (HERE / 'ridge-bake.schema.json').write_bytes((json.dumps(SCHEMA, indent=1, ensure_ascii=False) + '\n').encode('utf-8')); return 0 + if not (a.place and a.tiles and a.out): ap.error('place, --tiles and --out are required') + os.environ['RIDGE_TILES'] = a.tiles; os.environ['RIDGE_WORK'] = a.work or os.path.join(os.environ.get('TMPDIR', tempfile.gettempdir()), 'ridge-bake-work'); os.makedirs(os.environ['RIDGE_WORK'], exist_ok=True) + bake = bake_place(a.place) + if a.sheet: Path(a.sheet).write_bytes(sheet(bake)) + packed = pack(bake); rp = packed['report'] + print(f"r_max_m {packed['camera']['r_max_m']:g} r_max_forward_m {packed['camera']['r_max_forward_m']:g} nearest card {rp['nearest_m']:.0f} m resident run {rp['run_tiles']} tiles = {rp['resident_bytes']} bytes worst fit error per card (card px, bound {FIT_PX_MAX:g}) {[round(x, 1) for x in rp['fit_px']]}", file=sys.stderr, flush=True) + dest = write_bake(a.out, bake['place'], bake['view'], bake['meta'], packed, bake['opaque']); print(dest); return 0 + +if __name__ == '__main__': sys.exit(main()) diff --git a/scripts/ridge-bake/places.json b/scripts/ridge-bake/places.json new file mode 100644 index 00000000..5058186d --- /dev/null +++ b/scripts/ridge-bake/places.json @@ -0,0 +1,676 @@ +{ + "_doc": "Place presets for the A+D baker (ridge.py). eye = observer lat/lon; eye_h_m = eye above the local DEM surface (ground_override_m replaces the DEM ground elevation, used for Vienna to keep round 1's 183.3 m); look_at = target lat/lon whose bearing is the rest azimuth, where the view looks at rest (or az_deg); the ring itself is the whole 360 degrees, absolute compass, column 0 = north; tz = the place's IANA time zone (required, never defaulted: the runtime draws named sky moments in the place's local day); rmax_km = ring radius (decides the tile list: every 1x1 deg GLO-30 tile whose rectangle intersects the circle); card_split_km = the ordered list of 1 to MAX_CARDS - 1 authored seam depths in km (the seam search refines each per column; K splits make K+1 cards; required, never defaulted); prefilter_m = Gaussian sigma in metres of the height low-pass before the cards are cut (default 0).", + "presets": [ + { + "id": "vienna", + "tz": "Europe/Vienna", + "name": "Vienna, looking SW to Rax/Schneeberg", + "kind": "far range over a flat foreground", + "lat": 48.1929826, + "lon": 16.3534237, + "eye_h_m": 30.0, + "ground_override_m": 183.3, + "az_deg": 214.0, + "rmax_km": 95, + "card_split_km": [ + 6, + 40 + ], + "prefilter_m": 100, + "viewpoint_source": { + "status": "existing observer of the round-1 mockup (the scene camera used by the game), not photo-sourced; eye 30 m above ground as in round 1" + } + }, + { + "id": "matterhorn", + "tz": "Europe/Zurich", + "name": "Matterhorn from the Gornergrat", + "kind": "lone horn, close, 27 deg of relief", + "lat": 45.983139, + "lon": 7.782466, + "eye_h_m": 1.6, + "look_at": [ + 45.97666, + 7.65678 + ], + "rmax_km": 60, + "initial_guess_not_used": { + "lat": 45.9856, + "lon": 7.7452 + }, + "viewpoint_source": { + "status": "sourced", + "source": "Wikimedia Commons geosearch (namespace 6), geotagged photos", + "query": "geosearch ns=6 gslimit=500 gsradius=10000 around 25 centres (peak + 3 rings x 8 bearings, radii 3600-12000 m), then EXIF GPSImgDirection of every file in range via prop=imageinfo&iiprop=commonmetadata", + "files_found": 5003, + "in_range": 3241, + "with_exif_heading": 205, + "facing_the_peak": 52, + "pool": "photos whose camera heading is within 30 deg of the bearing to the summit", + "rule": "densest 1 km cell of photos 3000-12000 m from the summit whose EXIF camera heading faces the summit (within 30 deg) with the summit visible on the DEM (straight line, first 250 m ignored, 8 m clutter allowed); viewpoint = median coordinate of the cell", + "median_camera_heading_deg": 245.8, + "photos_in_cell": 7, + "cells_tried": [ + { + "n_facing": 7, + "lat": 45.98314, + "lon": 7.78247, + "peak_visible": true + } + ], + "distance_to_peak_m": 9749, + "bearing_to_peak_deg": 265.8, + "dem_ground_m": 3090.7, + "eye_height_rule": "DEM ground at the viewpoint + 1.6 m (the source gives no eye height)", + "sample_files": [ + { + "title": "File:Gornergrat-04.jpg", + "lat": 45.983061, + "lon": 7.782031, + "heading": 256.0, + "url": "https://commons.wikimedia.org/wiki/File%3AGornergrat-04.jpg" + }, + { + "title": "File:Gornergrat-03.jpg", + "lat": 45.983058, + "lon": 7.782038, + "heading": 245.8, + "url": "https://commons.wikimedia.org/wiki/File%3AGornergrat-03.jpg" + }, + { + "title": "File:Gornergrat-07.jpg", + "lat": 45.982653, + "lon": 7.782466, + "heading": 250.2, + "url": "https://commons.wikimedia.org/wiki/File%3AGornergrat-07.jpg" + }, + { + "title": "File:Gornergratsee 2021 10.jpg", + "lat": 45.986958, + "lon": 7.780303, + "heading": 243.4, + "url": "https://commons.wikimedia.org/wiki/File%3AGornergratsee_2021_10.jpg" + }, + { + "title": "File:Early morning Eiger.jpg", + "lat": 45.983242, + "lon": 7.783361, + "heading": 254.7, + "url": "https://commons.wikimedia.org/wiki/File%3AEarly_morning_Eiger.jpg" + }, + { + "title": "File:Klein Matterhorn mit Wolken an Theodulhorn und Furgghorn \u00fcber dem Oberen Theodulgletscher- a view from Gornergrat 2021 02 (cropped).jpg", + "lat": 45.983139, + "lon": 7.784172, + "heading": 242.1, + "url": "https://commons.wikimedia.org/wiki/File%3AKlein_Matterhorn_mit_Wolken_an_Theodulhorn_und_Furgghorn_%C3%BCber_dem_Oberen_Theodulgletscher-_a_view_from_Gornergrat_2021_02_%28cropped%29.jpg" + }, + { + "title": "File:Breithorn and neighbours from Gornergrat 2021 02.jpg", + "lat": 45.983139, + "lon": 7.784172, + "heading": 242.1, + "url": "https://commons.wikimedia.org/wiki/File%3ABreithorn_and_neighbours_from_Gornergrat_2021_02.jpg" + } + ], + "exif_headings": [ + { + "title": "File:Gornergrat-04.jpg", + "heading": 256.0 + }, + { + "title": "File:Gornergrat-03.jpg", + "heading": 245.8 + }, + { + "title": "File:Gornergrat-07.jpg", + "heading": 250.2 + }, + { + "title": "File:Gornergratsee 2021 10.jpg", + "heading": 243.4 + }, + { + "title": "File:Early morning Eiger.jpg", + "heading": 254.7 + }, + { + "title": "File:Klein Matterhorn mit Wolken an Theodulhorn und Furgghorn \u00fcber dem Oberen Theodulgletscher- a view from Gornergrat 2021 02 (cropped).jpg", + "heading": 242.1 + }, + { + "title": "File:Breithorn and neighbours from Gornergrat 2021 02.jpg", + "heading": 242.1 + } + ], + "n_with_exif_heading": 7, + "summit_dem_m": 4324.9, + "summit_nominal": [ + 45.97639, + 7.65833 + ] + }, + "card_split_km": [ + 18, + 28, + 43 + ] + }, + { + "id": "fuji", + "tz": "Asia/Tokyo", + "name": "Fuji from Shiraito Falls", + "kind": "lone cone, smooth", + "lat": 35.312467222222494, + "lon": 138.587223194445, + "eye_h_m": 1.6, + "look_at": [ + 35.36061, + 138.72731 + ], + "rmax_km": 60, + "initial_guess_not_used": { + "lat": 35.4994, + "lon": 138.7686 + }, + "viewpoint_source": { + "status": "sourced", + "source": "Wikimedia Commons geosearch (namespace 6), geotagged photos", + "query": "geosearch ns=6 gslimit=500 gsradius=10000 around 25 centres (peak + 3 rings x 8 bearings, radii 9000-30000 m), then EXIF GPSImgDirection of every file in range via prop=imageinfo&iiprop=commonmetadata", + "files_found": 6494, + "in_range": 4280, + "with_exif_heading": 588, + "facing_the_peak": 132, + "pool": "photos whose camera heading is within 30 deg of the bearing to the summit", + "rule": "densest 1 km cell of photos 8000-30000 m from the summit whose EXIF camera heading faces the summit (within 30 deg) with the summit visible on the DEM (straight line, first 250 m ignored, 8 m clutter allowed); viewpoint = median coordinate of the cell", + "median_camera_heading_deg": 64.4, + "photos_in_cell": 8, + "cells_tried": [ + { + "n_facing": 15, + "lat": 35.36248, + "lon": 138.86287, + "peak_visible": false + }, + { + "n_facing": 8, + "lat": 35.31247, + "lon": 138.58722, + "peak_visible": true + } + ], + "distance_to_peak_m": 13808, + "bearing_to_peak_deg": 67.2, + "dem_ground_m": 486.9, + "eye_height_rule": "DEM ground at the viewpoint + 1.6 m (the source gives no eye height)", + "sample_files": [ + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 03.JPG", + "lat": 35.31114, + "lon": 138.5886, + "heading": 48.0, + "url": "https://commons.wikimedia.org/wiki/File%3A%E5%AF%8C%E5%A3%AB%E5%B1%B1%EF%BC%88%E3%81%B5%E3%81%98%E3%81%95%E3%82%93%E3%80%81%E8%8B%B1%E8%AA%9E%EF%BC%9AMount_Fuji%EF%BC%89_03.JPG" + }, + { + "title": "File:Mount Fuji, view from Shiraito no Taki.jpg", + "lat": 35.313589, + "lon": 138.588394, + "heading": 68.8, + "url": "https://commons.wikimedia.org/wiki/File%3AMount_Fuji%2C_view_from_Shiraito_no_Taki.jpg" + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 02.JPG", + "lat": 35.313248055556, + "lon": 138.58760805556, + "heading": 64.2, + "url": "https://commons.wikimedia.org/wiki/File%3A%E5%AF%8C%E5%A3%AB%E5%B1%B1%EF%BC%88%E3%81%B5%E3%81%98%E3%81%95%E3%82%93%E3%80%81%E8%8B%B1%E8%AA%9E%EF%BC%9AMount_Fuji%EF%BC%89_02.JPG" + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 07.JPG", + "lat": 35.312428055556, + "lon": 138.58723138889, + "heading": 88.8, + "url": "https://commons.wikimedia.org/wiki/File%3A%E5%AF%8C%E5%A3%AB%E5%B1%B1%EF%BC%88%E3%81%B5%E3%81%98%E3%81%95%E3%82%93%E3%80%81%E8%8B%B1%E8%AA%9E%EF%BC%9AMount_Fuji%EF%BC%89_07.JPG" + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 08.JPG", + "lat": 35.312418055556, + "lon": 138.587215, + "heading": 64.0, + "url": "https://commons.wikimedia.org/wiki/File%3A%E5%AF%8C%E5%A3%AB%E5%B1%B1%EF%BC%88%E3%81%B5%E3%81%98%E3%81%95%E3%82%93%E3%80%81%E8%8B%B1%E8%AA%9E%EF%BC%9AMount_Fuji%EF%BC%89_08.JPG" + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 04.JPG", + "lat": 35.312478055556, + "lon": 138.58717805556, + "heading": 62.2, + "url": "https://commons.wikimedia.org/wiki/File%3A%E5%AF%8C%E5%A3%AB%E5%B1%B1%EF%BC%88%E3%81%B5%E3%81%98%E3%81%95%E3%82%93%E3%80%81%E8%8B%B1%E8%AA%9E%EF%BC%9AMount_Fuji%EF%BC%89_04.JPG" + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 06.JPG", + "lat": 35.312456388889, + "lon": 138.58715805556, + "heading": 65.2, + "url": "https://commons.wikimedia.org/wiki/File%3A%E5%AF%8C%E5%A3%AB%E5%B1%B1%EF%BC%88%E3%81%B5%E3%81%98%E3%81%95%E3%82%93%E3%80%81%E8%8B%B1%E8%AA%9E%EF%BC%9AMount_Fuji%EF%BC%89_06.JPG" + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 05.JPG", + "lat": 35.312479722222, + "lon": 138.58714138889, + "heading": 64.5, + "url": "https://commons.wikimedia.org/wiki/File%3A%E5%AF%8C%E5%A3%AB%E5%B1%B1%EF%BC%88%E3%81%B5%E3%81%98%E3%81%95%E3%82%93%E3%80%81%E8%8B%B1%E8%AA%9E%EF%BC%9AMount_Fuji%EF%BC%89_05.JPG" + } + ], + "exif_headings": [ + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 03.JPG", + "heading": 48.0 + }, + { + "title": "File:Mount Fuji, view from Shiraito no Taki.jpg", + "heading": 68.8 + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 02.JPG", + "heading": 64.2 + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 07.JPG", + "heading": 88.8 + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 08.JPG", + "heading": 64.0 + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 04.JPG", + "heading": 62.2 + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 06.JPG", + "heading": 65.2 + }, + { + "title": "File:\u5bcc\u58eb\u5c71\uff08\u3075\u3058\u3055\u3093\u3001\u82f1\u8a9e\uff1aMount Fuji\uff09 05.JPG", + "heading": 64.5 + } + ], + "n_with_exif_heading": 8, + "summit_dem_m": 3765.5, + "summit_nominal": [ + 35.36061, + 138.72731 + ] + }, + "card_split_km": [ + 1.5, + 16 + ] + }, + { + "id": "halfdome", + "tz": "America/Los_Angeles", + "name": "Half Dome from the Yosemite Valley floor (Sentinel Bridge photo cell)", + "kind": "granite wall across a valley", + "lat": 37.745833333333, + "lon": -119.592606, + "eye_h_m": 1.6, + "look_at": [ + 37.74435, + -119.53426 + ], + "rmax_km": 40, + "initial_guess_not_used": { + "lat": 37.7305, + "lon": -119.5734 + }, + "viewpoint_source": { + "status": "sourced", + "source": "Wikimedia Commons geosearch (namespace 6), geotagged photos", + "query": "geosearch ns=6 gslimit=500 gsradius=10000 around 25 centres (peak + 3 rings x 8 bearings, radii 2700-9000 m), then EXIF GPSImgDirection of every file in range via prop=imageinfo&iiprop=commonmetadata", + "files_found": 2505, + "in_range": 1788, + "with_exif_heading": 181, + "facing_the_peak": 64, + "pool": "photos whose camera heading is within 30 deg of the bearing to the summit", + "rule": "densest 1 km cell of photos 2000-9000 m from the summit whose EXIF camera heading faces the summit (within 30 deg) with the summit visible on the DEM (straight line, first 250 m ignored, 8 m clutter allowed); viewpoint = median coordinate of the cell", + "median_camera_heading_deg": 91.6, + "photos_in_cell": 9, + "cells_tried": [ + { + "n_facing": 9, + "lat": 37.73853, + "lon": -119.57124, + "peak_visible": false + }, + { + "n_facing": 9, + "lat": 37.74583, + "lon": -119.59261, + "peak_visible": true + } + ], + "distance_to_peak_m": 5138, + "bearing_to_peak_deg": 91.8, + "dem_ground_m": 1209.2, + "eye_height_rule": "DEM ground at the viewpoint + 1.6 m (the source gives no eye height)", + "sample_files": [ + { + "title": "File:Yosemite National Park - 51700634719.jpg", + "lat": 37.746606, + "lon": -119.590317, + "heading": 87.0, + "url": "https://commons.wikimedia.org/wiki/File%3AYosemite_National_Park_-_51700634719.jpg" + }, + { + "title": "File:Half Dome, Yosemite National Park - 53324601178.jpg", + "lat": 37.748264, + "lon": -119.592606, + "heading": 98.8, + "url": "https://commons.wikimedia.org/wiki/File%3AHalf_Dome%2C_Yosemite_National_Park_-_53324601178.jpg" + }, + { + "title": "File:Half Dome, Yosemite National Park - 53324824955.jpg", + "lat": 37.748322, + "lon": -119.592736, + "heading": 90.1, + "url": "https://commons.wikimedia.org/wiki/File%3AHalf_Dome%2C_Yosemite_National_Park_-_53324824955.jpg" + }, + { + "title": "File:2013-09-19 18 35 25 Half Dome and the Merced River in Yosemite National Park.JPG", + "lat": 37.7435, + "lon": -119.58966666667, + "heading": 91.6, + "url": "https://commons.wikimedia.org/wiki/File%3A2013-09-19_18_35_25_Half_Dome_and_the_Merced_River_in_Yosemite_National_Park.JPG" + }, + { + "title": "File:Half Dome from the Yosemite Valley floor in mid-Spring.jpeg", + "lat": 37.745833333333, + "lon": -119.59233333333, + "heading": 92.0, + "url": "https://commons.wikimedia.org/wiki/File%3AHalf_Dome_from_the_Yosemite_Valley_floor_in_mid-Spring.jpeg" + }, + { + "title": "File:Sentinel Bridge & Half Dome.jpg", + "lat": 37.743419, + "lon": -119.590562, + "heading": 86.8, + "url": "https://commons.wikimedia.org/wiki/File%3ASentinel_Bridge_%26_Half_Dome.jpg" + }, + { + "title": "File:Half Dome pre Super moon 2.jpg", + "lat": 37.745769, + "lon": -119.592972, + "heading": 106.5, + "url": "https://commons.wikimedia.org/wiki/File%3AHalf_Dome_pre_Super_moon_2.jpg" + }, + { + "title": "File:Half Dome pre Super moon.jpg", + "lat": 37.745747, + "lon": -119.593033, + "heading": 97.1, + "url": "https://commons.wikimedia.org/wiki/File%3AHalf_Dome_pre_Super_moon.jpg" + }, + { + "title": "File:Yosemite National Park 003.jpg", + "lat": 37.750814, + "lon": -119.598664, + "heading": 80.1, + "url": "https://commons.wikimedia.org/wiki/File%3AYosemite_National_Park_003.jpg" + } + ], + "exif_headings": [ + { + "title": "File:Yosemite National Park - 51700634719.jpg", + "heading": 87.0 + }, + { + "title": "File:Half Dome, Yosemite National Park - 53324601178.jpg", + "heading": 98.8 + }, + { + "title": "File:Half Dome, Yosemite National Park - 53324824955.jpg", + "heading": 90.1 + }, + { + "title": "File:2013-09-19 18 35 25 Half Dome and the Merced River in Yosemite National Park.JPG", + "heading": 91.6 + }, + { + "title": "File:Half Dome from the Yosemite Valley floor in mid-Spring.jpeg", + "heading": 92.0 + }, + { + "title": "File:Sentinel Bridge & Half Dome.jpg", + "heading": 86.8 + }, + { + "title": "File:Half Dome pre Super moon 2.jpg", + "heading": 106.5 + }, + { + "title": "File:Half Dome pre Super moon.jpg", + "heading": 97.1 + }, + { + "title": "File:Yosemite National Park 003.jpg", + "heading": 80.1 + } + ], + "n_with_exif_heading": 9, + "summit_dem_m": 2669.1, + "summit_nominal": [ + 37.74597, + -119.5329 + ] + } + }, + { + "id": "amadablam", + "tz": "Asia/Kathmandu", + "name": "Ama Dablam and Everest from Khumjung", + "kind": "far high range behind a near spire", + "lat": 27.822000000000003, + "lon": 86.722666666667, + "eye_h_m": 1.6, + "look_at": [ + 27.8617, + 86.86079 + ], + "rmax_km": 60, + "initial_guess_not_used": { + "lat": 27.8369, + "lon": 86.7643 + }, + "viewpoint_source": { + "status": "sourced", + "source": "Wikimedia Commons geosearch (namespace 6), geotagged photos", + "query": "geosearch ns=6 gslimit=500 gsradius=10000 around 25 centres (peak + 3 rings x 8 bearings, radii 4800-16000 m), then EXIF GPSImgDirection of every file in range via prop=imageinfo&iiprop=commonmetadata", + "files_found": 1398, + "in_range": 1143, + "with_exif_heading": 54, + "facing_the_peak": 13, + "pool": "photos whose camera heading is within 30 deg of the bearing to the summit", + "rule": "densest 1 km cell of photos 4000-16000 m from the summit whose EXIF camera heading faces the summit (within 30 deg) with the summit visible on the DEM (straight line, first 250 m ignored, 8 m clutter allowed); viewpoint = median coordinate of the cell", + "median_camera_heading_deg": 79.6, + "photos_in_cell": 2, + "cells_tried": [ + { + "n_facing": 2, + "lat": 27.822, + "lon": 86.72267, + "peak_visible": true + } + ], + "distance_to_peak_m": 14299, + "bearing_to_peak_deg": 72.0, + "dem_ground_m": 3782.0, + "eye_height_rule": "DEM ground at the viewpoint + 1.6 m (the source gives no eye height)", + "sample_files": [ + { + "title": "File:Thamserku (6).JPG", + "lat": 27.822666666667, + "lon": 86.722666666667, + "heading": 73.6, + "url": "https://commons.wikimedia.org/wiki/File%3AThamserku_%286%29.JPG" + }, + { + "title": "File:Thamserku (7).JPG", + "lat": 27.821333333333, + "lon": 86.722666666667, + "heading": 85.7, + "url": "https://commons.wikimedia.org/wiki/File%3AThamserku_%287%29.JPG" + } + ], + "exif_headings": [ + { + "title": "File:Thamserku (6).JPG", + "heading": 73.6 + }, + { + "title": "File:Thamserku (7).JPG", + "heading": 85.7 + } + ], + "n_with_exif_heading": 2, + "summit_dem_m": 6659.6, + "summit_nominal": [ + 27.8617, + 86.8614 + ] + }, + "card_split_km": [ + 2, + 18, + 34 + ] + }, + { + "id": "trecime", + "tz": "Europe/Rome", + "name": "Tre Cime di Lavaredo from the Dreizinnenhuette area, 2.4 km N (photo cell)", + "kind": "cirque wall, spires", + "lat": 46.636906, + "lon": 12.310064, + "eye_h_m": 1.6, + "look_at": [ + 46.61806, + 12.29583 + ], + "rmax_km": 40, + "initial_guess_not_used": { + "lat": 46.5833, + "lon": 12.2536 + }, + "viewpoint_source": { + "status": "sourced", + "source": "Wikimedia Commons geosearch (namespace 6), geotagged photos", + "query": "geosearch ns=6 gslimit=500 gsradius=10000 around 25 centres (peak + 3 rings x 8 bearings, radii 3000-10000 m), then EXIF GPSImgDirection of every file in range via prop=imageinfo&iiprop=commonmetadata", + "files_found": 2028, + "in_range": 763, + "with_exif_heading": 207, + "facing_the_peak": 33, + "pool": "photos whose camera heading is within 30 deg of the bearing to the summit", + "rule": "densest 1 km cell of photos 1500-10000 m from the summit whose EXIF camera heading faces the summit (within 30 deg) with the summit visible on the DEM (straight line, first 250 m ignored, 8 m clutter allowed); viewpoint = median coordinate of the cell", + "median_camera_heading_deg": 194.6, + "photos_in_cell": 5, + "cells_tried": [ + { + "n_facing": 5, + "lat": 46.63691, + "lon": 12.31006, + "peak_visible": true + } + ], + "distance_to_peak_m": 2363, + "bearing_to_peak_deg": 207.4, + "dem_ground_m": 2403.0, + "eye_height_rule": "DEM ground at the viewpoint + 1.6 m (the source gives no eye height)", + "sample_files": [ + { + "title": "File:Cime e Nuvole.jpg", + "lat": 46.63605, + "lon": 12.310064, + "heading": 200.3, + "url": "https://commons.wikimedia.org/wiki/File%3ACime_e_Nuvole.jpg" + }, + { + "title": "File:DreiZinnenP.jpg", + "lat": 46.636770555556, + "lon": 12.310305555556, + "heading": 180.1, + "url": "https://commons.wikimedia.org/wiki/File%3ADreiZinnenP.jpg" + }, + { + "title": "File:Soffio di sguardo.jpg", + "lat": 46.636906, + "lon": 12.311142, + "heading": 194.6, + "url": "https://commons.wikimedia.org/wiki/File%3ASoffio_di_sguardo.jpg" + }, + { + "title": "File:2405-DreizinnenH.jpg", + "lat": 46.637782777778, + "lon": 12.309966388889, + "heading": 178.4, + "url": "https://commons.wikimedia.org/wiki/File%3A2405-DreizinnenH.jpg" + }, + { + "title": "File:Dolomiten-Fingerkraut in den Sextener Dolomiten - N\u00e4he Drei-Zinnen-H\u00fctte (9801216636).jpg", + "lat": 46.642352, + "lon": 12.30829, + "heading": 200.0, + "url": "https://commons.wikimedia.org/wiki/File%3ADolomiten-Fingerkraut_in_den_Sextener_Dolomiten_-_N%C3%A4he_Drei-Zinnen-H%C3%BCtte_%289801216636%29.jpg" + } + ], + "exif_headings": [ + { + "title": "File:Cime e Nuvole.jpg", + "heading": 200.3 + }, + { + "title": "File:DreiZinnenP.jpg", + "heading": 180.1 + }, + { + "title": "File:Soffio di sguardo.jpg", + "heading": 194.6 + }, + { + "title": "File:2405-DreizinnenH.jpg", + "heading": 178.4 + }, + { + "title": "File:Dolomiten-Fingerkraut in den Sextener Dolomiten - N\u00e4he Drei-Zinnen-H\u00fctte (9801216636).jpg", + "heading": 200.0 + } + ], + "n_with_exif_heading": 5, + "summit_dem_m": 2746.9, + "summit_nominal": [ + 46.6186, + 12.3025 + ] + } + }, + { + "id": "grandcanyon", + "tz": "America/Phoenix", + "name": "Grand Canyon from Unkar and Cardenas", + "kind": "inner canyon from the river: walls rise above the horizon, layered strata", + "lat": 36.0817, + "lon": -111.8551, + "eye_h_m": 1.6, + "az_deg": 290, + "rmax_km": 30, + "card_split_km": [ + 11.5, + 17.3, + 28.2 + ], + "viewpoint_source": { + "status": "chosen from three scanned river candidates (Nankoweap, Unkar/Cardenas, Phantom Ranch) by the operator, ruling ridge-grandcanyon-spot-unkar; the camera stands by the Colorado River inside the canyon (ruling ridge-grandcanyon-camera-inside); the preset is the cand-unkar preset of the candidate bakes (36.0817, -111.8551, az 290), whose camera_r_m -100 is not a field of the ring baker" + } + } + ] +} \ No newline at end of file diff --git a/scripts/ridge-bake/refusal.py b/scripts/ridge-bake/refusal.py new file mode 100644 index 00000000..213d8369 --- /dev/null +++ b/scripts/ridge-bake/refusal.py @@ -0,0 +1,2 @@ +"""The baker's refusal: raised wherever ridge.py or export.py declines a preset, a view or a bake. The fixtures catch this class only, so an exception from numpy or the standard library reaching them is a crash (mutate.py: CRASHED), never a kill.""" +class Refusal(ValueError): pass diff --git a/scripts/ridge-bake/ridge-bake.schema.json b/scripts/ridge-bake/ridge-bake.schema.json new file mode 100644 index 00000000..3f7f9b41 --- /dev/null +++ b/scripts/ridge-bake/ridge-bake.schema.json @@ -0,0 +1,327 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "ridge-bake manifest v3 and index v1", + "$defs": { + "manifest": { + "type": "object", + "required": [ + "schema", + "baker_version", + "bake_id", + "place", + "view", + "curvature", + "encoding", + "camera", + "cards", + "tiles", + "bytes", + "attribution" + ], + "additionalProperties": false, + "properties": { + "schema": { + "const": 3 + }, + "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", + "ring_w", + "tile_w", + "tiles", + "apron", + "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" + }, + "ring_w": { + "const": 6400 + }, + "tile_w": { + "const": 200 + }, + "tiles": { + "const": 32 + }, + "apron": { + "const": 2 + }, + "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_max_m", + "r_max_forward_m" + ], + "additionalProperties": false, + "properties": { + "r_max_m": { + "type": "number" + }, + "r_max_forward_m": { + "type": "number" + } + }, + "description": "r_max_m (every camera angle on its circle) and r_max_forward_m (the camera on its heading) are the offsets up to which the linear slide holds (the fit error at most FIT_PX_MAX card px) for the NEAREST solid terrain (at or beyond the near clip, ridge.NEAR_CLIP_M, 500 m) that each card draws in each tile, not for the tile's median distance_m; a tile whose card 0 draws only near ground (under the clip) is slid at the clip distance (its distance_m) and binds at 500 m. The ground under the clip is drawn by card 0 from the near march and is otherwise not measured." + }, + "cards": { + "type": "array", + "minItems": 1, + "maxItems": 6, + "items": { + "type": "object", + "required": [ + "near_m", + "far_m" + ], + "additionalProperties": false, + "properties": { + "near_m": { + "type": [ + "number", + "null" + ] + }, + "far_m": { + "type": [ + "number", + "null" + ] + } + } + }, + "description": "nearest first; the runtime paints the list last to first. near_m and far_m are the median seam depths over the ring, null at the ends." + }, + "tiles": { + "type": "array", + "minItems": 32, + "maxItems": 32, + "items": { + "type": "array", + "minItems": 1, + "maxItems": 6, + "items": { + "type": [ + "object", + "null" + ], + "required": [ + "top", + "h", + "distance_m", + "colour", + "geometry" + ], + "additionalProperties": false, + "properties": { + "top": { + "type": "integer" + }, + "h": { + "type": "integer" + }, + "distance_m": { + "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": "tiles[t][i] is card i in tile t, or null where the card holds nothing in that tile (the client takes its distance from the neighbouring tiles). Tile t owns the ring columns [tile_w t, tile_w (t + 1)), column c at azimuth (c + 0.5) / ring_w x 360, 0 = north; its files hold [tile_w t - apron, tile_w (t + 1) + apron), wrapping at the ring's end, and are tile_w + 2 apron columns wide. top and h place the card's band back at its rows of the frame; distance_m = exp(median ln d) of the card's solid pixels in the tile that are neither wall nor near ground, under the near clip (the interior tile_w columns); a tile whose card draws only near ground gets the clip distance." + }, + "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" + } + } + } + } + } +} diff --git a/scripts/ridge-bake/ridge.py b/scripts/ridge-bake/ridge.py new file mode 100644 index 00000000..1ec57b10 --- /dev/null +++ b/scripts/ridge-bake/ridge.py @@ -0,0 +1,294 @@ +"""Ridge baker: the ray march of a place, cut into K+1 layered-depth G-buffer cards by K authored seams (places.json), no painter, no sun. +Offline baker for the ridge backdrop (scripts/ridge-bake); export.py drives it. + + load_preset(id) -> configure() : observer, tiles, mosaic origin, ring radius, rest azimuth, card splits and prefilter from places.json + stage0(detail) : ray march of all 6400 azimuth columns (curvature+refraction), optional authored sub-DEM foreground detail, cached + prefilter(d, h, sigma_m) : Gaussian low-pass of the sampled heights (along each ray, across rays at equal distance), angles recomputed with elev + set_view(skyline) : authored Y mapping from the march skyline of the whole ring: angle -> row, see set_view + ring_cols(a, c0, n) : n columns of the ring from column c0, periodic (the tile cut) + coverage(d, a) / seams(cov, ..) : visible rows per log-distance bin; one forward-energy seam per authored split, per column, periodic round the ring + normals(d, h) / cards(...) : per-sample normals; the K+1 cards (coverage, distance, normal, albedo), each cropped to its band of rows +Vertical exaggeration is AUTHORED and derived per view by set_view (printed on the page). The client owns lighting, haze and ink (ruling ridge-cards-runtime-lit).""" +import sys, time, math, json +import os, hashlib +from zoneinfo import ZoneInfo, ZoneInfoNotFoundError +from pathlib import Path +sys.path.insert(0, str(Path(__file__).resolve().parent)) +from refusal import Refusal +import numpy as np, tifffile + +def _env_dir(name, what): + v = os.environ.get(name) + if not v: raise RuntimeError(f"{name} is not set: it must name {what} (no default location is assumed)") + return Path(v) +B = _env_dir('RIDGE_WORK', 'the work directory (the mosaic / ray caches)') +COP = _env_dir('RIDGE_TILES', 'the directory of Copernicus GLO-30 tiles (Copernicus_DSM_COG_10_*_DEM.tif)') +W = 6400 # ring columns: 360 deg at 17.78 px/deg +HPX_DEG = W / 360.0 +H = 600 # frame rows +COLW = math.radians(360.0 / W) +R_EARTH, KREF = 6371000.0, 0.13 + +P = {} # configured preset +rowang = np.zeros(H); PXDEG_V = 100.0; TOP_DEG = 2.6; BOTTOM_DEG = -3.4 + +def load_preset(pid, path=Path(__file__).resolve().parent / 'places.json'): + """The preset dict. tz is required, an IANA zone the system knows (the runtime draws named sky moments in the place's local day). card_split_km is the ordered list of authored seam depths (km): required, strictly increasing, at most export.MAX_CARDS - 1 (the cap is export's, which owns the budget); refused here, before any march.""" + d = json.load(open(path)); p = dict(next(x for x in d['presets'] if x['id'] == pid)); sp = p.get('card_split_km') + from export import MAX_CARDS + if not sp: raise Refusal(f"preset {pid}: card_split_km is required (an ordered list of 1 to {MAX_CARDS - 1} depths in km)") + if len(sp) > MAX_CARDS - 1 or any(b <= a for a, b in zip(sp, sp[1:])): raise Refusal(f"preset {pid}: card_split_km {sp} must be strictly increasing with at most {MAX_CARDS - 1} entries") + tz = p.get('tz') + if not isinstance(tz, str) or not tz: raise Refusal(f"preset {pid}: tz is required (an IANA time zone name such as Europe/Vienna)") + try: ZoneInfo(tz) + except (ZoneInfoNotFoundError, ValueError, OSError): raise Refusal(f"preset {pid}: tz {tz!r} is not a time zone the system knows") + return p + +# ====================================================================== configuration, DEM +def tiles_for(p): + lat, lon, r = p['lat'], p['lon'], p['rmax_km']; dl = r / 111.32; dn = r / (111.32 * math.cos(math.radians(lat))); out = [] + for la in range(math.floor(lat - dl), math.floor(lat + dl) + 1): + for lo in range(math.floor(lon - dn), math.floor(lon + dn) + 1): + cy = min(max(lat, la), la + 1); cx = min(max(lon, lo), lo + 1) + if math.hypot((cy - lat) * 111.32, (cx - lon) * 111.32 * math.cos(math.radians(lat))) <= r: out.append((la, lo)) + return out +def tile_path(la, lo): return COP / f"Copernicus_DSM_COG_10_{'N' if la >= 0 else 'S'}{abs(la):02d}_00_{'E' if lo >= 0 else 'W'}{abs(lo):03d}_00_DEM.tif" + +def cache_key(*parts): + """Short digest of everything a cached array was computed from. A cache file is read only under the key of its own inputs, so a changed preset field, tile list or baker constant never meets a stale file.""" + h = hashlib.sha256() + for q in parts: h.update(q.tobytes() if isinstance(q, np.ndarray) else repr(q).encode()); h.update(b'|') + return h.hexdigest()[:12] +def mosaic_key(p): return cache_key('mosaic.v1', sorted(tiles_for(p)), 3600) + +_mos = {} +def mosaic(p): + """Tile grid covering the circle (bounding rows/cols), cached as .npy per preset. Missing tiles (open sea has no GLO-30 tile) are zero.""" + key = (p['id'], mosaic_key(p)) + if key in _mos: return _mos[key] + ts = tiles_for(p); las = [t[0] for t in ts]; los = [t[1] for t in ts]; lat_top = max(las) + 1; lon_left = min(los) + c = B / f"mosaic-{p['id']}-{key[1]}.npy" + if c.exists(): m = np.load(c, mmap_mode='r') + else: + rows = [] + for la in range(max(las), min(las) - 1, -1): + rows.append(np.concatenate([tifffile.imread(tile_path(la, lo)) if tile_path(la, lo).exists() else np.zeros((3600, 3600), np.float32) for lo in range(min(los), max(los) + 1)], axis=1)) + m = np.concatenate(rows, axis=0).astype(np.float32); np.save(c, m) + _mos[key] = (m, lat_top, lon_left); return _mos[key] + +def bil(a, lat_top, lon_left, lat, lon): + y = (lat_top - lat) * 3600 - 0.5; x = (lon - lon_left) * 3600 - 0.5 + y0 = np.clip(np.floor(y).astype(int), 0, a.shape[0] - 2); x0 = np.clip(np.floor(x).astype(int), 0, a.shape[1] - 2) + fy = np.clip(y - y0, 0, 1); fx = np.clip(x - x0, 0, 1) + return (a[y0, x0] * (1 - fx) * (1 - fy) + a[y0, x0 + 1] * fx * (1 - fy) + a[y0 + 1, x0] * (1 - fx) * fy + a[y0 + 1, x0 + 1] * fx * fy) + +def configure(p): + """Set the module state for a preset: observer, eye elevation (DEM ground + eye height, or ground_override), rest azimuth (az_center: where the view looks at rest; the ring itself is absolute compass, column 0 = north).""" + global P + P = p; m, lt, ll = mosaic(p) + ground = p['ground_override_m'] if 'ground_override_m' in p else float(bil(m, lt, ll, np.array(p['lat']), np.array(p['lon']))) + P['ground_m'] = ground; P['eye_m'] = ground + p['eye_h_m'] + if 'look_at' in p: + la, lo = p['look_at']; P['az_center'] = (math.degrees(math.atan2((lo - p['lon']) * math.cos(math.radians(p['lat'])), la - p['lat'])) + 360) % 360 + else: P['az_center'] = p['az_deg'] + return P + +def ring_cols(a, c0, n): + """n columns of the ring array a (last axis W) from column c0 (negative or past W wraps): the one periodic take, the wrap at 0 / 360 degrees is handled here.""" + return np.take(a, (c0 + np.arange(n)) % W, axis=-1) + +# ====================================================================== authored sub-DEM foreground detail (Aetheria / CultMath ridged multifractal) +def _frac(v): return v - np.floor(v) +def _hash2(x, y): return _frac(np.sin(x * 127.1 + y * 311.7) * 43758.5453) # cultmath_hash(vec2), as Ratatoskr noise.ts +def _vnoise2(x, y): # cultmath_value_noise: 4 hashed corners, smoothstep blend + cx, cy = np.floor(x), np.floor(y); u = x - cx; v = y - cy; u = u * u * (3 - 2 * u); v = v * v * (3 - 2 * v) + a, b, c, d = _hash2(cx, cy), _hash2(cx + 1, cy), _hash2(cx, cy + 1), _hash2(cx + 1, cy + 1) + return (a + (b - a) * u) * (1 - v) + (c + (d - c) * u) * v +LACUN, WEIGHT_GAIN, AMP_GAIN, CRAG = 2.07, 2.0, 0.5, 0.5 # ridgeWorld.ts constants +DETAIL = dict(cell_m=60.0, octaves=4, amp_m=24.0, fade_from_m=500.0, fade_to_m=4000.0, seed=17) +def detail_height(E, N, dist): + """Ridged multifractal (ridgeWorld.ts `profile`, folded value noise weighted by the previous octave) in WORLD metres (east, north of the observer), + so it is automatically periodic around the ring. First octave wavelength = 60 m = two GLO-30 cells (nothing coarser than the DEM can resolve is + touched), then x2.07. Amplitude fades to zero between fade_from and fade_to metres of distance. Seeded, deterministic, authored.""" + cfg = DETAIL; e = 0.03 + (1 - CRAG) * 0.4; top = math.sqrt(1 + e * e); s = 0.0; nrm = 0.0; amp = 1.0; f = 1.0 / cfg['cell_m']; w = 1.0 + for k in range(cfg['octaves']): + v = 2 * _vnoise2(E * f + cfg['seed'] * 7.31, N * f + cfg['seed'] * 3.17 + k * 13) - 1 + sig = (1 - np.sqrt(v * v + e * e) / top) ** 2 * w; w = np.minimum(1.0, sig * WEIGHT_GAIN); s = s + sig * amp; nrm += amp; amp *= AMP_GAIN; f *= LACUN + t = np.clip((dist - cfg['fade_from_m']) / (cfg['fade_to_m'] - cfg['fade_from_m']), 0, 1); fade = 1 - t * t * (3 - 2 * t) + return cfg['amp_m'] * fade * (s / nrm - 0.3) + +# ====================================================================== stage 0: march +NEAR_CLIP_M = 500.0 # authored: the far march's first sample and the boundary of parallax authority: coverage, seams, the encoding range, distance_m and r_max read terrain at or beyond it. The ground under it is the near march (near_march), drawn by card 0 only +def schedule(detail): + d = [NEAR_CLIP_M] + while d[-1] < P['rmax_km'] * 1000: + d.append(d[-1] + min(250.0, max(10.0 if detail else 40.0, 0.004 * d[-1]))) + return np.array(d) + +def elev(h, d, curvature=True): + """Elevation angle (degrees) of height h (m) at distance d (m) from the eye: Earth curvature with refraction. The one formula of march and prefilter.""" + drop = d * d / (2 * R_EARTH) * (1 - KREF) if curvature else 0.0 + return np.degrees(np.arctan2(h - P['eye_m'] - drop, d)) + +def march(detail=False, curvature=True): + m, lt, ll = mosaic(P); az = np.radians((np.arange(W) + 0.5) / W * 360.0); d = schedule(detail); cosl = math.cos(math.radians(P['lat'])) + A = np.zeros((len(d), W), np.float32); Hh = np.zeros_like(A); sa, ca = np.sin(az), np.cos(az) + for k, dk in enumerate(d): + lat = P['lat'] + dk * ca / 111320.0; lon = P['lon'] + dk * sa / (111320.0 * cosl) + h = bil(m, lt, ll, lat, lon) + if detail and dk < DETAIL['fade_to_m']: h = h + detail_height(dk * sa, dk * ca, dk) + A[k] = elev(h, dk, curvature); Hh[k] = h + return d, A, Hh + +def rays_key(detail): + """Inputs of the ray march: observer, eye elevation, range, the DEM mosaic, the sample schedule (hashed as the array it produces), the Earth / refraction constants, the ring width, and (detail) the foreground detail noise.""" + return cache_key('rays.v1', P['lat'], P['lon'], P['rmax_km'], round(float(P['eye_m']), 3), mosaic_key(P), schedule(detail), R_EARTH, KREF, W, bool(detail), + (sorted(DETAIL.items()), LACUN, WEIGHT_GAIN, AMP_GAIN, CRAG) if detail else None) +def stage0(detail=False, force=False): + c = B / f"rays-{P['id']}{'-detail' if detail else ''}-{rays_key(detail)}.npz" + if c.exists() and not force: + z = np.load(c); return z['d'], z['ang'], z['h'], None + t0 = time.time(); mosaic(P); t1 = time.time(); d, A, Hh = march(detail); t2 = time.time(); np.savez(c, d=d, ang=A, h=Hh) + return d, A, Hh, dict(mosaic=t1 - t0, march=t2 - t1, samples=len(d)) + +# ====================================================================== the near march: the ground under the near clip +NEAR_START_M = 1.0 # authored: the ray of the frame bottom meets flat ground from a 1.6 m eye farther out than this; a 5 m start leaves a wall at grandcanyon h100, where the ground at 5 m stands 8 degrees up +def near_schedule(): + """Sample distances (m) of the near march: NEAR_START_M, then steps of max(1 m, 0.02 d) capped at 10 m, every sample below NEAR_CLIP_M (about 170).""" + d = [NEAR_START_M] + while d[-1] + min(10.0, max(1.0, 0.02 * d[-1])) < NEAR_CLIP_M: d.append(d[-1] + min(10.0, max(1.0, 0.02 * d[-1]))) + return np.array(d) +def near_march(sigma_m=0.0): + """(d, a, h) of the ground under the near clip: the place's own DEM, bilinear, sampled along near_schedule() on all W columns in float64 (no cache: one pass is about 170 x 6400 samples), low-passed with the place's own prefilter (sigma_m = prefilter_m) like the far march.""" + m, lt, ll = mosaic(P); az = np.radians((np.arange(W) + 0.5) / W * 360.0); d = near_schedule(); cosl = math.cos(math.radians(P['lat'])); sa, ca = np.sin(az), np.cos(az) + h = np.stack([np.asarray(bil(m, lt, ll, P['lat'] + dk * ca / 111320.0, P['lon'] + dk * sa / (111320.0 * cosl)), np.float64) for dk in d]); a, h = prefilter(d, h, sigma_m) + return d, a, h +def join_near(d, a, h, near): + """The one join of the near march to the far march (d, a, h: (K, W), set_view done): returns (D, A, Hc, nrm) for cards, near samples first. The near angles are capped per column at the angle of the far march's first sample, a[0]: the near ground draws inside the silhouette of the terrain at the clip + and no near hill rises above it (ruling ridge-near-ground-outline). The normals of the two marches are computed apart and concatenated, so the far normals are those of the far march alone. Needs the whole ring (the cap and the lateral normal read ring columns): cut the tiles from the result.""" + dn, an, hn = near; a = np.asarray(a); an = np.minimum(an, a[0][None, :]); nn, nf = normals(dn, hn), normals(d, h) + return np.concatenate([dn, d]), np.concatenate([an, a]), np.concatenate([hn, h]), tuple(np.concatenate([x, y]) for x, y in zip(nn, nf)) + +# ====================================================================== periodic helpers + +# ====================================================================== prefilter: the march is a heightfield of roofs and hills; the cards want the hills +def prefilter(d, h, sigma_m): + """Gaussian low-pass of the ray heights h (K, W): along each ray with sigma sigma_m metres (weighted by sample spacing, the schedule is not uniform), then across rays at equal distance with + sigma = sigma_m / (d * COLW) columns (periodic, exact in the Fourier domain). Angles are recomputed from the filtered heights with elev. Returns (angles, heights); sigma_m 0 leaves the heights as they are.""" + d = np.asarray(d, np.float64); h = np.asarray(h, np.float64) + if sigma_m > 0: + f = np.fft.rfftfreq(h.shape[1]); sc = sigma_m / (d * COLW) + h = np.fft.irfft(np.fft.rfft(h, axis=1) * np.exp(-2 * (np.pi * f[None, :] * sc[:, None]) ** 2), n=h.shape[1], axis=1) + dd = np.gradient(d); out = np.empty_like(h) + for k in range(len(d)): + r = int(min(3 * sigma_m / dd[k] + 1, 60)); lo, hi = max(0, k - r), min(len(d), k + r + 1) + w = np.exp(-0.5 * ((d[lo:hi] - d[k]) / sigma_m) ** 2) * dd[lo:hi]; out[k] = (w[:, None] * h[lo:hi]).sum(0) / w.sum() + h = out + return elev(h, d[:, None]), h + +def normals(d, h): + """Surface normal at every ray sample (n_r, n_t, n_up), each (K, W): n_r along the ray, n_t across it (towards increasing azimuth), n_up vertical. The slopes are the ray's own dh/dd and the difference of the + neighbouring columns at the SAME sample (equal distance, never equal row) over 2 d COLW, both times the authored vertical exaggeration PXDEG_V / HPX_DEG, so a face reads as steep as the view draws it.""" + d = np.asarray(d, np.float64); h = np.asarray(h, np.float64); E = PXDEG_V / HPX_DEG + sr = E * np.gradient(h, d, axis=0); st = E * (np.roll(h, -1, axis=1) - np.roll(h, 1, axis=1)) / (2 * d[:, None] * COLW); nz = 1.0 / np.sqrt(1 + sr * sr + st * st) + return -sr * nz, -st * nz, nz + +# ====================================================================== the authored Y mapping +GROUND_ROWS_MIN = 150 # rows every bake keeps under the horizon: (1 - HORIZON_AT) x plane_h / RIDGE_BAND_FRAC of the runtime (view.ts groundRowsNeeded; ridgeAssets.test pins the two together) +E_MIN = 0.5 # the vertical exaggeration may go down to this to keep GROUND_ROWS_MIN (ruling ridge-ground-rows-below-horizon) +def set_view(skyline, sky_row=0.04, near_row=0.66): + """AUTHORED vertical mapping, linear in elevation angle: row = (TOP_DEG - angle) * PXDEG_V over the whole 600-row frame (cylindrical, horizontal 17.78 px/deg). skyline is the highest angle any sample reaches in each + ring column (W,), straight from the march. Three anchors on the whole ring (rulings ridge-ring-vertical-anchors, ridge-ground-rows-below-horizon): the highest skyline angle of the ring sits at `sky_row` (4%) of the frame height, the LOWEST sits at + `near_row` (66%) where the scale allows, and the horizon keeps GROUND_ROWS_MIN rows under it. PXDEG_V = the lesser of (near_row - sky_row) * 600 / (highest - lowest) and (600 - GROUND_ROWS_MIN - sky_row * 600) / highest, clamped to + [E_MIN, 10] x 17.78 px/deg = vertical exaggeration 0.5x..10x; a skyline whose highest angle cannot keep the ground rows even at E_MIN refuses (Refusal naming sky_deg, the scale needed and the floor). + TOP_DEG = highest + sky_row*600/PXDEG_V; BOTTOM_DEG = TOP_DEG - 600/PXDEG_V. Returns the view, with `binds` naming the anchor that set the scale: 'skyline', 'horizon', 'floor' or 'ceiling'.""" + global rowang, PXDEG_V, TOP_DEG, BOTTOM_DEG + sk = np.asarray(skyline); sky = float(sk.max()); low = float(sk.min()); lo, hi = E_MIN * HPX_DEG, 10 * HPX_DEG + fit = (near_row - sky_row) * H / max(sky - low, 0.05); hold = (H - GROUND_ROWS_MIN - sky_row * H) / sky if sky > 0 else math.inf + if hold < lo: raise Refusal(f"the whole-ring skyline reaches {sky:.2f} degrees: holding {GROUND_ROWS_MIN} rows under the horizon needs {hold:.2f} px/deg, below the floor {lo:.2f} px/deg ({E_MIN:g}x)") + ppd = float(np.clip(min(fit, hold), lo, hi)); binds = 'horizon' if hold < fit and ppd == hold else 'floor' if ppd == lo else 'ceiling' if ppd == hi else 'skyline' + PXDEG_V = ppd; TOP_DEG = sky + sky_row * H / ppd; BOTTOM_DEG = TOP_DEG - H / ppd; rowang = TOP_DEG - (np.arange(H) + 0.5) / PXDEG_V + return dict(top_deg=TOP_DEG, bottom_deg=BOTTOM_DEG, px_per_deg=PXDEG_V, exaggeration=PXDEG_V / HPX_DEG, horizon_row=TOP_DEG * PXDEG_V, sky_deg=sky, low_deg=low, sky_row=sky_row, near_row=near_row, binds=binds) + +# ====================================================================== coverage and seams +COV_BINS = 160 # log-distance bins between the first and the last sample +SIG_B = 1.5 # blur of the coverage along depth (bins): seams settle in gaps +SEAM_LAM, SEAM_UNARY = 2.0, 0.25 # forward energy: a seam that moves a bin between neighbouring columns pays SEAM_LAM per bin plus every visible row it sweeps; one that sits in visible terrain pays SEAM_UNARY x those rows (cross-fadable) +SEAM_PRIOR = 0.02 # the authored depth is a faint pull, rows per nat^2 (the tests pin the window: six synthetic receding ridges, a sawtooth round the ring, tear at 0.05, and without the swept-rows term at 0.02 they tear too) +SEAM_SEP = 0.4 # seams at least this far apart in log-distance (nat) +XF = 0.07 # half-width of a seam's cross-fade, nat (about two bins) + +def log_edges(d, nb=COV_BINS): L = np.log(np.asarray(d, np.float64)); return np.linspace(L[0], L[-1] + 1e-9, nb + 1) + +def opaque(a): + """Coverage 0..1 of every frame row by the opaque view of angles a (K, n): the share of the row's angular span under the column skyline.""" + p = 1.0 / PXDEG_V; lo = rowang - 0.5 * p; return np.clip((np.asarray(a, np.float64).max(0)[None, :] - lo[:, None]) / p, 0, 1) + +def coverage(d, a, nb=COV_BINS): + """(nb, n): rows of the opaque view first revealed by the samples of each log-distance bin, per column. The first sample reveals every row from the frame bottom up to its angle, so the rows below it (nearer than it) count in bin 0. Needs set_view.""" + a = np.asarray(a, np.float64); edges = log_edges(d, nb); kb = np.clip(np.searchsorted(edges, np.log(d), 'right') - 1, 0, nb - 1) + runmax = np.maximum.accumulate(a, axis=0); prev = np.vstack([np.full((1, a.shape[1]), BOTTOM_DEG), runmax[:-1]]) + C = np.zeros((nb, a.shape[1])); np.add.at(C, kb, np.clip(np.minimum(a, TOP_DEG) - np.maximum(prev, BOTTOM_DEG), 0, None) * PXDEG_V) + return C + +def _dt(f, u): + """out[i] = min_k f[k] + |u[i] - u[k]| along axis 0, u increasing: two cumulative-minimum passes (Felzenszwalb & Huttenlocher's L1 distance transform).""" + u = u.reshape((-1,) + (1,) * (f.ndim - 1)); return np.minimum(np.minimum.accumulate(f - u, axis=0) + u, np.flip(np.minimum.accumulate(np.flip(f + u, 0), axis=0), 0) - u) + +def seams(cov, targets, d): + """(K, n) ordered seam distances (m), one per authored target (m), each column of a RING (cov is periodic: the last column neighbours the first). One 1D forward-energy DP per seam, in target order (seam carving, Avidan & Shamir 2007; forward energy, Rubinstein et al. 2008): unary + SEAM_UNARY x the rows at the seam; moving a bin between neighbouring columns costs SEAM_LAM per bin plus the rows swept, an L1 distance in u = cumsum(rows) + SEAM_LAM x bin; a weak prior to the target. Seam k is held at + least SEAM_SEP nat beyond seam k-1 in every column. Sequential, not joint: a joint DP has NB^K states per column and seams in gaps do not interact. Periodic: the DP runs over the ring three times side by side and keeps the middle lap, + so a seam is continuous across the wrap and a tile boundary is only a crop.""" + cov = np.tile(np.asarray(cov, np.float64), (1, 3)); nb, n3 = cov.shape; n = n3 // 3; edges = log_edges(d, nb); bc = 0.5 * (edges[:-1] + edges[1:]); sep = int(math.ceil(SEAM_SEP / (edges[1] - edges[0]))); INF = 1e12 + r = int(3 * SIG_B) + 1; kern = np.exp(-0.5 * (np.arange(-r, r + 1) / SIG_B) ** 2); kern /= kern.sum(); pad = np.pad(cov, ((r, r), (0, 0)), mode='edge'); Cs = sum(kv * pad[i:i + nb] for i, kv in enumerate(kern)) + bins = np.arange(nb); lo = np.zeros(n3, int); out = np.zeros((len(targets), n3)) + for t, T in enumerate(targets): + prior = SEAM_PRIOR * (bc - math.log(T)) ** 2; need = np.minimum(lo + (sep if t else 0), nb - 1); feas = bins[:, None] >= need[None, :] + warp = lambda x: np.cumsum(0.5 * (cov[:, x - 1] + cov[:, x])) + SEAM_LAM * bins + cost = np.where(feas[:, 0], SEAM_UNARY * Cs[:, 0] + prior, INF); store = [cost] + for x in range(1, n3): cost = np.where(feas[:, x], _dt(cost, warp(x)) + SEAM_UNARY * Cs[:, x] + prior, INF); store.append(cost) + j = np.zeros(n3, int); j[-1] = int(np.argmin(store[-1])) + for x in range(n3 - 1, 0, -1): u = warp(x); j[x - 1] = int(np.argmin(store[x - 1] + np.abs(u - u[j[x]]))) + out[t] = np.exp(bc[j]); lo = j + return out[:, n:2 * n] + +# ====================================================================== cards: layered depth, one per band between seams +GRASS, FOREST, ROCK, SNOW = (0.36, 0.44, 0.26), (0.22, 0.31, 0.20), (0.47, 0.44, 0.41), (0.93, 0.95, 0.97) +def albedo(h, n_up): + """The authored material, a few numbers: valley green to forest to rock by height, rock where the face is steep, snow above the tree line. Straight colour, no light in it.""" + t = lambda a, b: np.clip((h - a) / (b - a), 0, 1)[..., None]; c = np.asarray(GRASS) + (np.asarray(FOREST) - GRASS) * t(150, 900); c = c + (np.asarray(ROCK) - c) * t(1300, 2000) + c = c + (np.asarray(ROCK) - c) * np.clip((0.93 - n_up) / 0.25, 0, 1)[..., None]; return c + (np.asarray(SNOW) - c) * (t(1900, 2300) * np.clip((n_up - 0.55) / 0.3, 0, 1)[..., None]) + +def cards(d, a, h, seams, nrm=None): + """K+1 cards, nearest first, from the angles a and heights h (samples, n) of n columns and the (K, n) seams (m). Card i holds per pixel the FIRST VISIBLE hit at or beyond seam i-1 (less XF): layered depth, so a farther + card keeps the terrain a nearer ridge hides. Its alpha is that pixel's coverage (a crest row holds the share of its angular span under the card's running maximum) times 1 - smoothstep over seam i +- XF in + log-distance of the hit; card 0 owns the rows below the first sample, the last card has no far edge. Alphas are then made nested so the alpha-over composite of all cards is exactly the opaque coverage (a row two + cards both hold partly is not counted twice). Distance and normal are interpolated between sample k-1 and k by angle. Each card is cropped to the rows where its 8-bit alpha is not zero. + nrm is normals(d, h) of the same columns (default: computed from h as given, so pass it for columns cut from the ring: the lateral slope reads the neighbouring columns). Rows of any card below the angle of its first sample (hit and idx == 0) are its wall: they keep that sample's distance, their albedo is the ground material at their height with the face up (n_up = 1), + and `wall` flags them (card 0's first sample is the near march's NEAR_START_M, so no row of it is wall under a real frame). Card 0 draws the near march (join_near; the samples nearer than NEAR_CLIP_M) under the silhouette of the terrain at the clip as ordinary terrain: its own normal, the albedo of its own height and n_up; `near` (h, n) bool flags the pixels whose hit lies on the near side of the clip sample (the rows that were card 0's wall), whose distance is then never above the clip. Each card: dict(top, alpha (h,n), albedo (h,n,3), n_r, n_t, logd (ln metres) (h,n), wall (h,n) bool, near (h,n) bool).""" + d = np.asarray(d, np.float64); a = np.asarray(a, np.float64); h = np.asarray(h, np.float64); seams = np.asarray(seams, np.float64); nk, n = a.shape; nc = len(seams) + 1 + if d[0] >= NEAR_CLIP_M: raise Refusal(f"card 0 draws the ground under the near clip from the near march, but the first sample is at {d[0]:g} m (the clip is {NEAR_CLIP_M:g} m): pass join_near") + n_r, n_t, n_u = nrm if nrm is not None else normals(d, h); ld = np.broadcast_to(np.log(d)[:, None], (nk, n)); p = 1.0 / PXDEG_V; lo = rowang - 0.5 * p; kn = int(np.searchsorted(d, NEAR_CLIP_M)) # kn: the samples nearer than the clip + ks0 = [np.searchsorted(d, seams[i - 1] * math.exp(-XF)) for i in range(1, nc)]; ks1 = [np.searchsorted(d, seams[i] * math.exp(XF)) for i in range(nc - 1)] + F = np.zeros((nc, H, n)); X = np.ones((nc, H, n)); G = np.zeros((nc, 5, H, n)); Wl = np.zeros((nc, H, n), bool); Nr = np.zeros((nc, H, n), bool) # coverage, far fade, then (logd, h, n_r, n_t, n_u); wall rows; near rows (the ground under the clip) + for x in range(n): + for i in range(nc): + k0 = 0 if i == 0 else int(ks0[i - 1][x]); k1 = nk if i == nc - 1 else int(ks1[i][x]) + if k1 <= k0: continue + rm = np.maximum.accumulate(a[k0:k1, x]); idx = np.searchsorted(rm, lo, 'right'); hit = idx < len(rm); idx = np.minimum(idx, len(rm) - 1); kk = k0 + idx + if not hit.any(): continue + kp = np.maximum(kk - 1, k0); prev = np.where(idx > 0, rm[np.maximum(idx - 1, 0)], rm[idx] - 1.0) + t = np.where(idx > 0, np.clip((rowang - prev) / np.maximum(rm[idx] - prev, 1e-9), 0, 1), 1.0); mix = lambda arr: arr[kp, x] + t * (arr[kk, x] - arr[kp, x]) + F[i, :, x] = np.where(hit, np.clip((rm[-1] - lo) / p, 0, 1), 0); lh = mix(ld) + G[i, :, :, x] = np.where(hit, np.stack([lh, mix(h), mix(n_r), mix(n_t), mix(n_u)]), 0) + Wl[i, :, x] = hit & (idx == 0); Nr[i, :, x] = hit & (kp < kn) # rows below the card's first sample: the extruded wall; hits on the near side of the clip sample (below it, or between the last near sample and it): the near ground (only card 0 reaches it) + if i < nc - 1: s = np.clip((lh - (math.log(seams[i, x]) - XF)) / (2 * XF), 0, 1); X[i, :, x] = 1 - s * s * (3 - 2 * s) + out = []; A = np.zeros((H, n)) + for i in range(nc): + part = np.where(F[i] < 1, np.clip((np.maximum(A, F[i]) - A) / np.maximum(1 - A, 1e-6), 0, 1), F[i]); al = np.where(np.rint(X[i] * part * 255) > 0, X[i] * part, 0.0); A = 1 - (1 - A) * (1 - al) + rows = np.flatnonzero(al.max(1) > 0) + if not len(rows): out.append(dict(top=0, alpha=np.zeros((0, n), np.float32), albedo=np.zeros((0, n, 3), np.float32), n_r=np.zeros((0, n), np.float32), n_t=np.zeros((0, n), np.float32), logd=np.zeros((0, n), np.float32), wall=np.zeros((0, n), bool), near=np.zeros((0, n), bool))); continue + sl = slice(int(rows[0]), int(rows[-1]) + 1); g = G[i, :, sl]; nz = np.sqrt(g[2] ** 2 + g[3] ** 2 + g[4] ** 2) + 1e-12 + out.append(dict(top=int(rows[0]), alpha=al[sl].astype(np.float32), albedo=albedo(g[1], np.where(Wl[i, sl], 1.0, g[4] / nz)).astype(np.float32), n_r=(g[2] / nz).astype(np.float32), n_t=(g[3] / nz).astype(np.float32), logd=g[0].astype(np.float32), wall=Wl[i, sl].copy(), near=Nr[i, sl].copy())) + return out diff --git a/scripts/ridge-bake/tests/mutate.py b/scripts/ridge-bake/tests/mutate.py new file mode 100644 index 00000000..34a13d45 --- /dev/null +++ b/scripts/ridge-bake/tests/mutate.py @@ -0,0 +1,125 @@ +"""Mutation check: re-introduce a cause into a COPY of the baker, run the fixtures against it, and require that at least one fails. + venv/bin/python tests/mutate.py [word ...] (runs the unmutated copy first and exits 2 if a fixture fails; prints one line per mutant whose name holds every word; exit 1 if a mutant survives or only crashes the run: a kill is an AssertionError raised by the fixtures' own code)""" +import os, shutil, subprocess, sys, tempfile +HERE = os.path.dirname(os.path.abspath(__file__)); SRC = os.path.join(HERE, '..') +MUTANTS = { # name -> (text in ridge.py or export.py, replacement) + 'seam cost: the rows a seam sweeps are not paid (it hops across a receding ridge)': ("np.cumsum(0.5 * (cov[:, x - 1] + cov[:, x])) + SEAM_LAM * bins", "SEAM_LAM * bins"), + 'seam prior pulls hard to the target (2.0, or 0.1: the seam hops across a ridge)': ("SEAM_PRIOR = 0.02 ", "SEAM_PRIOR = 2.0 "), + 'normals: the authored exaggeration is dropped': ("h = np.asarray(h, np.float64); E = PXDEG_V / HPX_DEG", "h = np.asarray(h, np.float64); E = 1.0"), + 'normals: the lateral neighbour is one sample nearer (not equal distance)': ("st = E * (np.roll(h, -1, axis=1) - np.roll(h, 1, axis=1))", "st = E * (np.roll(np.roll(h, -1, axis=1), 1, axis=0) - np.roll(h, 1, axis=1))"), + 'cards: the near edge is ignored (every card starts at sample 0)': ("k0 = 0 if i == 0 else int(ks0[i - 1][x])", "k0 = 0"), + 'cards: the farther card fades in over the window too (both cards translucent)': ("X[i, :, x] = 1 - s * s * (3 - 2 * s)", "X[i, :, x] = 1 - s * s * (3 - 2 * s); X[i + 1, :, x] = s * s * (3 - 2 * s)"), + 'cards: a crest row is all or nothing (no fractional coverage)': ("F[i, :, x] = np.where(hit, np.clip((rm[-1] - lo) / p, 0, 1), 0)", "F[i, :, x] = np.where(hit, 1.0, 0)"), + 'prefilter ignores sigma': ("if sigma_m > 0:", "if False:"), + 'prefilter across rays uses one sigma in columns (not per distance)': ("sc = sigma_m / (d * COLW)", "sc = sigma_m / (d[0] * COLW) * np.ones_like(d)"), + 'bake_id hashes geometry before colour': ("h.update(colour); h.update(geometry)", "h.update(geometry); h.update(colour)"), + 'check_cover accepts any composite': ("if bad.any(): y, x", "if False: y, x"), + 'load_preset accepts splits that do not increase': ("or any(b <= a for a, b in zip(sp, sp[1:]))", ""), + 'geometry: n_r and n_t channels swapped': ("r, t = u8((np.asarray(n_r) + 1) / 2), u8((np.asarray(n_t) + 1) / 2)", "r, t = u8((np.asarray(n_t) + 1) / 2), u8((np.asarray(n_r) + 1) / 2)"), + 'geometry: log-distance not normalised by the encoding range': ("b = (np.asarray(logd) - enc['log_d_min']) / (enc['log_d_max'] - enc['log_d_min'])", "b = np.asarray(logd) / 12.0"), + 'colour: albedo zeroed in the file': ("rgb = u8(albedo) * (a[..., None] > 0)", "rgb = u8(albedo) * 0"), + 'colour: premultiplied instead of straight': ("rgb = u8(albedo) * (a[..., None] > 0)", "rgb = u8(np.asarray(albedo) * np.asarray(alpha)[..., None])"), + 'seams: the separation between seams is ignored': ("SEAM_SEP = 0.4 ", "SEAM_SEP = 0.0 "), + 'elev: curvature and refraction dropped': ("drop = d * d / (2 * R_EARTH) * (1 - KREF) if curvature else 0.0", "drop = 0.0"), + 'coverage: the rows below the first sample are not counted': ("prev = np.vstack([np.full((1, a.shape[1]), BOTTOM_DEG), runmax[:-1]])", "prev = np.vstack([np.full((1, a.shape[1]), 100.0), runmax[:-1]])"), + 'coverage: the rows below the first sample are counted twice': ("* PXDEG_V)\n return C", "* PXDEG_V); C[0] += np.clip(np.minimum(a[0], TOP_DEG) - BOTTOM_DEG, 0, None) * PXDEG_V\n return C"), + 'cards: the hit is not interpolated between samples': ("t = np.where(idx > 0, np.clip((rowang - prev) / np.maximum(rm[idx] - prev, 1e-9), 0, 1), 1.0)", "t = np.ones_like(rowang)"), + 'cards: the blended normal is not renormalised': ("nz = np.sqrt(g[2] ** 2 + g[3] ** 2 + g[4] ** 2) + 1e-12", "nz = 1.0"), + 'wall: no row is flagged (the flag is dropped)': ("Wl[i, :, x] = hit & (idx == 0)", "Wl[i, :, x] = False"), + 'near: the cap to the silhouette of the terrain at the clip is dropped': ("an = np.minimum(an, a[0][None, :])", "an = an"), + 'near: rows under the clip are flagged wall': ("Wl[i, :, x] = hit & (idx == 0); Nr[i, :, x] = hit & (kp < kn)", "Wl[i, :, x] = hit & ((idx == 0) | (kp < kn)); Nr[i, :, x] = hit & (kp < kn)"), + 'near: albedo takes the face up (the wall rule on near rows)': ("albedo(g[1], np.where(Wl[i, sl], 1.0, g[4] / nz))", "albedo(g[1], np.where(Wl[i, sl] | Nr[i, sl], 1.0, g[4] / nz))"), + 'near: albedo reads the height of the far march first sample': ("albedo(g[1], np.where(Wl[i, sl]", "albedo(np.where(Nr[i, sl], h[int(np.searchsorted(d, NEAR_CLIP_M))][None, :], g[1]), np.where(Wl[i, sl]"), + 'near: the march starts at 20 m': ("NEAR_START_M = 1.0 ", "NEAR_START_M = 20.0 "), + 'near: the heights are stored float32': (", np.float64) for dk in d])", ", np.float32) for dk in d])"), + 'near: the place prefilter is not applied': ("; a, h = prefilter(d, h, sigma_m)\n", "; a, h = prefilter(d, h, 0.0)\n"), + 'near: the far normals are computed over the joined march (not apart)': ("nn, nf = normals(dn, hn), normals(d, h)", "nj_ = normals(np.concatenate([dn, d]), np.concatenate([hn, h])); nn, nf = tuple(x[:len(dn)] for x in nj_), tuple(x[len(dn):] for x in nj_)"), + 'near: cards accepts a march that starts at the clip': ("if d[0] >= NEAR_CLIP_M: raise Refusal", "if False: raise Refusal"), + 'pack: near pixels count as solid terrain': ("solid = (al >= 0.5) & ~wl & ~nr;", "solid = (al >= 0.5) & ~wl;"), + 'pack: the non-wall fallback pool reads near pixels': ("((al > 0) & ~wl & ~nr, ld)", "((al > 0) & ~wl, ld)"), + 'pack: the lit fallback pool reads near pixels': ("((al > 0) & ~nr, ld)", "(al > 0, ld)"), + 'pack: the apron fallback pool reads near pixels': ("((c['alpha'] > 0) & ~c['near'], c['logd'])", "(c['alpha'] > 0, c['logd'])"), + 'pack: a tile with nothing outside the near ground is not at the clip': ("if pool else ridge.NEAR_CLIP_M", "if pool else 0.0"), + 'r_max: the tile median binds, not the nearest terrain': ("r_max = solve_r_max(near, bands, ppd); r_fwd = solve_r_max(near, bands, ppd, phis=1)", "r_max = solve_r_max(dist, bands, ppd); r_fwd = solve_r_max(dist, bands, ppd, phis=1)"), + 'r_max: near pixels do not bind at the clip': ("ridge.NEAR_CLIP_M if ((al >= 0.5) & nr).any() else None", "None"), + 'r_max: near pixels bind only in a tile with no other solid pixel': ("ridge.NEAR_CLIP_M if ((al >= 0.5) & nr).any() else None", "ridge.NEAR_CLIP_M if ((al >= 0.5) & nr).any() and not solid.any() else None"), + 'r_max: near pixels bind only where they outnumber the solid ones': ("ridge.NEAR_CLIP_M if ((al >= 0.5) & nr).any() else None", "ridge.NEAR_CLIP_M if ((al >= 0.5) & nr).sum() > solid.sum() else None"), + 'r_max: the nearest pixel is the farthest solid one': ("float(np.exp(ld[solid].min())) if solid.any() else None, ridge", "float(np.exp(ld[solid].max())) if solid.any() else None, ridge"), + 'near clip: the writer compares the float32 distance strictly': ("if rmin < ridge.NEAR_CLIP_M * (1 - 1e-5): raise", "if rmin < ridge.NEAR_CLIP_M: raise"), + 'near clip: the march starts nearer than the clip': ("d = [NEAR_CLIP_M]", "d = [100.0]"), + 'near clip: a card 0 inside the clip is accepted by the writer': ("if rmin < ridge.NEAR_CLIP_M * (1 - 1e-5): raise", "if False: raise"), + 'view: the 1x floor is back': ("lo, hi = E_MIN * HPX_DEG, 10 * HPX_DEG", "lo, hi = HPX_DEG, 10 * HPX_DEG"), + 'view: the horizon anchor is dropped (the scale is the skyline fit alone)': ("ppd = float(np.clip(min(fit, hold), lo, hi))", "ppd = float(np.clip(fit, lo, hi))"), + 'view: a skyline that cannot hold the ground rows is not refused': ("if hold < lo: raise", "if False: raise"), + 'view: the ground rows are not asked for (GROUND_ROWS_MIN 0)': ("GROUND_ROWS_MIN = 150 ", "GROUND_ROWS_MIN = 0 "), + 'validate_manifest: a plane short of its ground rows is accepted': ("if v['plane_h'] - v['horizon_row'] < ridge.GROUND_ROWS_MIN - 1e-6: raise", "if False: raise"), + 'wall: albedo takes the face normal, not the face up': ("np.where(Wl[i, sl], 1.0, g[4] / nz)", "g[4] / nz"), + 'wall: the code is not written to the geometry': ("if wall is not None: m = np.asarray(wall, bool)", "if False: m = np.asarray(wall, bool)"), + 'wall: the sheet lights wall rows with their normal': ("wall = c['wall']; n_r, n_t = np.where(wall, 0.0, c['n_r']), np.where(wall, 0.0, c['n_t'])", "n_r, n_t = c['n_r'], c['n_t']"), + 'ring: the seam DP is not periodic (the first lap is kept, not the middle)': ("return out[:, n:2 * n]", "return out[:, :n]"), + 'ring: the tile take does not wrap (the ring ends repeat their edge column)': ("return np.take(a, (c0 + np.arange(n)) % W, axis=-1)", "return np.take(a, np.clip(c0 + np.arange(n), 0, W - 1), axis=-1)"), + 'tile: the apron is shifted (a tile starts at its own first column)': ("ridge.ring_cols(x, t * TILE_W - APRON, TILE_W + 2 * APRON)", "ridge.ring_cols(x, t * TILE_W, TILE_W + 2 * APRON)"), + 'tile: the seams are cut from tile 0 for every tile': ("cols(sm, t), tuple(cols(x, t) for x in nrm)", "cols(sm, 0), tuple(cols(x, t) for x in nrm)"), + 'view: the vertical anchors read the first 72 degrees only (the old window)': ("sk = np.asarray(skyline); sky", "sk = np.asarray(skyline)[:1280]; sky"), + 'bake_id: card-major instead of tile-major': ("bake_id(text, [(e['colour'], e['geometry']) for row in tiles for e in row if e])", "bake_id(text, [(row[i]['colour'], row[i]['geometry']) for i in range(k) for row in tiles if row[i]])"), + 'bake_id: the manifest is not hashed (a manifest moves under its id)': ("h = hashlib.sha256(); h.update(manifest_text.encode('utf-8'))", "h = hashlib.sha256()"), + 'bake_id: the manifest is hashed with the id already in it (the blank is skipped)': ("bid = bake_id(text, [", "bid = bake_id(text.replace(BAKE_ID_BLANK, '111111111111'), ["), + 'write: the per-tile cover check is dropped': ("except Refusal as ex: raise Refusal(f'tile {t}: {ex}')", "except Refusal as ex: pass"), + 'write: the apron width is not checked': ("if c.shape[1] != w: raise", "if False: raise"), + 'budget: the tile cap is ignored': ("if b > TILE_BYTES_MAX: raise", "if False: raise"), + 'budget: the place cap is ignored': ("if sum(tile_bytes) > PLACE_BYTES_MAX: raise", "if False: raise"), + 'budget: the resident gate is ignored': ("if res > RESIDENT_BYTES_MAX: raise", "if False: raise"), + 'budget: the resident run does not wrap the ring': ("sum(per[(t + k) % TILES] for k in range(n))", "sum(per[t + k] for k in range(n) if t + k < TILES)"), + 'budget: the run length forgets the margin tiles': ("math.ceil(arc / TILE_DEG) + 1 + 4", "math.ceil(arc / TILE_DEG)"), + 'r_max: the camera sweeps forward only (phi = 0)': ("PHI_STEPS = 24 ", "PHI_STEPS = 1 "), + 'r_max: every card of a tile is fitted at the nearest card distance': ("fit_px(d, r, px_per_deg, phis) for d in row", "fit_px(row[0] if row[0] is not None else d, r, px_per_deg, phis) for d in row"), + 'r_max_forward: the forward offset is searched over the whole circle': ("r_fwd = solve_r_max(near, bands, ppd, phis=1)", "r_fwd = solve_r_max(near, bands, ppd)"), + 'r_max_forward: the resident gate is not checked at the forward offset': ("for r in (camera['r_max_m'], camera['r_max_forward_m']): check_budget", "for r in (camera['r_max_m'],): check_budget"), + 'r_max_forward: a forward offset below r_max_m is accepted': ("if camera['r_max_forward_m'] < camera['r_max_m']: raise", "if False: raise"), + 'fit: the line is the least squares of 33 uniform samples, as the first gate drew it': ("x, w = np.polynomial.legendre.leggauss(FIT_QUAD)", "x = np.linspace(-1, 1, 33); w = np.full(33, 2 / 33)"), + 'fit: the line is a two-node quadrature': ("FIT_QUAD = 48 ", "FIT_QUAD = 2 "), + 'write: the manifest is written as platform text (CRLF on Windows)': ("(tmp / 'manifest.json').write_bytes(text.encode('utf-8'))", "(tmp / 'manifest.json').write_text(text)"), + 'write: the index is written as platform text (CRLF on Windows)': ("(out / '.index.tmp').write_bytes((json.dumps(idx, indent=1) + '\\n').encode('utf-8'))", "(out / '.index.tmp').write_text(json.dumps(idx, indent=1) + '\\n')"), + 'r_max: not capped at half the nearest distance': ("cap = 0.5 * rmin", "cap = 5.0 * rmin"), + 'r_max: the resident gate is not part of the search': (" and resident_bytes(bands, run_tiles(r, rmin)) <= RESIDENT_BYTES_MAX\n", "\n"), + 'r_max: a bake below the floor is accepted': ("if r_max < R_MAX_FLOOR_M:", "if False:"), + 'pack: the distance counts wall rows': ("solid = (al >= 0.5) & ~wl & ~nr; any_solid", "solid = (al >= 0.5) & ~nr; any_solid"), + 'pack: the distance reads the apron columns too': ("inner = slice(APRON, APRON + TILE_W)", "inner = slice(0, TILE_W + 2 * APRON)"), + 'sheet: the tile boundaries are not drawn': ("def bounds(img): img[:, mark] = 0.45 * img[:, mark] + 0.55 * red; return img", "def bounds(img): return img"), + 'export: an empty card is not refused': ("if all(tile[i]['alpha'].shape[0] == 0 for tile in bake['cards']): raise", "if False: raise"), + 'rays cache key ignores the refraction constant': ("R_EARTH, KREF, W, bool(detail)", "R_EARTH, W, bool(detail)"), + 'rays cache key ignores the eye elevation': ("round(float(P['eye_m']), 3), ", ""), + 'mosaic cache key ignores the tile list': ("sorted(tiles_for(p)), 3600", "3600"), +} +EQUIVALENT = {'fit: the error is looked for between four points': "the worst error of the best line is at the viewport's two ends for every distance and offset the bound is searched over (checked against a 20001-sample brute force in test_fit_px_is_the_continuous_error); the grid only guards a shape where it is not"} # mutant name -> one line on why it is behaviourally equivalent (reported, not run) +def execute(edit): + """Run the fixtures on a COPY of the baker, with edit = (text, replacement) applied or None for the unmutated copy: (returncode or None if the text is gone, [(fixture, exception class, directory of the innermost traceback frame)] of every FAIL line, last stderr line).""" + d = tempfile.mkdtemp(); shutil.copytree(SRC, os.path.join(d, 'src'), ignore=shutil.ignore_patterns('tests', '__pycache__')) + try: + if edit: + a, b = edit; p = next((q for q in (os.path.join(d, 'src', f) for f in ('ridge.py', 'export.py')) if a in open(q).read()), None) + if p is None: return None, [], 'the mutant text is in neither ridge.py nor export.py' + s = open(p).read(); open(p, 'w').write(s.replace(a, b)) + r = subprocess.run([sys.executable, os.path.join(HERE, 'test_ridge.py')], env=dict(os.environ, RIDGE_SRC=os.path.join(d, 'src')), capture_output=True, text=True) + finally: shutil.rmtree(d) + fails = [(f[0][4:].strip(), f[1].strip(), os.path.dirname(os.path.abspath(f[2].strip()))) for f in (l.split(' | ', 3) for l in r.stdout.splitlines() if l.startswith('FAIL')) if len(f) == 4] + return r.returncode, fails, (r.stderr.strip().splitlines() or ['no output'])[-1][:200] +def run(item): + """KILLED: at least one fixture failed on an assertion the test code itself raised (an AssertionError whose innermost traceback frame lies in the tests directory). CRASHED: the run failed but no fixture did that (every FAIL is another exception, NameError or a numpy error and the like, or an assert inside the baker, or none printed, or the mutant text is gone), which proves nothing and fails the run. SURVIVED: every fixture passed.""" + name, (a, b) = item; rc, fails, err = execute((a, b)); asserts = [n for n, c, w in fails if c == 'AssertionError' and w == HERE] + state = 'CRASHED ' if rc is None or (rc and not asserts) else 'KILLED ' if rc else 'SURVIVED ' + why = ', '.join(f'{n}[{c}{"" if w == HERE else " in " + os.path.basename(w)}]' for n, c, w in fails) if fails else err + line = state + name + ' -> ' + why; print(line, file=sys.stderr, flush=True) # progress: a killed run keeps what finished + return line, state != 'KILLED ' +def baseline(): + """The unmutated copy must pass every fixture before any mutant means anything: a broken environment would kill them all.""" + rc, fails, err = execute(None) + if rc or fails: print('BASELINE FAILED: the unmutated baker does not pass its fixtures: ' + (', '.join(f'{n}[{c}]' for n, c, w in fails) or err), file=sys.stderr, flush=True); sys.exit(2) + print('BASELINE ok: the unmutated copy passes every fixture', file=sys.stderr, flush=True) +if __name__ == '__main__': + from concurrent.futures import ThreadPoolExecutor + baseline() + with ThreadPoolExecutor(int(os.environ.get('MUTATE_JOBS', '6'))) as ex: res = list(ex.map(run, [(n, v) for n, v in MUTANTS.items() if n not in EQUIVALENT and all(w in n for w in sys.argv[1:])])) + for line, _ in res: print(line, flush=True) + for n, why in EQUIVALENT.items(): print('EQUIVALENT ' + n + ' -> ' + why) + sys.exit(1 if any(sv for _, sv in res) else 0) diff --git a/scripts/ridge-bake/tests/run.sh b/scripts/ridge-bake/tests/run.sh new file mode 100755 index 00000000..f97a126c --- /dev/null +++ b/scripts/ridge-bake/tests/run.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Usage: RIDGE_PY= RIDGE_TILES= tests/run.sh [test_ridge.py|mutate.py] +# RIDGE_WORK (cache dir) defaults to a fresh directory under $TMPDIR. +: "${RIDGE_PY:?RIDGE_PY must name the python of the baker venv}" +export RIDGE_WORK="${RIDGE_WORK:-${TMPDIR:-/tmp}/ridge-bake-work}"; mkdir -p "$RIDGE_WORK" +HERE=$(cd "$(dirname "$0")" && pwd) +exec "$RIDGE_PY" -I "$HERE/${1:-test_ridge.py}" diff --git a/scripts/ridge-bake/tests/test_ridge.py b/scripts/ridge-bake/tests/test_ridge.py new file mode 100644 index 00000000..0077ae07 --- /dev/null +++ b/scripts/ridge-bake/tests/test_ridge.py @@ -0,0 +1,687 @@ +"""Fixtures for the ridge baker (march, prefilter, coverage, seams, normals, cards, export). Plain asserts, no pytest needed: venv/bin/python tests/test_ridge.py (exit code 1 on failure). +RIDGE_SRC selects the source directory (default ..) (the mutation runner points it at a patched copy). +Synthetic terrain has a known right answer; the Vienna tests bake the real preset (its rays come from stage0: RIDGE_TILES needs the tiles, or a cached rays file must exist).""" +import os, sys, math, json, shutil, tempfile, traceback +SRC = os.environ.get('RIDGE_SRC') or os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'); sys.path.insert(0, SRC) # RIDGE_WORK and RIDGE_TILES must be set (tests/run.sh sets them) +import numpy as np, ridge, export +from ridge import W, H +NW = 1280 # the synthetic bakes' window: columns 0..NW of the ring (azimuth 0..72); the pieces that need the whole ring (seams across the wrap, the tile cut) run on the ring +TW = export.TILE_W + 2 * export.APRON +_w = lambda x: ridge.ring_cols(x, 0, NW) + +EYE = 100.0; GROUND = 50.0 # ground below the eye: every ray climbs, so only the placed blocks make ridges +ridge.P = dict(id='synthetic', rmax_km=95, eye_m=100.0) +D = ridge.schedule(False) +def az_of(x): return (x + 0.5) / W * 360.0 +def col_of(az): return int(round(az / 360.0 * W - 0.5)) % W + +def rays(hfun, eye=EYE): + az = (np.arange(W) + 0.5) / W * 360.0; A = np.zeros((len(D), W), np.float32); Hh = np.zeros_like(A) + for k, dk in enumerate(D): + h = hfun(dk, az); Hh[k] = h; A[k] = np.degrees(np.arctan2(h - eye - dk * dk / (2 * ridge.R_EARTH) * (1 - ridge.KREF), dk)) + return A, Hh +def near_rays(hfun, sigma=0.0): + """The near march of a synthetic terrain: hfun over ridge.near_schedule() on all W columns, float64, prefiltered like the far march (angles from ridge.P['eye_m']): (d, a, h) as ridge.near_march returns it.""" + dn = ridge.near_schedule(); az = (np.arange(W) + 0.5) / W * 360.0; hn = np.stack([np.broadcast_to(np.asarray(hfun(dk, az), np.float64), az.shape) for dk in dn]); a, h = ridge.prefilter(dn, hn, sigma); return dn, a, h +def _join(hfun, A, Hh, sigma=0.0): + """ridge.join_near of raw far rays (K, W) and the near march of the same terrain, cut to the window 0..NW: (D, a, h, nrm) as ridge.cards reads them.""" + d, a, h, nrm = ridge.join_near(D, A, Hh, near_rays(hfun, sigma)); return d, _w(a), _w(h), tuple(_w(x) for x in nrm) +def theta(h, d): return math.degrees(math.atan2(h - EYE - d * d / (2 * ridge.R_EARTH) * (1 - ridge.KREF), d)) +def in_arc(az, a0, a1): return ((az - a0) % 360.0) <= ((a1 - a0) % 360.0) +def block(a0, a1, d0, d1, h): return lambda dk, az: np.where(in_arc(az, a0, a1) & (dk >= d0) & (dk < d1), h, 0.0) +def terrain(*blocks): return lambda dk, az: np.maximum.reduce([np.full_like(az, GROUND)] + [np.asarray(b(dk, az), float) for b in blocks]) +def test_cache_keys_follow_every_input_of_the_cached_array(): + """mosaic-/rays- cache files are keyed by a digest of their inputs. Right answer: identical inputs -> identical key (the preset id does not enter), a changed preset field (eye height, range, position), tile list or baker constant (refraction, detail noise) -> a different key.""" + saved = ridge.P + try: + base = dict(id='k1', lat=47.0, lon=11.0, rmax_km=40, eye_m=2000.0); ridge.P = dict(base); k0 = (ridge.rays_key(False), ridge.rays_key(True), ridge.mosaic_key(ridge.P)) + ridge.P = dict(base, id='other'); assert (ridge.rays_key(False), ridge.rays_key(True), ridge.mosaic_key(ridge.P)) == k0, 'the preset id changed the key' + for fld, v in (('eye_m', 2010.0), ('rmax_km', 41), ('lon', 11.001), ('lat', 47.001)): + ridge.P = dict(base, **{fld: v}); assert ridge.rays_key(False) != k0[0], ('rays key ignores', fld) + ridge.P = dict(base, lat=47.0, lon=13.5); assert ridge.mosaic_key(ridge.P) != k0[2], 'mosaic key ignores the tile list' + ridge.P = dict(base); old = ridge.KREF; ridge.KREF = 0.2 + try: assert ridge.rays_key(False) != k0[0], 'rays key ignores the refraction constant' + finally: ridge.KREF = old + old = ridge.DETAIL; ridge.DETAIL = dict(old, amp_m=30.0) + try: assert ridge.rays_key(True) != k0[1] and ridge.rays_key(False) == k0[0], 'detail key ignores the noise settings (or the plain key follows them)' + finally: ridge.DETAIL = old + finally: ridge.P = saved +def test_paths_come_from_the_environment_with_no_default(): + """Importing the baker without RIDGE_WORK / RIDGE_TILES fails with a message naming the variable (no location is assumed).""" + import subprocess; env = {k: v for k, v in os.environ.items() if not k.startswith('RIDGE_')} + for var in ('RIDGE_WORK', 'RIDGE_TILES'): + e = dict(env); e.update({'RIDGE_WORK': '.', 'RIDGE_TILES': '.'}); del e[var] + r = subprocess.run([sys.executable, '-I', '-c', 'import sys; sys.path.insert(0, %r); import ridge' % SRC], env=e, capture_output=True, text=True); assert r.returncode and var in r.stderr and 'not set' in r.stderr, (var, r.stderr[-200:]) + +# ---------------------------------------------------------------------------------------- synthetic bakes: the shared steps of export.bake_place on rays the fixtures make +def _bake(hfun, splits_km, sigma=0.0, fixed_m=None): + """prefilter, whole-ring set_view, coverage and the periodic seams on the whole ring (or fixed_m, one seam depth in m for every column), the join of the near march on the whole ring, then the window columns 0..NW (azimuth 0..72) of them and the cards on those, of synthetic rays: the pieces of the bake a fixture can look at cheaply. + D, a, h, nrm of the result are the JOINED march's window (the near samples first); opaque and edges are the far march's.""" + A, Hh = rays(hfun); ridge.P.update(eye_m=EYE); a, h = ridge.prefilter(D, Hh, sigma); v = ridge.set_view(a.max(0)); cov_ring = ridge.coverage(D, a); cov = _w(cov_ring) + sm = _w(ridge.seams(cov_ring, [k * 1000.0 for k in splits_km], D)) if fixed_m is None else np.array([np.full(NW, float(v)) for v in fixed_m]) + Dj, aj, hj, nj = ridge.join_near(D, a, h, near_rays(hfun, sigma)); aw, hw, nrm = _w(aj), _w(hj), tuple(_w(x) for x in nj) + return dict(cards=ridge.cards(Dj, aw, hw, sm, nrm), splits_km=list(splits_km), seams=sm, cov=cov, opaque=ridge.opaque(_w(a)), edges=ridge.log_edges(D), D=Dj, a=aw, h=hw, nrm=nrm, v=v) +def _canvas(card, key='alpha'): + out = np.zeros((H, NW) + card[key].shape[2:], np.float32); out[card['top']:card['top'] + card[key].shape[0]] = card[key]; return out +def _row(deg): return int(np.argmin(np.abs(ridge.rowang - deg))) +THREE = terrain(block(0, 359.99, 3000, 3600, 350), block(0, 359.99, 20000, 21500, 1800), block(0, 359.99, 70000, 72000, 7000)) # ridges at 3, 20 and 70 km, each taller in angle than the one before +WIDE3 = terrain(block(0, 359.99, 9000, 10000, 300), block(0, 359.99, 38000, 40000, 2000), block(0, 359.99, 70000, 72000, 3000)) # low near hills, then ridges at 39 and 71 km: the frame reaches below the ground at the seams (so cards have wall rows) and the horizon is inside it +WALLED = terrain(block(0, 359.99, 9000, 10000, 300), block(0, 359.99, 38000, 40000, 2000)) +def _ramp(dk, az): return np.maximum(GROUND, np.where(dk > 12000, (dk - 12000) * 0.045 + 50.0, 0.0)) # a slope the first sample of card 1 stands on: n_up about 0.9, so the material would be rock if the face counted + +def test_the_vertical_anchors_read_the_whole_ring(): + """set_view anchors the highest skyline angle of the ring at 4% of the frame and the lowest at 66%, wherever they are: a peak at column 3555 and a low at column 5333, both outside the first 72 degrees, set the mapping.""" + sk = np.full(W, 1.0); sk[3555] = 3.0; sk[5333] = -1.0; sk[10] = 1.5; v = ridge.set_view(sk) + assert v['sky_deg'] == 3.0 and v['low_deg'] == -1.0 and abs(v['px_per_deg'] - 0.62 * H / 4.0) < 1e-9 and abs(v['horizon_row'] - ridge.TOP_DEG * v['px_per_deg']) < 1e-9 and abs(ridge.TOP_DEG - (3.0 + 0.04 * H / v['px_per_deg'])) < 1e-9, v +def test_seams_fall_in_depth_gaps(): + """Three ridges at 3, 20 and 70 km: targets [6, 40] give a seam in (3, 20) and one in (20, 70) in EVERY column, ordered with at least 0.4 nat between; targets [6] give one seam in (3, 20).""" + b = _bake(THREE, [6, 40]); s = b['seams']; assert s.shape == (2, NW) + assert (s[0] > 3600).all() and (s[0] < 20000).all() and (s[1] > 21500).all() and (s[1] < 70000).all(), (s.min(1), s.max(1)); assert (np.log(s[1]) - np.log(s[0]) >= 0.4 - 1e-9).all() + s1 = _bake(THREE, [6])['seams']; assert s1.shape == (1, NW) and (s1[0] > 3600).all() and (s1[0] < 20000).all(), (s1.min(), s1.max()) +def _recede(d0, d1, thick=300.0, hgt=1500.0): + """A ridge `thick` m thick whose distance runs from d0 m at azimuth 0 to d1 m at azimuth 72, and again in every 72 degrees of the ring (so the ring's skyline is the ridge's everywhere, as the window's was).""" + return terrain(lambda dk, az: np.where(np.abs(dk - (d0 + (d1 - d0) * ((az % 72) / 72.0))) < thick / 2, hgt, 0.0)) +def _receding(dk, az): return _recede(4000.0, 15000.0)(dk, az) +def test_the_swept_rows_term_keeps_the_seam_from_hopping_under_a_stronger_pull(): + """With the authored depth pulling five times as hard (0.1 instead of 0.02) the seams of the 3-12, 4-15 (split 10) and 6-14 km ridges still follow the ridge, and twice as hard (0.04) those of the 4-15 (split 6), 5-30 and 8-40 km ridges: only the cost of the visible rows it would sweep holds it back (with that term out of the cost it hops between two columns).""" + old = ridge.SEAM_PRIOR + try: + ridge.SEAM_PRIOR = 0.1 + for d0, d1, sp in ((3, 12, 6), (4, 15, 10), (6, 14, 9)): + j0, j1, cover = _alpha_jumps(d0, d1, sp); assert j0 < 0.35 and j1 < 0.35 and cover > 0.999, ('the seam hopped across the ridge', (d0, d1, sp), j0, j1) + ridge.SEAM_PRIOR = 0.04 # these three tear above 0.04 (measured: 0.05 tears 5-30 and 8-40, 0.1 tears 4-15/6): the seam is closed on the ring, so a stronger pull makes one tear per period cheaper than staying beyond the ridge + for d0, d1, sp in ((4, 15, 6), (5, 30, 12), (8, 40, 15)): + j0, j1, cover = _alpha_jumps(d0, d1, sp); assert j0 < 0.35 and j1 < 0.35 and cover > 0.999, ('the seam hopped across the ridge', (d0, d1, sp), j0, j1) + finally: ridge.SEAM_PRIOR = old +RECEDING = [(4, 15, 6), (3, 12, 6), (5, 30, 12), (8, 40, 15), (4, 15, 10), (6, 14, 9)] # km at azimuth 0, km at azimuth 72, authored split km +def _alpha_jumps(d0, d1, split): + """The two cards' alpha on the ridge body (crest + 4 rows), column to column: the largest step of each. """ + b = _bake(_recede(d0 * 1000.0, d1 * 1000.0), [split]); c0 = _canvas(b['cards'][0]); c1 = _canvas(b['cards'][1]); crest = np.argmax(b['opaque'] > 0.5, axis=0); r = np.clip(crest + 4, 0, H - 1); ok = crest > 0 + a0 = c0[r, np.arange(NW)]; a1 = c1[r, np.arange(NW)]; return float(np.abs(np.diff(a0[ok])).max()), float(np.abs(np.diff(a1[ok])).max()), (a0 + (1 - a0) * a1)[ok].min() +def test_seam_never_splits_a_receding_ridge_side_by_side(): + """Six synthetic ridges whose distance recedes across the window (4 to 15, 3 to 12, 5 to 30, 8 to 40, 4 to 15 and 6 to 14 km, targets 6, 6, 12, 15, 10, 9 km): the nearer and the farther card's alpha on the ridge's body never jumps by 0.35 between neighbouring + columns (a tear: one card here, the other next door; fading slowly over the cross-fade is fine) and the two cards together cover the body. With the swept-rows term out of the seam cost the seam hops across the ridge; with the prior at 0.1 it hops on two of the six.""" + for d0, d1, sp in RECEDING: + j0, j1, cover = _alpha_jumps(d0, d1, sp); assert j0 < 0.35 and j1 < 0.35, ('a card appears or vanishes between neighbouring columns', (d0, d1, sp), j0, j1); assert cover > 0.999, ('the ridge body is not covered by the two cards together', (d0, d1, sp)) +def test_far_card_keeps_terrain_hidden_behind_a_nearer_ridge(): + """Layered depth: a far ridge (20 km) lower in angle than the near ridge (3 km) in azimuth 0..36 and higher in 36..72. Where the near card is opaque in front of the far ridge (columns 100..500) the mid card still holds that ridge, at its distance; + where the far ridge shows above the near one (column 900) the near card is empty and the mid card holds it.""" + b = _bake(terrain(block(0, 359.99, 3000, 3600, 350), block(0, 36, 20000, 21500, 1500), block(36, 359.99, 20000, 21500, 2400)), [6]); c0, c1 = _canvas(b['cards'][0]), b['cards'][1]; a1 = _canvas(c1); ld1 = _canvas(c1, 'logd'); r = _row(theta(1500, 20000) - 0.2) + for x in (100, 300, 500): + assert c0[r, x] > 0.99, ('the near ridge does not cover the far one here', x); assert a1[r, x] > 0.99, ('the far card lost the terrain behind the near ridge', x); assert abs(math.exp(ld1[r, x]) - 20000) < 1500, (x, math.exp(ld1[r, x])) + r = _row(0.5 * (theta(350, 3000) + theta(2400, 20000))); assert c0[r, 900] < 0.01 and a1[r, 900] > 0.99 and abs(math.exp(ld1[r, 900]) - 20000) < 1500, (c0[r, 900], a1[r, 900]) +def test_crossfade_is_complementary(): + """A ridge across the seam (seam fixed at 6 km, the ridge's front face at 5.9 km inside the cross-fade): the nearer card is partly transparent over the window, the farther card is opaque on the ridge, and the composite stays at coverage 1 below the crest.""" + hf = terrain(block(0, 359.99, 5900, 6100, 900)); A, Hh = rays(hf); ridge.P.update(eye_m=EYE); ridge.set_view(A.max(0)); aw = _w(A); Dj, aj, hj, nj = _join(hf, A, Hh) + cs = ridge.cards(Dj, aj, hj, np.full((1, NW), 6000.0), nj); c0, c1 = _canvas(cs[0]), _canvas(cs[1]); crest = int(np.argmax(ridge.opaque(aw)[:, 500] > 0.5)); r = crest + 6 + assert 0.2 < c0[r, 500] < 0.8, ('the near card does not fade over the window', c0[r, 500]); assert c1[r, 500] > 0.99, 'the far card is not opaque on the ridge' + comp = 1 - (1 - c0) * (1 - c1); assert (comp[crest + 3:, :] > 0.999).all(), 'the composite dips below coverage 1 under the crest' +def test_normals_of_a_tilted_plane(): + """A plane with front slope s (north) and lateral slope l (east), seen towards azimuth 0: n = (-E s, -E l, 1) normalised, E the authored exaggeration (a dropped E fails).""" + s, l, E = 0.12, -0.08, 3.0; saved = ridge.PXDEG_V; ridge.PXDEG_V = E * ridge.HPX_DEG + try: + az = (np.arange(W) + 0.5) / W * 2 * math.pi; h = 300.0 + s * D[:, None] * np.cos(az)[None, :] + l * D[:, None] * np.sin(az)[None, :]; nr, nt, nu = ridge.normals(D, h); k = len(D) // 2; x = [0, 1, 2, W - 2, W - 1] + want = np.array([-E * s, -E * l, 1.0]); want /= np.linalg.norm(want); got = np.array([nr[k, x].mean(), nt[k, x].mean(), nu[k, x].mean()]); assert np.abs(got - want).max() < 2e-3, (got, want) + assert np.abs(nr ** 2 + nt ** 2 + nu ** 2 - 1).max() < 1e-9 + finally: ridge.PXDEG_V = saved +def test_lateral_slope_uses_equal_distance_not_equal_row(): + """A plane with lateral slope l at 20 km, a 3 km ridge only for azimuth above 40 deg: at the 20 km samples, in the columns around the ridge's azimuth edge, the across-ray slope is the plane's own l (neighbouring columns at the same distance), not a step between the ridge and the plane.""" + l = 0.05; saved = ridge.PXDEG_V; ridge.PXDEG_V = 2.0 * ridge.HPX_DEG + try: + az = (np.arange(W) + 0.5) / W * 360.0; A, Hh = rays(lambda dk, a: np.where(dk > 10000, GROUND + l * dk * np.radians(a), GROUND) + np.where((a > 40) & (dk >= 3000) & (dk < 3600), 400.0, 0.0)) + nr, nt, nu = ridge.normals(D, Hh); k = int(np.searchsorted(D, 20000)); x0 = int(40 / 360 * W); want = -2.0 * l / math.sqrt(1 + 4 * l * l + (2.0 * 0.0) ** 2) + assert np.abs(nt[k, x0 - 20:x0 + 20] / nu[k, x0 - 20:x0 + 20] + 2.0 * l).max() < 5e-3, nt[k, x0 - 5:x0 + 5] / nu[k, x0 - 5:x0 + 5] + finally: ridge.PXDEG_V = saved +def test_prefilter_flattens_roofs_and_keeps_hills(): + """A 25 m bump 60 m wide at 2 km drops below 5 m; a 400 m hill (3 km scale) keeps at least 90% of its height.""" + ridge.P.update(eye_m=EYE); roof = lambda dk, az: GROUND + np.where((az < 1.72) & (dk >= 2000) & (dk < 2060), 25.0, 0.0) + hill = lambda dk, az: GROUND + 400.0 * np.exp(-((dk - 10000.0) / 3000.0) ** 2 - ((np.radians(((az + 180) % 360) - 180) * dk) / 3000.0) ** 2) + for f, name in ((roof, 'roof'), (hill, 'hill')): + A, Hh = rays(f); a, h = ridge.prefilter(D, Hh, 100.0); k = int(np.argmin(np.abs(D - (2030 if name == 'roof' else 10000)))); x = int(np.argmax(Hh[k])) + if name == 'roof': assert h[k, x] - GROUND < 5.0 and Hh[k, x] - GROUND >= 24.9, ('the roof survives the low-pass', h[k, x] - GROUND) + else: assert h[k, x] - GROUND >= 0.9 * 400.0, ('the hill is flattened', h[k, x] - GROUND) + assert np.allclose(ridge.prefilter(D, Hh, 0.0)[1], Hh), 'sigma 0 changed the heights' +def test_crest_rows_have_fractional_coverage(): + """The top row of a card's run has alpha equal to the share of its angular span under the running maximum, and the rows below it are 1 (a lower ridge in columns 0..640 so its crest is not at the frame's top edge).""" + hf = terrain(block(0, 36, 5000, 5600, 500), block(36, 359.99, 5000, 5600, 560)); A, Hh = rays(hf); ridge.P.update(eye_m=EYE); ridge.set_view(A.max(0)); aw = _w(A); Dj, aj, hj, nj = _join(hf, A, Hh); c = ridge.cards(Dj, aj, hj, np.zeros((0, NW)), nj)[0] + cv = _canvas(c)[:, 300]; r = int(np.argmax(cv > 0)); top = float(aw.max(0)[300]); p = 1.0 / ridge.PXDEG_V; want = (top - (ridge.rowang[r] - 0.5 * p)) / p + assert 0.0 < want < 1.0 and abs(cv[r] - want) < 0.01, (cv[r], want, r); assert (cv[r + 1:] > 0.999).all() +def test_cards_composite_to_the_opaque_view(): + """Alpha-over of all cards, last to first, equals the opaque march coverage within 0.02 everywhere, and where opaque the nearest solid card's distance is the first-hit distance of the march.""" + for hf, sp in ((THREE, [6, 40]), (terrain(_receding), [6]), (terrain(block(0, 359.99, 3000, 3600, 350), block(0, 36, 20000, 21500, 700), block(36, 359.99, 20000, 21500, 1800)), [6])): + b = _bake(hf, sp); comp = 1 - np.prod([1 - _canvas(c) for c in b['cards']], axis=0); assert np.abs(comp - b['opaque']).max() < 0.02, np.abs(comp - b['opaque']).max() + rm = np.maximum.accumulate(b['a'], axis=0); col = 640; r = _row(float(b['a'][:, col].max()) - 0.5); k = int(np.searchsorted(rm[:, col], ridge.rowang[r], 'left')); first = None + for c in b['cards']: + if _canvas(c)[r, col] > 0.99: first = math.exp(_canvas(c, 'logd')[r, col]); break + assert first is not None and abs(first - b['D'][k]) < 0.1 * b['D'][k] + 60, (first, b['D'][k]) + +# ---------------------------------------------------------------------------------------- the ring: tiles are crops of per-column results, the wrap is periodic +_RING = {} +def _ring(key, hfun, splits_km): + """export.cut_ring on synthetic rays (prefilter, whole-ring set_view, then the ring cut), cached by key: dict(bake = what export.bake_place returns, minus the place).""" + if key not in _RING: + A, Hh = rays(hfun); ridge.P.update(eye_m=EYE); a, h = ridge.prefilter(D, Hh, 0.0); v = ridge.set_view(a.max(0)); r = export.cut_ring(D, a, h, splits_km, near_rays(hfun)) + _RING[key] = dict(r, op_ring=ridge.opaque(a), place=dict(id='synthetic', name='Synthetic', lat=48.0, lon=16.0, altitude_km=0.05, eye_m=EYE, tz='Europe/Vienna'), v=v, + view=dict(look_az_deg=36.0, plane_h=H, px_per_deg_h=ridge.HPX_DEG, px_per_deg_v=v['px_per_deg'], exaggeration=v['exaggeration'], horizon_row=v['horizon_row'], sky_row=v['sky_row'] * H, near_row=v['near_row'] * H), + meta=dict(curvature=dict(r_earth_m=ridge.R_EARTH, k_ref=ridge.KREF), encoding=dict(log_d_min=math.log(D[0]), log_d_max=math.log(D[-1])))) + return _RING[key] +def _tile_canvas(card, key='alpha'): + out = np.zeros((H, TW) + card[key].shape[2:], np.float32); out[card['top']:card['top'] + card[key].shape[0]] = card[key]; return out +def _across_north(dk, az): return np.where(in_arc(az, 340, 20) & (np.abs(dk - (12000.0 + 400.0 * (((az + 180) % 360) - 180))) < 200), 1500.0, 0.0) # a ridge across the wrap at 4 km (az -20) to 20 km (az +20) +ACROSS = terrain(block(0, 359.99, 3000, 3600, 350), _across_north, block(0, 359.99, 70000, 72000, 3000), block(0.0, 0.05, 6000, 7000, 2500), block(359.95, 359.99, 6000, 7000, 2500)) # and a tower one column wide on each side of north +def test_ring_wrap(): + """A ridge across column 6399 / 0 (receding from 4 km at -20 deg to 20 km at +20 deg): the seam is continuous over the wrap (its jump there no larger than the largest jump elsewhere), tile 31's right apron equals tile 0's first columns and tile 0's left apron + tile 31's last (every card, pixel for pixel), neighbouring tiles agree on their shared apron, and the interiors of all tiles composite to the opaque ring.""" + b = _ring('across', ACROSS, [8]); sm = np.log(b['seams'][0]); jumps = np.abs(np.diff(np.append(sm, sm[0]))); assert jumps[-1] <= jumps[:-1].max() + 1e-9, ('the seam jumps over the wrap', jumps[-1], jumps[:-1].max()) + A_ = export.APRON; T_ = export.TILE_W; ring = np.zeros((H, W)); op = np.zeros((H, W)) + for t, tile in enumerate(b['cards']): + nxt = b['cards'][(t + 1) % export.TILES] + for i, c in enumerate(tile): + assert (_tile_canvas(c)[:, T_ + A_:T_ + 2 * A_] == _tile_canvas(nxt[i])[:, A_:2 * A_]).all(), ('the apron differs from the neighbour', t, i); seen = _tile_canvas(c)[:, T_ + A_:T_ + 2 * A_] > 0 + for key in ('logd', 'wall'): assert (_tile_canvas(c, key)[:, T_ + A_:T_ + 2 * A_][seen] == _tile_canvas(nxt[i], key)[:, A_:2 * A_][seen]).all(), ('the apron differs from the neighbour', t, i, key) + comp = 1 - np.prod([1 - _tile_canvas(c) for c in tile], axis=0); ring[:, t * T_:(t + 1) * T_] = comp[:, A_:A_ + T_]; op[:, t * T_:(t + 1) * T_] = b['opaque'][t][:, A_:A_ + T_] + assert np.abs(ring - op).max() < 0.02, np.abs(ring - op).max(); assert np.abs(ring - b['op_ring']).max() < 0.02 and b['op_ring'][:, [0, W - 1]].sum(0).min() > b['op_ring'][:, [1, W - 2]].sum(0).max() + 10, 'the tiles hold the wrong columns of the ring (a tower on column 0 and column 6399 is the fixture)' + assert b['opaque'][0].shape == (H, T_ + 2 * A_) and (b['opaque'][0][:, :A_] == b['opaque'][export.TILES - 1][:, T_:T_ + A_]).all(), 'the left apron of tile 0 is not the last columns of tile 31' +def test_every_tile_is_cut_at_its_own_seam(): + """The seams sweep from 5 km to 30 km once round the ring (ridge.seams stands in): in every tile the near card holds nothing beyond its columns' seam (plus the cross-fade) and the far card nothing before it, so no tile is cut with another tile's seams.""" + saved = ridge.seams; sweep = 5000.0 * 6.0 ** (np.arange(W) / W) + ridge.seams = lambda cov, targets, d: sweep[None, :] + try: b = _ring('swept', terrain(block(0, 359.99, 3000, 3600, 350), block(0, 359.99, 20000, 21500, 1800), block(0, 359.99, 70000, 72000, 3000)), [8]) + finally: ridge.seams = saved + T_, A_ = export.TILE_W, export.APRON; ix = slice(A_, A_ + T_); xf = ridge.XF; seen = 0 + for t, tile in enumerate(b['cards']): + s_t = np.broadcast_to(sweep[np.arange(T_) + t * T_], (H, T_)); c0, c1 = tile[0], tile[1]; d0 = np.exp(_tile_canvas(c0, 'logd')[:, ix]); d1 = np.exp(_tile_canvas(c1, 'logd')[:, ix]) + n0 = (_tile_canvas(c0)[:, ix] >= 0.5) & (_tile_canvas(c0, 'wall')[:, ix] < 0.5); n1 = (_tile_canvas(c1)[:, ix] >= 0.5) & (_tile_canvas(c1, 'wall')[:, ix] < 0.5); seen += int(n0.sum() + n1.sum()) + assert (d0[n0] <= s_t[n0] * math.exp(xf) * 1.02 + 100).all() and (d1[n1] >= s_t[n1] * math.exp(-xf) * 0.98 - 100).all(), ('a card tile is cut at another tile seam', t) + assert seen > 100_000, 'the fixture holds no card pixels' +def test_tile_is_a_crop_of_the_columns(): + """ridge.cards on a tile's columns (the 200 it owns and the apron) equals the same columns of ridge.cards on a wider run of columns, pixel for pixel, for fixed seams: the tile cut changes no pixel and adds no seam.""" + b = _bake(terrain(_receding, block(0, 359.99, 3000, 3600, 350)), [6]); x0 = 500; n = export.TILE_W + 2 * export.APRON; sl = slice(x0, x0 + n) + tile = ridge.cards(b['D'], b['a'][:, sl], b['h'][:, sl], b['seams'][:, sl], tuple(x[:, sl] for x in b['nrm'])) + for c, w in zip(tile, b['cards']): + assert np.array_equal(_canvas(w)[:, sl], _tile_canvas(c)), 'a tile is not a crop of the columns'; seen = _tile_canvas(c) > 0 + for key in ('albedo', 'n_r', 'n_t', 'logd', 'wall', 'near'): assert np.array_equal(_canvas(w, key)[:, sl][seen], _tile_canvas(c, key)[seen]), ('a tile is not a crop of the columns', key) + +# ---------------------------------------------------------------------------------------- toy bakes: tile data made by hand, for the packer and the writer +def _toy(dists=(3000.0, 15000.0, 50000.0), bands=(300, 400, 500), tops=(300, 150, 60), amp=0.01): + """TILES tiles of len(dists) cards: card i is a solid band of rows (top, h) whose distance is dists[i] x (1 + amp sin x) across the columns, no wall; the opaque view is their composite. Returns the bake dict pack() reads.""" + n = export.TILE_W + 2 * export.APRON; x = np.arange(n); tile = []; k = len(dists) + for i in range(k): + ld = np.log(dists[i] * (1 + amp * np.sin(x * 0.3)))[None, :].repeat(bands[i], 0).astype(np.float32) + tile.append(dict(top=tops[i], alpha=np.ones((bands[i], n), np.float32), albedo=np.full((bands[i], n, 3), 0.4, np.float32), n_r=np.full((bands[i], n), 0.1, np.float32), n_t=np.full((bands[i], n), -0.1, np.float32), logd=ld, wall=np.zeros((bands[i], n), bool), near=np.zeros((bands[i], n), bool))) + comp = export.composite_alpha([(c['top'], c['alpha']) for c in tile], H, n) + return dict(cards=[[dict(c) for c in tile] for _ in range(export.TILES)], splits_km=[6.0 * (j + 1) for j in range(k - 1)], seams=np.tile(np.array(dists[:-1])[:, None] * 0.5, (1, W)), opaque=[comp.copy() for _ in range(export.TILES)], + view=dict(look_az_deg=36.0, plane_h=H, px_per_deg_h=ridge.HPX_DEG, px_per_deg_v=100.0, exaggeration=5.0, horizon_row=60.0, sky_row=24.0, near_row=396.0), meta=dict(curvature=dict(r_earth_m=ridge.R_EARTH, k_ref=ridge.KREF), encoding=dict(log_d_min=math.log(500.0), log_d_max=math.log(100000.0))), + place=dict(id='toy', name='Toy', lat=0.0, lon=0.0, altitude_km=0.0, eye_m=1.0, tz='UTC')) +def _write(out, b, packed, **kw): + args = dict(place=b['place'], view=b['view'], meta=b['meta'], packed=packed, opaque=b['opaque']); args.update(kw); return export.write_bake(out, **args) +def _refuses(out, b, packed, why, **kw): + try: _write(out, b, packed, **kw) + except export.Refusal: assert not os.path.exists(out), ('a refused bake left files', why) + else: assert False, why +def _pins(): + assert (export.RING_W, export.TILES, export.TILE_W, export.APRON, export.MAX_CARDS, export.BAKER_VERSION) == (6400, 32, 200, 2, 6, 7), 'the ring layout is pinned' + assert (export.TILE_BYTES_MAX, export.PLACE_BYTES_MAX, export.RESIDENT_BYTES_MAX, export.FIT_PX_MAX, export.R_MAX_FLOOR_M, export.PHI_STEPS) == (235_000, 7_500_000, 20_000_000, 24.0, 25.0, 24), 'the budgets and the fit bound are pinned' + assert abs(export.HFOV_MAX_DEG - 72 / 1.1) < 1e-12 + +def test_schema3(): + """The manifest validates; a tile array of the wrong length, a missing apron, a file named for another tile, and any key of schema 2 left behind (the camera's heading range and offset, the window, the plane width, the card's median and scale, the whole-bake w and h) are refused; the schema file is pinned; the layout constants are pinned.""" + _pins(); d = tempfile.mkdtemp() + try: + b = _toy(); pk = export.pack(b); dest = _write(d, b, pk); m = json.load(open(dest / 'manifest.json')); export.validate_manifest(m); mk = lambda: json.loads(json.dumps(m)) + assert m['schema'] == 3 and m['baker_version'] == 7 and set(m['view']) >= {'ring_w', 'tile_w', 'tiles', 'apron'} and 'rows_above' not in m['view'] and m['camera'] == dict(r_max_m=pk['camera']['r_max_m'], r_max_forward_m=pk['camera']['r_max_forward_m']) and m['camera']['r_max_forward_m'] >= m['camera']['r_max_m'] and len(m['tiles']) == 32 and 'w' not in m and 'h' not in m + def bad(f, why): + x = mk(); f(x) + try: export.validate_manifest(x) + except export.Refusal: return + raise AssertionError(why) + bad(lambda x: x['camera'].pop('r_max_forward_m'), 'a camera without its forward offset validated'); bad(lambda x: x['camera'].pop('r_max_m'), 'a camera without its offset validated') + bad(lambda x: x['tiles'].pop(), 'a manifest of 31 tiles validated'); bad(lambda x: x['tiles'][3].pop(), 'a tile with a card missing validated'); bad(lambda x: x['tiles'][3].append(None), 'a tile with an extra card validated'); bad(lambda x: x['view'].pop('apron'), 'a missing apron validated') + bad(lambda x: x['view'].update(apron=0), 'an apron of 0 validated'); bad(lambda x: x['tiles'][2][1]['colour'].update(file='card-1-t03-colour.webp'), 'a file named for another tile validated') + bad(lambda x: x['tiles'].__setitem__(slice(None), [[None] * 3 for _ in range(32)]), 'a card null in every tile validated'); bad(lambda x: x.update(bytes=x['bytes'] + 1), 'a wrong byte total validated') + for where, key in (('camera', 'heading_max' + '_deg'), ('view', 'window' + '_deg'), ('view', 'plane' + '_w'), ('view', 'rows_above'), ('camera', 'r_m'), (None, 'w'), (None, 'h')): # schema 2's names are spelled in pieces: the baker's tree must hold none of them + bad(lambda x: (x[where] if where else x).update({key: 1}), f'a leftover {key} validated') + bad(lambda x: x['cards'][0].update(**{'median' + '_m': 1.0}), 'a leftover median validated'); bad(lambda x: x['cards'][0].update(scale=1.0), 'a leftover scale validated'); bad(lambda x: x['tiles'][0][0].update(scale=1.0), 'a tile entry with a scale validated') + bad(lambda x: x['tiles'][0][0].update(distance_m='far'), 'a distance that is not a number validated'); bad(lambda x: x['place'].update(tz='Mars/Olympus'), 'a zone the system does not know validated') + assert json.load(open(os.path.join(SRC, 'ridge-bake.schema.json'))) == json.loads(json.dumps(export.SCHEMA)), 'ridge-bake.schema.json is stale (export.py --write-schema)' + finally: shutil.rmtree(d) +def test_manifest_v3_writer(): + """Two packs of one bake give the same bytes and bake_id; tiles[t][i] files are where the manifest says with the sizes it says and decode to tile_w + 2 apron columns; the bake_id is the sha256 of the files tile-major, then card, colour then geometry; the index points at the dir, a + rebake replaces the old dir, cards are nearest first with their seam medians, the attribution is the four pinned strings.""" + d = tempfile.mkdtemp() + try: + b = _toy(); pk = export.pack(b); pk2 = export.pack(b); files = lambda p: [(e['colour'], e['geometry']) for row in p['tiles'] for e in row if e]; assert files(pk) == files(pk2), 'two packs gave different bytes' + a = _write(d + '/a', b, pk); m = json.load(open(a / 'manifest.json')); export.validate_manifest(m); text = (a / 'manifest.json').read_bytes().decode('utf-8'); blank = text.replace(f'"bake_id": "{m["bake_id"]}"', f'"bake_id": "{export.BAKE_ID_BLANK}"'); assert blank != text and a.name == 'toy-' + m['bake_id'] and sorted(os.listdir(d + '/a')) == sorted(['index.json', a.name]) + import hashlib; want = hashlib.sha256(blank.encode() + b''.join(c + g for c, g in files(pk))).hexdigest()[:12]; assert m['bake_id'] == want and export.bake_id(blank, files(pk)) == want, 'bake_id is not the sha256 of the manifest with its id blanked, then the tile files tile-major, then card, colour then geometry' + assert export.bake_id(blank, [(g, c) for c, g in files(pk)]) != want and export.bake_id(blank, files(pk)[::-1]) != want and export.bake_id(blank, [f for i, f in enumerate(files(pk)) if i % 3 != 1] + [f for i, f in enumerate(files(pk)) if i % 3 == 1]) != want, 'bake_id ignores the file order' + pk3 = [list(f) for f in files(pk)]; pk3[40][1] += b'x'; assert export.bake_id(blank, [tuple(f) for f in pk3]) != want, 'a changed byte kept the bake_id' + assert export.bake_id(blank.replace('"r_max_forward_m"', '"r_max_forward_m "', 1), files(pk)) != want and export.bake_id(blank + ' ', files(pk)) != want, 'a changed manifest kept the bake_id' + import pathlib; was = pathlib.Path.write_text; pathlib.Path.write_text = lambda self, data, *a, **k: open(self, 'wb').write(data.replace('\n', '\r\n').encode('utf-8')) # a platform whose text files end lines with CRLF + try: w = _write(d + '/crlf', b, pk) + finally: pathlib.Path.write_text = was + raw = (w / 'manifest.json').read_bytes(); idx_raw = open(d + '/crlf/index.json', 'rb').read(); assert w.name == a.name and b'\r' not in raw and b'\r' not in idx_raw, 'the manifest or the index was written with the platform newline: the bytes served are not the bytes the id was hashed from' + assert hashlib.sha256(raw.replace(m['bake_id'].encode(), export.BAKE_ID_BLANK.encode()) + b''.join(c + g for c, g in files(pk))).hexdigest()[:12] == m['bake_id'] + pk4 = dict(pk, camera=dict(pk['camera'], r_max_forward_m=pk['camera']['r_max_forward_m'] + 0.1)); a4 = _write(d + '/d', b, pk4); assert a4.name != a.name and [(e['colour'], e['geometry']) for row in pk4['tiles'] for e in row if e] == files(pk), 'a manifest moved under the same bake id (tile bytes identical, camera differs)' + assert m['cards'][0]['near_m'] is None and m['cards'][-1]['far_m'] is None and m['cards'][0]['far_m'] == m['cards'][1]['near_m'] and len(m['cards']) == 3 + for t, row in enumerate(m['tiles']): + for i, e in enumerate(row): + for kind in ('colour', 'geometry'): f = a / e[kind]['file']; assert f.stat().st_size == e[kind]['bytes'] and export.decode(f.read_bytes()).shape[:2] == (e['h'], export.TILE_W + 2 * export.APRON), (t, i, kind) + assert m['bytes'] == sum(e[k]['bytes'] for row in m['tiles'] for e in row for k in ('colour', 'geometry')) and m['encoding']['normal'] == 'rt8' and m['curvature'] == dict(r_earth_m=ridge.R_EARTH, k_ref=ridge.KREF) + idx = json.load(open(d + '/a/index.json')); export.validate(idx, export.SCHEMA['$defs']['index']); assert idx == dict(schema=1, default='toy', places={'toy': a.name}) + want = dict(credit_line='Contains modified Copernicus data: DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.', + licence='Copernicus DEM licence: free, full and open access, with the credit line shown', dem_source='Copernicus DEM GLO-30 (30 m)', url='https://spacedata.copernicus.eu/collections/copernicus-digital-elevation-model'); assert m['attribution'] == want, m['attribution'] + c = _write(d + '/a', b, pk); assert c.name == a.name; other = dict(b['place'], id='other'); _write(d + '/a', b, pk, place=other); assert json.load(open(d + '/a/index.json'))['default'] == 'toy' + _write(d + '/a', b, pk, place=other, default='other'); assert json.load(open(d + '/a/index.json'))['default'] == 'other' + idx = json.load(open(d + '/a/index.json')); idx['default'] = 'gone'; open(d + '/a/index.json', 'w').write(json.dumps(idx)); _write(d + '/a', b, pk, place=other); assert json.load(open(d + '/a/index.json'))['default'] == 'other' + finally: shutil.rmtree(d) +def test_tile_crop_and_null(): + """Each card tile is exactly the rows where its 8-bit alpha is non-zero (top and h in the manifest are those rows, the files decode to that band, the written alpha is the card's); a card with no rows in a tile is null there, writes no file and the bake still validates; + a card empty everywhere is refused naming the splits, and a card with no solid terrain in any tile is refused.""" + d = tempfile.mkdtemp() + try: + b = _ring('wide3', WIDE3, [20, 55]); pk = export.pack(b); dest = _write(d, b, pk); m = json.load(open(dest / 'manifest.json')) + for t in (0, 9, 31): + for c, e in zip(b['cards'][t], m['tiles'][t]): + rows = np.flatnonzero(np.rint(_tile_canvas(c) * 255).max(1) > 0); assert e['top'] == rows[0] and e['h'] == rows[-1] - rows[0] + 1 == c['alpha'].shape[0], (t, e, rows[0], rows[-1]) + col = export.decode((dest / e['colour']['file']).read_bytes()); assert col.shape[:2] == (e['h'], export.TILE_W + 2 * export.APRON) and np.abs(col[..., 3].astype(int) - np.rint(c['alpha'] * 255)).max() == 0, 'the written alpha is not the card alpha' + t0 = _toy(); cs = [[dict(c) for c in tile] for tile in t0['cards']]; empty = dict(top=0, alpha=np.zeros((0, 204), np.float32), albedo=np.zeros((0, 204, 3), np.float32), n_r=np.zeros((0, 204), np.float32), n_t=np.zeros((0, 204), np.float32), logd=np.zeros((0, 204), np.float32), wall=np.zeros((0, 204), bool)) + cs[5][2] = empty; op = [x.copy() for x in t0['opaque']]; op[5] = export.composite_alpha([(c['top'], c['alpha']) for c in cs[5] if c['alpha'].shape[0]], H, 204); b5 = dict(t0, cards=cs, opaque=op); pk5 = export.pack(b5) + assert pk5['tiles'][5][2] is None and pk5['tiles'][4][2] is not None; dest = _write(d + '/null', b5, pk5); m5 = json.load(open(dest / 'manifest.json')); assert m5['tiles'][5][2] is None and not (dest / export.tile_file(2, 5, 'colour')).exists() and (dest / export.tile_file(2, 4, 'colour')).exists() + for i, why in ((1, '20 km'), (2, '55 km')): + gone = [[empty if j == i else c for j, c in enumerate(tile)] for tile in b['cards']] + try: export.pack(dict(b, cards=gone)) + except export.Refusal as e: assert f'card {i} is empty' in str(e) and why in str(e), str(e) + else: assert False, ('an empty card', i, 'was packed') + liquid = [[dict(c, alpha=c['alpha'] * 0.4) if j == 1 else c for j, c in enumerate(tile)] for tile in t0['cards']] + try: export.pack(dict(t0, cards=liquid)) + except export.Refusal as e: assert 'no solid terrain' in str(e), str(e) + else: assert False, 'a card with no solid pixel in any tile was packed' + walled = [[dict(c, wall=np.ones_like(c['wall'])) if j == 1 else c for j, c in enumerate(tile)] for tile in t0['cards']] + try: export.pack(dict(t0, cards=walled)) + except export.Refusal as e: assert 'no solid terrain' in str(e), str(e) + else: assert False, 'a card that is all wall was packed' + finally: shutil.rmtree(d) +def test_cover_and_size_refusals_write_nothing(): + """write_bake measures the files it is handed: a hole in one tile's card (alpha zeroed over a band of columns) fails that tile's cover check and names the tile, a card leaving the frame, a tile file without its apron, colour and geometry of two sizes and an opaque view of the wrong + rows are refused, and nothing is written.""" + d = tempfile.mkdtemp() + try: + b = _toy(); pk = export.pack(b); c = b['cards'][3][2]; hole = c['alpha'].copy(); hole[:, 100:140] = 0; bad = [list(r) for r in pk['tiles']]; bad[3][2] = dict(bad[3][2], colour=export.encode_colour(c['albedo'], hole)); _refuses(d + '/hole', b, dict(pk, tiles=bad), 'a bake whose card leaves a hole was written') + try: _write(d + '/hole', b, dict(pk, tiles=bad)) + except export.Refusal as e: assert 'tile 3' in str(e), str(e) + off = [list(r) for r in pk['tiles']]; off[7][0] = dict(off[7][0], top=H - 5); _refuses(d + '/off', b, dict(pk, tiles=off), 'a card leaving the frame was written') + narrow = [list(r) for r in pk['tiles']]; c0 = b['cards'][2][0]; narrow[2][0] = dict(narrow[2][0], colour=export.encode_colour(c0['albedo'][:, 2:-2], c0['alpha'][:, 2:-2]), geometry=export.encode_geometry(c0['n_r'][:, 2:-2], c0['n_t'][:, 2:-2], c0['logd'][:, 2:-2], b['meta']['encoding'])); _refuses(d + '/apron', b, dict(pk, tiles=narrow), 'a tile without its apron was written') + try: _write(d + '/apron', b, dict(pk, tiles=narrow)) + except export.Refusal as e: assert 'apron' in str(e), str(e) + mism = [list(r) for r in pk['tiles']]; mism[4][1] = dict(mism[4][1], geometry=export.encode_geometry(c0['n_r'][:50], c0['n_t'][:50], c0['logd'][:50], b['meta']['encoding'])); _refuses(d + '/size', b, dict(pk, tiles=mism), 'a colour and geometry of two sizes were written') + _refuses(d + '/rows', b, pk, 'view plane_h disagreeing with the opaque view was written', view=dict(b['view'], plane_h=H + 1)); _refuses(d + '/short', b, dict(pk, tiles=pk['tiles'][:31]), 'a bake of 31 tiles was written') + finally: shutil.rmtree(d) +def _flat_entry(top, h, w=export.TILE_W + 2 * export.APRON, seed=0, noise=False, distance_m=1000.0): + rng = np.random.default_rng(seed); alpha = np.ones((h, w), np.float32); rgb = rng.random((h, w, 3)).astype(np.float32) if noise else np.full((h, w, 3), 0.5, np.float32); geo = rng.random((h, w)).astype(np.float32) if noise else np.full((h, w), 0.5, np.float32) + enc = dict(log_d_min=0.0, log_d_max=1.0); return dict(top=top, colour=export.encode_colour(rgb, alpha), geometry=export.encode_geometry(geo, geo, geo, enc), distance_m=distance_m) +def test_card_cap_refusals(): + """A preset with 6 splits, or splits not increasing, is refused by load_preset before any march; a bake of 7 cards is refused; 6 cards that fit the budgets are written; 6 full-frame cards in every tile (the lit canvases of 13 tiles are 38 MB) are refused and write nothing.""" + d = tempfile.mkdtemp() + try: + for bad in ([5, 10, 20, 30, 40, 50], [6, 6], [6, 5], []): + p = os.path.join(d, 'p.json'); json.dump(dict(presets=[dict(id='x', tz='UTC', card_split_km=bad)]), open(p, 'w')) # a valid zone, so only the splits can refuse it + try: ridge.load_preset('x', p) + except export.Refusal: pass + else: assert False, ('a preset with splits', bad, 'was accepted') + json.dump(dict(presets=[dict(id='x')]), open(os.path.join(d, 'q.json'), 'w')) + try: ridge.load_preset('x', os.path.join(d, 'q.json')) + except export.Refusal: pass + else: assert False, 'a preset without card_split_km was defaulted' + json.dump(dict(presets=[dict(id='x', tz='Europe/Vienna', card_split_km=[1, 2, 3, 4, 5])]), open(os.path.join(d, 'r.json'), 'w')); assert ridge.load_preset('x', os.path.join(d, 'r.json'))['card_split_km'] == [1, 2, 3, 4, 5] + for bad_tz in (None, '', 'Not/AZone'): + p = os.path.join(d, 'tz.json'); json.dump(dict(presets=[dict(id='x', card_split_km=[6], **({} if bad_tz is None else dict(tz=bad_tz)))]), open(p, 'w')) + try: ridge.load_preset('x', p) + except export.Refusal: pass + else: assert False, ('a preset with tz', bad_tz, 'was accepted') + place = dict(id='synthetic', name='S', lat=0.0, lon=0.0, altitude_km=0.0, eye_m=1.0, tz='UTC'); meta = dict(curvature=dict(r_earth_m=1.0, k_ref=0.1), encoding=dict(log_d_min=0.0, log_d_max=1.0)); view = dict(look_az_deg=0.0, plane_h=H, px_per_deg_h=1.0, px_per_deg_v=1.0, exaggeration=1.0, horizon_row=1.0, sky_row=1.0, near_row=1.0) + full = [np.ones((H, 204)) for _ in range(32)]; cards = lambda k: [dict(near_m=None if i == 0 else 1.0, far_m=None if i == k - 1 else 1.0) for i in range(k)]; cam = dict(r_max_m=100.0, r_max_forward_m=100.0) + big = dict(cards=cards(6), tiles=[[_flat_entry(0, H, seed=0)] + [_flat_entry(0, H) for _ in range(5)] for _ in range(32)], camera=cam) + try: export.write_bake(d + '/big', place, view, meta, big, full) + except export.Refusal as e: assert 'consecutive tiles' in str(e), str(e) + else: assert False, 'six full-frame cards in every tile were written' + assert not os.path.exists(d + '/big') + ok = dict(cards=cards(6), tiles=[[_flat_entry(0, H, seed=0)] + [_flat_entry(0, 100, seed=i) for i in range(1, 6)] for _ in range(32)], camera=cam); dest = export.write_bake(d + '/six', place, view, meta, ok, full); assert len(json.load(open(dest / 'manifest.json'))['cards']) == 6 + fwd = lambda r: dict(ok, camera=dict(r_max_m=100.0, r_max_forward_m=r)); bands6 = [[H] + [100] * 5] * 32; assert export.resident_bytes(bands6, export.run_tiles(100.0, 1000.0)) <= export.RESIDENT_BYTES_MAX < export.resident_bytes(bands6, export.run_tiles(1e6, 1000.0)), 'the fixture cannot tell the gate at r_max_forward_m from the gate at r_max_m' + try: export.write_bake(d + '/fwd', place, view, meta, fwd(1e6), full) + except export.Refusal as e: assert 'consecutive tiles' in str(e), str(e) + else: assert False, 'a bake whose forward offset breaks the resident gate was written' + try: export.write_bake(d + '/low', place, view, meta, fwd(50.0), full) + except export.Refusal as e: assert 'below r_max_m' in str(e), str(e) + else: assert False, 'a bake whose forward offset is below the worst-case offset was written' + assert not os.path.exists(d + '/fwd') and not os.path.exists(d + '/low') + try: export.check_budget(7, [1000] * 32, [[10] * 7] * 32, 100.0, 1000.0) + except export.Refusal as e: assert 'above 6' in str(e) + else: assert False, '7 cards were accepted' + finally: shutil.rmtree(d) +def test_budgets(): + """A tile over 235 kB, a place over 7.5 MB and a resident run over 20 MB each refuse and one byte (one band row) under passes; the resident run wraps the ring: the last tiles and the first count as consecutive.""" + none = [[] for _ in range(export.TILES)]; call = lambda tb, bands, r=100.0, rmin=1000.0: export.check_budget(3, tb, bands, r, rmin) + def refused(*a, **k): + try: call(*a, **k) + except export.Refusal: return True + return False + assert not refused([235_000] + [0] * 31, none) and refused([235_001] + [0] * 31, none), 'the tile cap' + assert not refused([234_375] * 32, none) and refused([234_375] * 31 + [234_376], none), 'the place cap' + rows = 20_000_000 // (4 * export.LIT_W); one = lambda h: [[h]] + [[] for _ in range(31)] + assert not refused([0] * 32, one(rows)) and refused([0] * 32, one(rows + 1)), 'the resident cap' + n = export.run_tiles(100.0, 1000.0); assert 5 < n < 32; split = [[] for _ in range(32)]; split[31] = [rows // 2]; split[0] = [rows - rows // 2 + 1] + assert refused([0] * 32, split), 'the resident run does not wrap the ring (tile 31 and tile 0 are consecutive)'; split[0] = [rows - rows // 2]; assert not refused([0] * 32, split) + far = [[] for _ in range(32)]; far[0] = [rows // 2]; far[n + 3] = [rows - rows // 2 + 1]; assert not refused([0] * 32, far), 'a run is only N tiles long'; far[n - 1] = far[n + 3]; far[n + 3] = []; assert refused([0] * 32, far) + assert export.run_tiles(0.0, 1000.0) == math.ceil(export.HFOV_MAX_DEG / 11.25) + 5 and export.run_tiles(250.0, 20000.0) > export.run_tiles(25.0, 20000.0) and export.run_tiles(1e9, 1.0) == 32, 'N = ceil(arc_max / 11.25) + 1 + 4' + rows_t = [[10, 20] if t in (30, 31, 0, 1) else [] for t in range(32)]; assert export.resident_bytes(rows_t, 4) == 4 * export.LIT_W * 120 and export.resident_bytes(rows_t, 3) == 4 * export.LIT_W * 90 and export.resident_bytes(rows_t, 40) == 4 * export.LIT_W * 120 +def _fit(d, r, phis=None): return export.fit_px(d, r, ridge.HPX_DEG, phis) +def _brute_fit(d, r, phis, ppd, n=20001): + """The worst error of the best line, by brute force: the least-squares line over n uniform samples (the integral to within 1e-4 of itself), the error on the same n.""" + half = math.radians(export.HFOV_MAX_DEG) / 2; b = np.linspace(-half, half, n)[None, :]; p = np.linspace(0, 2 * math.pi, phis, endpoint=False)[:, None]; A = np.arctan2(d * np.sin(b) - r * np.sin(p), d * np.cos(b) - r * np.cos(p)) + bc = b - b.mean(); s = (A * bc).sum(-1, keepdims=True) / (bc * bc).sum(); return math.degrees(float(np.abs(A - (A.mean(-1, keepdims=True) + s * bc)).max())) * ppd +def test_fit_px_is_the_continuous_error(): + """fit_px is the worst error of the best line over the whole viewport, not of a few samples of it: it equals a brute-force measure (20001 samples, line and error) within 0.1 card px at the offsets the bound is set at (an offset a few samples undercount by more than that), over the whole circle and at phi = 0.""" + ppd = ridge.HPX_DEG; seen = 0 + for d, r, phis in ((410.0, 205.0, 1), (410.0, 98.0, export.PHI_STEPS), (1500.0, 600.0, 1), (1500.0, 300.0, export.PHI_STEPS), (60.0, 30.0, export.PHI_STEPS), (20000.0, 9000.0, 1)): + got, want = _fit(d, r, phis), _brute_fit(d, r, phis, ppd); assert abs(got - want) < 0.1, ('fit_px is not the continuous error', d, r, phis, got, want); seen += want > 5 + assert seen >= 4, 'the cases are too tame to tell a coarse measure from the continuous one' +def test_r_max(): + """On a card at 1.5 km: r_max_m falls as FIT_PX_MAX falls and is at most half the distance; it is the largest offset within the bound (the fit error at r_max is within it, a little more is not); a forward-only sweep of phi finds a larger r_max than the whole circle (the error is in the phi + that is not forward); the binding card tile is the nearest one (each tile's line is fitted at its own distance_m); the resident gate binds when its tiles are heavy; a place whose r_max_m is below 25 refuses and names the card and tile.""" + ppd = ridge.HPX_DEG; dist = [[1500.0] for _ in range(32)]; bands = [[100] for _ in range(32)]; saved = (export.FIT_PX_MAX, export.PHI_STEPS) + try: + r = export.solve_r_max(dist, bands, ppd); assert 25 < r <= 750 and _fit(1500.0, r) <= export.FIT_PX_MAX + 1e-9 and _fit(1500.0, r + 0.5) > export.FIT_PX_MAX, ('r_max is not the largest offset within the bound', r, _fit(1500.0, r), _fit(1500.0, r + 0.5)) + export.FIT_PX_MAX = 12.0; r12 = export.solve_r_max(dist, bands, ppd); export.FIT_PX_MAX = 60.0; r60 = export.solve_r_max(dist, bands, ppd); export.FIT_PX_MAX = saved[0]; assert r12 < r < r60, (r12, r, r60) + export.FIT_PX_MAX = 1e9; assert export.solve_r_max(dist, bands, ppd) == 750.0, 'r_max is not capped at half the nearest distance'; export.FIT_PX_MAX = saved[0] + export.PHI_STEPS = 1; rf = export.solve_r_max(dist, bands, ppd); export.PHI_STEPS = saved[1]; assert rf > r + 5, ('a forward-only sweep finds the same r_max', rf, r) + rp = export.solve_r_max(dist, bands, ppd, phis=1); assert rp == rf and 25 < rp <= 750 and _fit(1500.0, rp, 1) <= export.FIT_PX_MAX + 1e-9 and _fit(1500.0, rp + 0.5, 1) > export.FIT_PX_MAX, ('the phi = 0 bound is not the largest offset within the bound at phi = 0', rp, rf) + assert _fit(1500.0, rp) > export.FIT_PX_MAX, 'the forward offset fits at some other phi, so the two numbers do not differ' + mixed = [[1500.0 if t == 3 else 9000.0] for t in range(32)]; assert export.solve_r_max(mixed, bands, ppd) == r, 'the binding tile is not the nearest one' + dist2 = [[20000.0] for _ in range(32)]; free = export.solve_r_max(dist2, bands, ppd); heavy = [[1700000 // (4 * export.LIT_W)] for _ in range(32)]; held = export.solve_r_max(dist2, heavy, ppd) + assert held < free - 100 and export.resident_bytes(heavy, export.run_tiles(held, 20000.0)) <= export.RESIDENT_BYTES_MAX < export.resident_bytes(heavy, export.run_tiles(held + 1.0, 20000.0)), ('the resident gate does not bind r_max', held, free) + held_f = export.solve_r_max(dist2, heavy, ppd, phis=1); assert held_f >= held and export.resident_bytes(heavy, export.run_tiles(held_f, 20000.0)) <= export.RESIDENT_BYTES_MAX < export.resident_bytes(heavy, export.run_tiles(held_f + 1.0, 20000.0)), ('the resident gate does not bind the forward offset', held_f, held) + two = [[5000.0, 40.0 if t == 7 else 5000.0] for t in range(32)] + try: export.solve_r_max(two, [[100, 100] for _ in range(32)], ppd) + except export.Refusal as e: assert 'below 25' in str(e) and 'card 1' in str(e) and 'tile 7' in str(e), str(e) + else: assert False, 'a bake whose r_max_m is below 25 was accepted' + close = [[30.0] for _ in range(32)] + try: export.solve_r_max(close, bands, ppd) + except export.Refusal as e: assert 'below 25' in str(e) and 'card 0' in str(e), str(e) + else: assert False, 'a nearest card at 30 m was accepted' + finally: export.FIT_PX_MAX, export.PHI_STEPS = saved +def test_pack_distance_and_r_max_in_the_bake(): + """pack: a card tile's distance_m is exp(median ln d) over the interior solid pixels that are not wall (not the wall rows, not the apron columns); the manifest camera is the r_max_m of those distances and no per-card scale or median is written.""" + b = _toy(); cs = [[dict(c) for c in tile] for tile in b['cards']]; c = dict(cs[10][1]); n = c['alpha'].shape[0]; wall = np.zeros_like(c['wall']); wall[:n * 3 // 4] = True; ld = np.where(wall, c['logd'] + 3.0, c['logd']).copy(); ld[:, :2] += 2.0; ld[:, -2:] += 2.0; cs[10][1] = dict(c, wall=wall, logd=ld) + pk = export.pack(dict(b, cards=cs)); inner = (slice(None), slice(2, -2)); want = float(np.exp(np.median(ld[inner][~wall[inner]]))); with_wall = float(np.exp(np.median(ld[inner]))); assert abs(with_wall - want) > 0.05 * want, 'the fixture cannot tell wall rows from ground' + assert abs(pk['tiles'][10][1]['distance_m'] - want) < 1e-9 * want, ('the distance counted wall rows or the apron', pk['tiles'][10][1]['distance_m'], want); assert set(pk['tiles'][10][1]) == {'top', 'colour', 'geometry', 'distance_m'} and set(pk['cards'][0]) == {'near_m', 'far_m'} + base = export.pack(b); assert base['camera']['r_max_m'] >= 25 and base['camera']['r_max_forward_m'] >= base['camera']['r_max_m'] and abs(base['report']['nearest_m'] - min(float(np.exp(c[0]['logd'][:, 2:-2].min())) for c in b['cards'])) < 1e-6 and len(base['report']['fit_px']) == 3 and max(base['report']['fit_px']) <= export.FIT_PX_MAX + 1e-6 + near = export.pack(_toy(dists=(1500.0, 15000.0, 50000.0))); assert near['camera']['r_max_forward_m'] > near['camera']['r_max_m'] + 5, ('the forward offset was searched over the whole circle', near['camera']) + assert abs(base['cards'][0]['far_m'] - 1500.0) < 1e-6 and base['cards'][0]['near_m'] is None and base['cards'][1]['near_m'] == base['cards'][0]['far_m'] +def test_the_sheet_draws_the_ring(): + """The contact sheet is the ring at 1/4 width (1600 px) with a mark on each of the 32 tile boundaries, in the composite, every card's strip and the depth image, stacked: composite, K cards, depth.""" + b = _ring('wide3', WIDE3, [20, 55]); png = export.sheet(b); img = export.imagecodecs.png_decode(png); k = 3; nb = b['cov'].shape[0]; assert img.shape == ((1 + k) * H + 2 * nb, W // 4, 3), img.shape + mark = np.arange(32) * 200 // 4; sky = np.array(export.SHEET_SKY); reddish = lambda px: (px[..., 0] > px[..., 2] + 40); assert reddish(img[2, mark].astype(int)).all() and not reddish(img[2, mark + 7].astype(int)).any(), 'the tile boundaries are not drawn on the composite' + assert reddish(img[(1 + k) * H + 3, mark].astype(int)).all(), 'the tile boundaries are not drawn on the depth image'; assert abs(img[2, 1].astype(int) - np.rint(np.array(export.SHEET_SKY) * 255)).max() <= 2, 'the sky is not the flat sky' + +# ---------------------------------------------------------------------------------------- the real thing: Vienna +_VIENNA = {} +def _vienna_bake(): + if 'b' not in _VIENNA: + saved = ridge.P + try: b = export.bake_place('vienna'); _VIENNA.update(b=b, pxv=ridge.PXDEG_V, P=dict(ridge.P), rowang=ridge.rowang.copy(), skyline=None) + finally: ridge.P = saved + return _VIENNA['b'] +def _vienna_ring(splits, tiles): + """Vienna's whole-ring march and seams for the given splits, cards on only the given tiles: (d, seams, {t: cards}, {t: opaque}).""" + saved = ridge.P + try: + p = ridge.configure(dict(ridge.load_preset('vienna'), card_split_km=splits)); d, _, Hh, _ = ridge.stage0(False); a, h = ridge.prefilter(d, Hh, p['prefilter_m']); ridge.set_view(a.max(0)); sm = ridge.seams(ridge.coverage(d, a), [k * 1000.0 for k in splits], d); op = ridge.opaque(a); D_, A_, H_, nrm = ridge.join_near(d, a, h, ridge.near_march(p['prefilter_m'])) + cols = lambda x, t: ridge.ring_cols(x, t * export.TILE_W - export.APRON, export.TILE_W + 2 * export.APRON) + return d, sm, {t: ridge.cards(D_, cols(A_, t), cols(H_, t), cols(sm, t), tuple(cols(x, t) for x in nrm)) for t in tiles}, {t: cols(op, t) for t in tiles} + finally: ridge.P = saved +def test_vienna_k1_k2_k3(): + """Vienna with card_split_km [6], [6, 40] and [6, 20, 40]: 2, 3 and 4 cards, seams ordered in every column of the ring, each composite of a tile (the rest azimuth's, the north's and the last one) equals the opaque view within 0.02; the cross-fade column count is printed.""" + for sp in ([6], [6, 40], [6, 20, 40]): + d, sm, cs, op = _vienna_ring(sp, (0, 19, 31)); assert sm.shape == (len(sp), W) + if len(sp) > 1: assert (np.diff(np.log(sm), axis=0) >= 0.4 - 1e-9).all(), 'seams out of order' + for t, tile in cs.items(): + assert len(tile) == len(sp) + 1; comp = 1 - np.prod([1 - _tile_canvas(c) for c in tile], axis=0); assert np.abs(comp - op[t]).max() < 0.02, (sp, t, np.abs(comp - op[t]).max()) + xf = int(np.any([((0.02 < _tile_canvas(c)) & (_tile_canvas(c) < 0.98)).sum(0) > 3 for c in cs[19]], axis=0).sum()) + print(f' K={len(sp)} splits {sp}: {len(cs[19])} cards, tile 19 bands {[(c["top"], c["alpha"].shape[0]) for c in cs[19]]}, seam medians km {[round(float(np.median(s)) / 1000, 1) for s in sm]}, cross-fade columns {xf} of {export.TILE_W + 4} in tile 19') +def test_bake_place_manifest_fields_on_vienna(): + """bake_place on the real Vienna preset: 32 tiles of three cards, the place carries the ground (km) and the eye, horizon_row is the row where the elevation angle is 0, px_per_deg_h is the ring's, look_az_deg is the rest azimuth; the shared apron of neighbouring tiles is the same pixels + (the tile cut at the real preset), and write_bake of its packed tiles validates with index default 'vienna', no temp dir left, r_max_m and the worst fit error per card printed.""" + b = _vienna_bake(); P = _VIENNA['P']; rowang = _VIENNA['rowang']; pxv = _VIENNA['pxv']; pl, view = b['place'], b['view']; assert len(b['cards']) == 32 and all(len(t) == 3 for t in b['cards']) and len(b['opaque']) == 32 and b['seams'].shape == (2, W) + assert abs(pl['altitude_km'] * 1000 - P['ground_m']) < 1e-6 and abs(pl['eye_m'] - P['eye_m']) < 1e-9 and pl['id'] == 'vienna' and view['look_az_deg'] == P['az_center'] == 214.0 + assert 0 < view['sky_row'] < view['horizon_row'] < view['near_row'] < H and abs(rowang[int(view['horizon_row'])]) <= 1.0 / pxv, (view, rowang[int(view['horizon_row'])]); assert view['px_per_deg_h'] == ridge.HPX_DEG and abs(view['exaggeration'] - pxv / ridge.HPX_DEG) < 1e-9 + T_, A_ = export.TILE_W, export.APRON + for t in (0, 19, 31): + nxt = b['cards'][(t + 1) % 32] + for i, c in enumerate(b['cards'][t]): + assert (_tile_canvas(c)[:, T_ + A_:T_ + 2 * A_] == _tile_canvas(nxt[i])[:, A_:2 * A_]).all(), ('the apron is not the neighbour tile', t, i); seen = _tile_canvas(c)[:, T_ + A_:T_ + 2 * A_] > 0 + assert (_tile_canvas(c, 'logd')[:, T_ + A_:T_ + 2 * A_][seen] == _tile_canvas(nxt[i], 'logd')[:, A_:2 * A_][seen]).all(), ('the apron is not the neighbour tile', t, i, 'logd') + d = tempfile.mkdtemp() + try: + pk = export.pack(b); rp = pk['report']; print(' vienna r_max_m', pk['camera']['r_max_m'], 'r_max_forward_m', pk['camera']['r_max_forward_m'], 'nearest card m', round(rp['nearest_m']), 'resident run', rp['run_tiles'], 'tiles', rp['resident_bytes'], 'bytes; worst fit error per card (card px)', [round(x, 1) for x in rp['fit_px']], 'sky/low deg', round(b['v']['sky_deg'], 2), round(b['v']['low_deg'], 2), 'exaggeration', round(view['exaggeration'], 2)) + dest = _write(d, b, pk); m = json.load(open(dest / 'manifest.json')); export.validate_manifest(m); assert m['camera']['r_max_m'] >= export.R_MAX_FLOOR_M and m['camera']['r_max_forward_m'] >= m['camera']['r_max_m'] + assert json.load(open(d + '/index.json'))['default'] == 'vienna' and sorted(os.listdir(d)) == sorted(['index.json', dest.name]), os.listdir(d); print(' vienna manifest bytes', m['bytes'], 'largest tile', max(sum(e[k]['bytes'] for e in row if e for k in ('colour', 'geometry')) for row in m['tiles'])) + finally: shutil.rmtree(d) + +# ---------------------------------------------------------------------------------------- the written files are the cards +def test_written_cards_decode_to_the_cards_in_memory(): + """Vienna's cards in three tiles (north, the rest azimuth's, the wrap), written and decoded again: alpha exactly, albedo within the lossy codec (and straight, not premultiplied, at partial alpha), the normal channels in their order (R along the ray, G across it), and the log-distance over the encoding + range, within quantisation.""" + b = _vienna_bake(); d = tempfile.mkdtemp() + try: + dest = _write(d, b, export.pack(b)); m = json.load(open(dest / 'manifest.json')); enc = m['encoding']; span = enc['log_d_max'] - enc['log_d_min']; partial_seen = near_seen = 0 + for t in (0, 19, 31): + for c, rec in zip(b['cards'][t], m['tiles'][t]): + col = export.decode((dest / rec['colour']['file']).read_bytes()); geo = export.decode((dest / rec['geometry']['file']).read_bytes()); al = c['alpha']; wall = c['wall']; nr = c['near']; solid = (al > 0) & ~wall & ~nr; part = (al > 0.05) & (al < 0.95) & ~wall & ~nr; partial_seen += int(part.sum()); near_seen += int((nr & (al > 0)).sum()) + assert (col[..., 3] == np.rint(al * 255)).all(), 'alpha is not exact'; e = np.abs(col[..., :3] / 255.0 - c['albedo']).max(-1) + assert e[solid].mean() < 0.021 and np.percentile(e[solid], 99) < 0.081, ('albedo is off', e[solid].mean(), np.percentile(e[solid], 99)); assert part.sum() == 0 or e[part].mean() < 0.1, ('albedo at partial alpha is off: premultiplied?', e[part].mean()) + assert (geo[..., 3] == 255).all(); q = 1.0 / 255 + 1e-6; assert (((geo[..., 0] == 255) & (geo[..., 1] == 255)) == wall).all(), 'the wall code is not R = G = 255 on exactly the wall pixels' + assert np.abs(geo[..., 0] / 255.0 * 2 - 1 - c['n_r'])[solid].max() < 2 * q and np.abs(geo[..., 1] / 255.0 * 2 - 1 - c['n_t'])[solid].max() < 2 * q, 'a normal channel is off or swapped' + assert np.abs(enc['log_d_min'] + geo[..., 2] / 255.0 * span - c['logd'])[solid].max() < span * q, 'the log-distance is off or not over the encoding range' + assert np.abs(c['n_r'][solid]).mean() > 0.05 and np.abs(c['n_t'][solid]).mean() > 0.01 and np.abs(c['n_r'][solid].mean() - c['n_t'][solid].mean()) > 0.0, 'the fixture does not tell the channels apart' + assert col[..., :3][solid].mean() > 20, 'albedo is zeroed'; assert (geo[..., 2][nr & (al > 0)] == 0).all(), 'a near pixel is not at the clip distance (B = 0)' + assert partial_seen > 0, 'the fixture has no partial alpha'; assert near_seen > 1000, 'the fixture has no near ground' + finally: shutil.rmtree(d) + +# ---------------------------------------------------------------------------------------- wall rows +def _first_sample_angle(b, i): + """Per column, the angle of the first sample card i reads: the first sample at or beyond its near seam, less the cross-fade half-width (card 0: sample 0 of the joined march, the near start).""" + k0 = np.zeros(NW, int) if i == 0 else np.array([np.searchsorted(b['D'], b['seams'][i - 1][x] * math.exp(-ridge.XF)) for x in range(NW)]); return k0, b['a'][k0, np.arange(NW)] +def test_wall_rows_flagged(): + """Every card, card 0 included, flags as wall exactly the rows below the angle of its first sample (the extruded face of the ridge it starts at; card 0's first sample is the near march's, under the frame, so it has none); the wall carries R = G = 255 in the geometry file and no other pixel has r2 + t2 above 1.02; wall pixels keep that sample's + distance and their albedo is the ground material of the sample's height with the face up (so a steep face is not rock), constant down the column.""" + steep = 0 + for make in (lambda: _bake(WALLED, [20]), lambda: _bake(WIDE3, [20, 55]), lambda: _bake(_receding, [6]), lambda: _bake(_ramp, [20], fixed_m=[20000.0])): # the ramp's seam is fixed: the wall must stand on the slope, below the height where every material is rock or snow + b = make(); lo = ridge.rowang - 0.5 / ridge.PXDEG_V; seen = 0 + for i, c in enumerate(b['cards']): + k0, a0 = _first_sample_angle(b, i); want = (lo[:, None] < a0[None, :])[c['top']:c['top'] + c['alpha'].shape[0]]; assert (c['wall'] == want).all(), ('wall rows are not the rows below the first sample', i, int((c['wall'] != want).sum())); seen += int(want.sum()) + geo = export.decode(export.encode_geometry(c['n_r'], c['n_t'], c['logd'], dict(log_d_min=math.log(D[0]), log_d_max=math.log(D[-1])), c['wall'])); r, t = geo[..., 0] / 255.0 * 2 - 1, geo[..., 1] / 255.0 * 2 - 1; code = (geo[..., 0] == 255) & (geo[..., 1] == 255) + assert (code == c['wall']).all() and (r[~code] ** 2 + t[~code] ** 2 <= 1.02).all(), 'the wall code is not on exactly the wall pixels, or a real normal reaches it' + for x in np.flatnonzero(c['wall'].any(0)): + rows = np.flatnonzero(c['wall'][:, x]); ld = c['logd'][rows, x]; assert np.ptp(ld) < 1e-5 and abs(math.exp(ld[0]) - b['D'][k0[x]]) < 1e-3 * b['D'][k0[x]] + 60, ('a wall keeps its sample distance', x) + want_alb = ridge.albedo(np.array([b['h'][k0[x], x]]), np.array([1.0]))[0]; assert np.abs(c['albedo'][rows, x] - want_alb).max() < 1e-5, ('wall albedo is not the ground material with the face up', x) + assert seen > 1000, 'the fixture has no wall' + for i in range(1, len(b['cards'])): + c = b['cards'][i]; steep += int((np.sqrt(np.clip(1 - c['n_r'] ** 2 - c['n_t'] ** 2, 0, 1))[c['wall']] < 0.93).sum()) + assert steep > 1000, 'no wall pixel has a steep face under it: a wall lit by its own normal would pass' +def test_the_sheet_lights_a_wall_with_the_face_up(): + """The contact sheet shades a wall pixel as an up-facing one whatever normal the card carries there, and a non-wall pixel by its normal.""" + n = 4; c = dict(albedo=np.ones((n, n, 3), np.float32), alpha=np.ones((n, n), np.float32), n_r=np.full((n, n), 0.9, np.float32), n_t=np.zeros((n, n), np.float32), wall=np.zeros((n, n), bool)); c['wall'][:, :2] = True + rgb, _ = export.lit(c); L = np.array(export.SHEET_LIGHT) / np.linalg.norm(export.SHEET_LIGHT); up = 0.35 + 0.65 * L[2]; tilted = 0.35 + 0.65 * np.clip(0.9 * L[0] + np.sqrt(1 - 0.81) * L[2], 0, 1) + assert np.allclose(rgb[:, :2], up) and np.allclose(rgb[:, 2:], tilted) and abs(up - tilted) > 0.05, (rgb[0, 0], rgb[0, 3]) +# ---------------------------------------------------------------------------------------- the near clip, the ground rows +def _nearest_solid(c): + """The nearest solid (alpha >= 0.5) pixel that is neither wall nor near ground of a card tile's interior columns, metres; None where there is none (computed here from the arrays, not by pack).""" + ld, al, wl, nr = (c[k][:, 2:-2] for k in ('logd', 'alpha', 'wall', 'near')); m = (al >= 0.5) & ~wl & ~nr; return float(np.exp(np.float64(ld[m].min()))) if m.any() else None +def test_r_max_holds_for_the_nearest_terrain_of_every_tile_and_near_only_tiles_bind_at_the_clip(): + """The offset range is where the linear map holds for the NEAREST solid terrain each card draws in each tile (ruling ridge-offset-range-fit), not its median: a tile whose card 0 spans 600 to 2000 m has its median near 1200 m, and at the r_max the median would give the 600 m pixels err past FIT_PX_MAX. + So the fit at every tile's nearest solid pixel is within the bound at r_max_m (over the circle) and at r_max_forward_m (phi 0), and the bound is reached: a little more offset breaks it at the binding tile. A tile whose card 0 draws only near ground (under the clip) is slid at the clip distance (its distance_m) and binds there.""" + b = _toy(); cs = [[dict(c) for c in tile] for tile in b['cards']]; c = dict(cs[7][0]); n = c['alpha'].shape[1] + ld = np.log(np.linspace(600.0, 2000.0, n))[None, :].repeat(c['alpha'].shape[0], 0).astype(np.float32); cs[7][0] = dict(c, logd=ld) + bad = dict(cs[5][0]); cs[5][0] = dict(bad, near=np.ones_like(bad['near']), logd=np.full_like(bad['logd'], math.log(300.0))) # tile 5: card 0 is all near ground + pk = export.pack(dict(b, cards=cs)); r, rf = pk['camera']['r_max_m'], pk['camera']['r_max_forward_m']; ppd = ridge.HPX_DEG; worst = worst_f = 0.0; seen = 0 + for t, tile in enumerate(cs): + for i, card in enumerate(tile): + d = _nearest_solid(card) + if d is None: assert (t, i) == (5, 0), ('a tile has no solid terrain but was not made all near ground', t, i); d = ridge.NEAR_CLIP_M + seen += 1; assert export.fit_px(d, r, ppd) <= export.FIT_PX_MAX + 1e-6 and export.fit_px(d, rf, ppd, 1) <= export.FIT_PX_MAX + 1e-6, ('the nearest terrain of a tile is outside the fit bound', t, i, d, r, rf) + worst, worst_f = max(worst, export.fit_px(d, r + 0.5, ppd)), max(worst_f, export.fit_px(d, rf + 0.5, ppd, 1)) + assert seen == 32 * 3 and worst > export.FIT_PX_MAX and worst_f > export.FIT_PX_MAX, ('the range stops short of the bound of the nearest terrain', worst, worst_f) + assert abs(pk['tiles'][7][0]['distance_m'] - float(np.exp(np.median(np.log(np.linspace(600.0, 2000.0, n)))))) < 1.0, 'the manifest distance is still the median' + assert r < export.solve_r_max([[1200.0 if (t, i) == (7, 0) else None for i in range(3)] for t in range(32)], [[100] * 3 for _ in range(32)], ppd) - 5, 'the range is the median model' + near_free = export.pack(_toy()); assert pk['camera']['r_max_m'] < near_free['camera']['r_max_m'], 'the 600 m pixels do not bind' +def test_the_near_clip_compare_does_not_depend_on_float32_rounding(): + """A card 0 exactly at the near clip is accepted whatever the clip's value: exp of a float32 ln 700 is 699.99994, which a strict compare against a 700 m clip refuses; one 1.5 per mille under the clip is still refused.""" + saved = ridge.NEAR_CLIP_M; d = tempfile.mkdtemp() + try: + for clip in (500.0, 520.0, 700.0): + ridge.NEAR_CLIP_M = clip; b = _toy(dists=(clip, 15000.0, 50000.0), amp=0.0); pk = export.pack(b); assert pk['tiles'][0][0]['distance_m'] != 0 + try: dest = _write(d + f'/ok{clip:g}', b, pk) + except export.Refusal as e: assert 'near clip' not in str(e), ('a card 0 at the near clip was refused', clip, str(e)); raise + assert dest.exists(), ('a card 0 at the near clip was refused', clip) + b = _toy(dists=(698.9, 15000.0, 50000.0), amp=0.0); ridge.NEAR_CLIP_M = 700.0; _refuses(d + '/under', b, export.pack(b), 'a card 0 under the near clip was written') + finally: ridge.NEAR_CLIP_M = saved; shutil.rmtree(d) +def test_set_view_keeps_the_ground_rows_under_the_horizon(): + """A skyline +28 degrees high and +5 low is compressed below 1x so the horizon sits at row 450 or above (GROUND_ROWS_MIN rows under it); one +60 degrees high cannot hold them even at 0.5x and refuses naming sky_deg and the floor; a Vienna-like skyline + (the 10x clamp) and one that fits its anchors above 1x are unchanged to 1e-9; a low skyline never binds the horizon.""" + assert ridge.GROUND_ROWS_MIN == 150 and ridge.E_MIN == 0.5 and ridge.NEAR_CLIP_M == 500.0, 'the authored constants are pinned' + sk = np.full(W, 5.0); sk[100] = 60.0 + try: ridge.set_view(sk) + except export.Refusal as e: + if 'under the horizon' not in str(e): raise # not the refusal: a crash + assert '60.00' in str(e) and '8.89' in str(e) and '0.5x' in str(e), str(e) + else: assert False, 'a skyline that cannot hold the ground rows was accepted' + sk = np.full(W, 5.0); sk[100] = 28.0; v = ridge.set_view(sk) + assert v['horizon_row'] <= H - ridge.GROUND_ROWS_MIN + 1e-6 and v['exaggeration'] < 1 and v['binds'] == 'horizon' and abs(v['horizon_row'] - (H - ridge.GROUND_ROWS_MIN)) < 1e-6 and abs(v['px_per_deg'] - (H - 150 - 0.04 * H) / 28.0) < 1e-9, v + sk = np.full(W, 1.7); sk[7] = 2.0; v = ridge.set_view(sk); assert abs(v['px_per_deg'] - 10 * ridge.HPX_DEG) < 1e-9 and abs(v['horizon_row'] - (2.0 * 10 * ridge.HPX_DEG + 0.04 * H)) < 1e-9 and v['binds'] == 'ceiling', v + sk = np.full(W, 1.0); sk[7] = 3.0; sk[9] = -1.0; v = ridge.set_view(sk); assert abs(v['px_per_deg'] - 0.62 * H / 4.0) < 1e-9 and v['binds'] == 'skyline', v + sk = np.full(W, -30.0); sk[7] = 12.0; v = ridge.set_view(sk); assert abs(v['px_per_deg'] - 0.5 * ridge.HPX_DEG) < 1e-9 and v['binds'] == 'floor', v + sk = np.full(W, -9.0); sk[7] = -2.0; v = ridge.set_view(sk); assert v['horizon_row'] < 0.04 * H and v['binds'] != 'horizon', v +def test_the_near_clip_and_the_ground_rows_are_refused_at_the_writer(): + """The march starts at the authored near clip; write_bake refuses a bake whose card 0 stands nearer than it (nothing nearer is baked as terrain), and validate_manifest, which the writer and the committed bakes go through, refuses a plane with fewer than GROUND_ROWS_MIN rows under the horizon and accepts exactly that many.""" + assert D[0] == ridge.NEAR_CLIP_M == ridge.schedule(True)[0] and (np.diff(D) > 0).all(), 'the march does not start at the near clip' + d = tempfile.mkdtemp() + try: + b = _toy(); pk = export.pack(b); near = export.pack(_toy(dists=(300.0, 15000.0, 50000.0))); assert near['report']['nearest_m'] < ridge.NEAR_CLIP_M + try: _write(d + '/near', b, near) + except export.Refusal as e: assert 'near clip' in str(e), str(e); assert not os.path.exists(d + '/near') + else: assert False, 'a bake whose card 0 stands inside the near clip was written' + _refuses(d + '/short', b, pk, 'a plane with 149 rows under the horizon was written', view=dict(b['view'], horizon_row=451.0)); dest = _write(d + '/ok', b, pk, view=dict(b['view'], horizon_row=450.0)); m = json.load(open(dest / 'manifest.json')); export.validate_manifest(m) + m['view']['horizon_row'] = 450.5 + try: export.validate_manifest(m) + except export.Refusal as e: assert 'GROUND_ROWS_MIN' in str(e), str(e) + else: assert False, 'validate_manifest accepted a short plane' + finally: shutil.rmtree(d) +# ---------------------------------------------------------------------------------------- the near ground: the place's own terrain under the clip, drawn by card 0 inside the clip's silhouette +def _blend(L, ld, arr, x): + """arr (K, n) read at hits of log-distance ld (between the samples of log-distance L), blended by the fraction between the two samples: what ridge.cards does for a normal.""" + kk = np.searchsorted(L, ld, 'left'); kp = np.maximum(kk - 1, 0); t = np.clip((ld - L[kp]) / np.maximum(L[kk] - L[kp], 1e-12), 0, 1); return arr[kp, x] + t * (arr[kk, x] - arr[kp, x]) +def test_near_ground_draws_inside_the_clip_silhouette(): + """Eye 1.6 m over flat ground, a ramp hill at 150-300 m rising to 60 m (its crest stands far above the angle of the clip sample) and a far ridge in half the ring: card 0 composites to the opaque view of the FAR march (the hill above the clip line is not drawn; without the cap it stands above the far ridge), + its rows are near ground, not wall, and their normals are normals(dn, hn) of the near march blended at the hit (the ramp's, not the far sample 0's).""" + saved = ridge.P.get('eye_m'); ridge.P.update(eye_m=1.6) + try: + far = block(36, 359.99, 20000, 21500, 1500); hf = lambda dk, az: np.maximum(np.where((dk >= 150) & (dk < 300), 0.4 * (dk - 150), 0.0), np.asarray(far(dk, az), float)) + A, Hh = rays(hf, eye=1.6); a, h = ridge.prefilter(D, Hh, 0.0); ridge.set_view(a.max(0)); near = near_rays(hf); Dj, Aj, Hj, Nj = ridge.join_near(D, a, h, near); aw, hw, nj = _w(Aj), _w(Hj), tuple(_w(x) for x in Nj) + c = ridge.cards(Dj, aw, hw, np.zeros((0, NW)), nj)[0]; comp = _canvas(c); opq = ridge.opaque(_w(a)); err = np.abs(comp - opq).max(); assert err < export.COVER_TOL, ('card 0 draws outside the silhouette of the terrain at the clip', err) + free = ridge.cards(Dj, _w(np.concatenate([near[1], a])), hw, np.zeros((0, NW)), nj)[0]; assert np.abs(_canvas(free) - opq).max() > 5 * export.COVER_TOL, 'the fixture cannot tell a hill above the clip line (the cap is not tested)' + x = 300; al, nrr, wl, ld = c['alpha'][:, x], c['near'][:, x], c['wall'], c['logd'][:, x]; sel = (al > 0.99) & nrr; assert sel.sum() > 20 and not wl.any(), ('card 0 has wall rows', int(wl.sum()), int(sel.sum())); assert nrr[al > 0.5].mean() > 0.9, 'the rows under the clip are not flagged near' + L = np.log(Dj); q = ld[sel].astype(np.float64); want = np.stack([_blend(L, q, nj[0], x), _blend(L, q, nj[1], x), _blend(L, q, nj[2], x)]); m = np.sqrt((want ** 2).sum(0)) + assert np.abs(c['n_r'][sel, x] - want[0] / m).max() < 2e-3 and np.abs(c['n_t'][sel, x] - want[1] / m).max() < 2e-3, 'a near row has not its own normal'; assert (np.abs(c['n_r'][sel, x]) > 0.5).sum() > 5, 'the fixture has no ramp rows' + finally: ridge.P.update(eye_m=saved) +def test_near_ground_has_the_material_and_relief_of_its_own_heights(): + """Near heights stepping in blocks of 20 columns across the grass, forest and rock thresholds (100, 1000, 2100 m, the forest block a 45 degree hill) while the far march stands at 1000 m everywhere: every near row carries albedo(its own height, its own n_up), so the blocks differ where the ground does, and the hill face is steep (n_up < 0.93) and rock.""" + dn = ridge.near_schedule(); K, Kn = len(D), len(dn); a = np.tile(np.linspace(5.0, 12.0, K)[:, None], (1, W)); h = np.full((K, W), 1000.0); blk = (np.arange(W) // 20) % 3; base = np.array([100.0, 1000.0, 2100.0])[blk] + hn = np.broadcast_to(base[None, :], (Kn, W)).copy(); hn[:, blk == 1] += dn[:, None]; an = np.tile(np.linspace(-8.0, 5.0, Kn)[:, None], (1, W)); ridge.P.update(eye_m=EYE); ridge.set_view(a.max(0)) + Dj, Aj, Hj, Nj = ridge.join_near(D, a, h, (dn, an, hn)); assert all(np.array_equal(u[Kn:], w) for u, w in zip(Nj, ridge.normals(D, h))), 'the far normals are not those of the far march alone' + c = ridge.cards(Dj, _w(Aj), _w(Hj), np.zeros((0, NW)), tuple(_w(x) for x in Nj))[0]; up = np.sqrt(np.clip(1 - c['n_r'] ** 2 - c['n_t'] ** 2, 0, 1)); got = {} + for x in range(NW): + if not 3 <= x % 20 <= 16: continue + sel = (c['alpha'][:, x] > 0.99) & c['near'][:, x] & (c['logd'][:, x] < math.log(ridge.NEAR_CLIP_M) - 1e-6); assert sel.sum() > 50, ('no near rows', x) # the crest row that meets the clip sample itself is not under the clip + if blk[x] == 1: assert up[sel, x].max() < 0.93 and np.abs(c['albedo'][sel, x] - np.asarray(ridge.ROCK)).max() < 1e-4, ('the hill face is not steep rock', x, float(up[sel, x].max())) + else: assert np.abs(c['albedo'][sel, x] - ridge.albedo(np.full(int(sel.sum()), base[x]), up[sel, x])).max() < 1e-5, ('a near row has not the material of its own height', x) + got[blk[x]] = c['albedo'][sel, x].mean(0) + assert np.abs(got[0] - got[1]).max() > 0.05 and np.abs(got[1] - got[2]).max() > 0.05 and np.abs(got[0] - got[2]).max() > 0.05, ('the blocks do not differ where the ground does', got) +def test_near_pixels_bind_at_the_clip_wherever_they_are(): + """Near pixels are drawn at the clip, so each tile's near pixels count in the r_max fit as terrain at the clip alongside its solid pixels, and never in distance_m. Card 0, every other tile 3000 m away: (a) a tile whose lower third is near ground at 150 m keeps its distance_m but binds at 500 m, and without those pixels binds nothing; + (b) a tile of near ground only has distance_m == NEAR_CLIP_M, binds exactly like terrain at 500 m, and write_bake accepts it; (c) a tile of near ground with a few stray solid pixels at 3000 m binds the same, whatever the stray count (no threshold).""" + b = _toy(); base = export.pack(b); cs = [[dict(c) for c in tile] for tile in b['cards']]; c = cs[3][0]; n = c['alpha'].shape[0]; near = np.zeros_like(c['near']); near[n * 2 // 3:] = True; ppd = ridge.HPX_DEG + dists = lambda pk: [[e and e['distance_m'] for e in row] for row in pk['tiles']]; at_clip = lambda src: dict(src, logd=np.full_like(src['logd'], math.log(ridge.NEAR_CLIP_M))) + cs[3][0] = dict(c, near=near, logd=np.where(near, math.log(150.0), c['logd']).astype(np.float32)); a = export.pack(dict(b, cards=cs)) + cs[3][0] = dict(c, alpha=np.where(near, 0.0, c['alpha']).astype(np.float32)); cut = export.pack(dict(b, cards=cs)); cs[3][0] = at_clip(c); clip = export.pack(dict(b, cards=cs)) + assert dists(a) == dists(cut) == dists(base) and cut['camera'] == base['camera'], ('near pixels were measured in distance_m', dists(a)[3], dists(base)[3]) + assert a['camera'] == clip['camera'] and a['camera']['r_max_m'] < base['camera']['r_max_m'] - 5 and a['camera']['r_max_forward_m'] < base['camera']['r_max_forward_m'] - 5, ('near pixels in a tile of terrain do not bind at the clip', a['camera'], base['camera']) + cs[3][0] = c; only = dict(cs[9][0]); cs[9][0] = dict(only, near=np.ones_like(only['near']), logd=np.full_like(only['logd'], math.log(300.0))); ob = dict(b, cards=cs); pk = export.pack(ob); d = tempfile.mkdtemp() + try: + assert pk['tiles'][9][0]['distance_m'] == ridge.NEAR_CLIP_M and pk['tiles'][8][0]['distance_m'] == base['tiles'][8][0]['distance_m'], ('a near-only tile', pk['tiles'][9][0]['distance_m']) + r, rf = pk['camera']['r_max_m'], pk['camera']['r_max_forward_m']; assert r < base['camera']['r_max_m'] - 5 and rf < base['camera']['r_max_forward_m'] - 5, ('a near-only tile does not bind', pk['camera'], base['camera']) + assert export.fit_px(ridge.NEAR_CLIP_M, r, ppd) <= export.FIT_PX_MAX + 1e-6 and export.fit_px(ridge.NEAR_CLIP_M, rf, ppd, 1) <= export.FIT_PX_MAX + 1e-6 and export.fit_px(ridge.NEAR_CLIP_M, r + 0.5, ppd) > export.FIT_PX_MAX, ('the near-only tile is not bound at the clip distance it is slid at', r, rf) + cs[9][0] = at_clip(only); assert export.pack(dict(b, cards=cs))['camera'] == pk['camera'], 'a near-only tile does not bind exactly like terrain at the clip' + assert _write(d + '/ok', ob, pk).exists(), 'a bake with a near-only tile was refused' + for stray in (1, 6, 40): # solid pixels at 3000 m among the near ground of a tile: it binds at the clip all the same + st = np.zeros_like(only['near']); st[:1, 10:10 + stray] = True; cs[9][0] = dict(only, near=~st, logd=np.where(st, only['logd'], math.log(300.0)).astype(np.float32)); sp = export.pack(dict(b, cards=cs)) + assert sp['camera'] == pk['camera'], ('stray solid pixels unbound a tile of near ground', stray, sp['camera'], pk['camera']) + finally: shutil.rmtree(d) +def test_cards_refuses_a_march_without_the_near_ground(): + """ridge.cards on a march whose first sample is the near clip (not joined to the near march) raises, naming join_near: card 0 can never extrude the clip sample again.""" + A, Hh = rays(THREE); ridge.P.update(eye_m=EYE); ridge.set_view(A.max(0)) + try: ridge.cards(D, _w(A), _w(Hh), np.zeros((0, NW))) + except export.Refusal as e: assert 'join_near' in str(e), str(e) + else: assert False, 'cards drew a march that starts at the near clip' +def test_near_march_starts_at_your_feet(): + """The near march starts at NEAR_START_M = 1 m, strictly increasing in steps of max(1 m, 0.02 d) up to 10 m, its last sample under the clip; over flat ground with a 1.6 m eye and a frame bottom below -8 degrees (the ray of the frame bottom meets the ground 11 m out) card 0 has no wall row and draws the ground to the bottom row.""" + dn = ridge.near_schedule(); st = np.diff(dn); assert dn[0] == ridge.NEAR_START_M == 1.0 and (st > 0).all() and dn[-1] < ridge.NEAR_CLIP_M and dn[-1] + 10.0 >= ridge.NEAR_CLIP_M and 150 < len(dn) < 190, (dn[0], len(dn)) + assert np.allclose(st, np.clip(0.02 * dn[:-1], 1.0, 10.0)), 'the steps are not max(1 m, 0.02 d) capped at 10 m' + saved = ridge.P.get('eye_m'); ridge.P.update(eye_m=1.6) + try: + hf = lambda dk, az: np.zeros_like(az); A, Hh = rays(hf, eye=1.6); a, h = ridge.prefilter(D, Hh, 0.0); sk = np.full(W, -5.0); sk[::2] = 2.0; ridge.set_view(sk); assert ridge.BOTTOM_DEG < -8.0, ridge.BOTTOM_DEG + Dj, Aj, Hj, Nj = ridge.join_near(D, a, h, near_rays(hf)); c = ridge.cards(Dj, _w(Aj), _w(Hj), np.zeros((0, NW)), tuple(_w(x) for x in Nj))[0] + assert not c['wall'].any() and c['near'].any(), ('card 0 has wall under the frame bottom', int(c['wall'].sum())); assert _canvas(c)[H - 1, 300] > 0.99 and c['near'][H - 1 - c['top'], 300], 'the bottom row is not near ground' + finally: ridge.P.update(eye_m=saved) +def test_near_march_is_float64_and_prefiltered(): + """near_march over an injected 64 x 64 mosaic: a plane tilted 5% at 3000 m gives adjacent-column near normals within 1e-3 of each other (heights in float32 would jump by 0.1 at a metre's distance); 30 m roof blocks under sigma 100 leave near heights within 2 m of each other, and without the prefilter they do not.""" + saved = (ridge.P, ridge.PXDEG_V); lat, lon = 47.0, 11.0; n = 64; ridge.P = dict(id='nearmos', lat=lat, lon=lon, rmax_km=1, eye_m=3001.6); key = (ridge.P['id'], ridge.mosaic_key(ridge.P)); ridge.PXDEG_V = 100.0 + x = np.arange(n)[None, :] * (111320.0 * math.cos(math.radians(lat)) / 3600.0); y = np.arange(n)[:, None] + try: + ridge._mos[key] = ((3000.0 + 0.05 * x + 0 * y).astype(np.float32), lat + 32 / 3600.0, lon - 32 / 3600.0); dn, an, hn = ridge.near_march(0.0); nn = ridge.normals(dn, hn) + assert hn.dtype == np.float64 and an.dtype == np.float64 and hn.shape == (len(ridge.near_schedule()), W) and (dn == ridge.near_schedule()).all(), (hn.dtype, hn.shape) + assert max(np.abs(np.diff(nn[0], axis=1)).max(), np.abs(np.diff(nn[1], axis=1)).max()) < 1e-3, ('the near normals jump between adjacent columns', float(np.abs(np.diff(nn[1], axis=1)).max())) + ridge._mos[key] = ((3000.0 + 30.0 * ((np.arange(n)[None, :] + y) % 2)).astype(np.float32), lat + 32 / 3600.0, lon - 32 / 3600.0); raw = np.ptp(ridge.near_march(0.0)[2]); flat = np.ptp(ridge.near_march(100.0)[2]) + assert raw > 20.0 and flat < 2.0, ('sigma is not applied to the near heights', raw, flat) + finally: ridge.P, ridge.PXDEG_V = saved; ridge._mos.pop(key, None) +# ---------------------------------------------------------------------------------------- rules that no other test touched +def test_seams_keep_their_separation(): + """Two authored targets closer than SEAM_SEP (6 and 7 km, 0.15 nat): the seams still sit at least 0.4 nat apart in every column.""" + s = _bake(THREE, [6, 7])['seams']; assert (np.log(s[1]) - np.log(s[0]) >= 0.4 - 1e-9).all(), float((np.log(s[1]) - np.log(s[0])).min()) +def test_elev_is_the_curved_refracted_angle(): + """elev(h, d) = atan2(h - eye - d^2 / 2R x (1 - k), d): at 80 km a 3000 m summit stands 0.3 deg lower than the flat angle, and curvature False gives the flat one.""" + ridge.P.update(eye_m=EYE); d = 80000.0; want = math.degrees(math.atan2(3000.0 - EYE - d * d / (2 * ridge.R_EARTH) * (1 - ridge.KREF), d)); flat = math.degrees(math.atan2(3000.0 - EYE, d)) + assert abs(float(ridge.elev(3000.0, d)) - want) < 1e-9 and abs(float(ridge.elev(3000.0, d, curvature=False)) - flat) < 1e-9 and flat - want > 0.25, (want, flat) + assert ridge.elev(np.array([[1000.0, 1200.0]]), np.array([[d], [d / 2]])).shape == (2, 2) +def test_coverage_counts_every_visible_row_including_the_foreground(): + """Per column the coverage sums to the visible rows of the opaque view: (min(skyline, top) - bottom) x px per degree, the rows below the first sample included once, not twice (a ground just under the eye shows below the first sample).""" + for i, hf in enumerate((terrain(block(0, 359.99, 0, 20000, 91), block(0, 359.99, 20000, 21500, 600)), THREE)): + A, Hh = rays(hf); ridge.P.update(eye_m=EYE); ridge.set_view(A.max(0)); aw = _w(A); cov = ridge.coverage(D, aw); want = np.clip(np.minimum(aw.max(0), ridge.TOP_DEG) - ridge.BOTTOM_DEG, 0, None) * ridge.PXDEG_V + assert np.abs(cov.sum(0) - want).max() < 1e-6, np.abs(cov.sum(0) - want).max(); assert cov.shape == (ridge.COV_BINS, NW) + if i == 0: assert (cov[0] > 100).all(), ('no foreground rows in the first bin', float(cov[0].min())) +def test_cards_interpolate_between_samples_and_renormalise(): + """On a ramp face every card pixel sits between two samples: its log-distance lies strictly between theirs (not on the nearer sample), and its normal is the normalised blend of theirs by that same fraction (the samples carry alternating normals, so a blend + that is not renormalised, or a hit that is not interpolated, differs).""" + hf = terrain(lambda dk, az: np.where(dk >= 4000, GROUND + 0.5 * (dk - 4000), 0.0) + 0 * az); A, Hh = rays(hf); ridge.P.update(eye_m=EYE); ridge.set_view(A.max(0)); Dj, aw, hw, _ = _join(hf, A, Hh); k = np.arange(len(Dj))[:, None] + nr = np.broadcast_to(np.where(k % 2 == 0, -0.8, 0.8), aw.shape).astype(float); nt = np.broadcast_to(np.where(k % 3 == 0, 0.3, -0.3), aw.shape).astype(float); nu = np.sqrt(1 - nr ** 2 - nt ** 2) * 0 + 0.5 + c = ridge.cards(Dj, aw, hw, np.zeros((0, NW)), nrm=(nr, nt, nu))[0]; x = 300; sel = np.flatnonzero(c['alpha'][:, x] > 0.999); ld = c['logd'][sel, x].astype(np.float64); L = np.log(Dj); kk = np.searchsorted(L, ld, 'left'); kp = kk - 1; ok = kp >= 0 + t = (ld - L[np.maximum(kp, 0)]) / (L[kk] - L[np.maximum(kp, 0)]); inner = ok & (t > 0.02) & (t < 0.98); assert inner.sum() > 0.3 * len(sel), ('hits sit on samples, not between them', int(inner.sum()), len(sel)) + mix = lambda arr: arr[np.maximum(kp, 0), x] + t * (arr[kk, x] - arr[np.maximum(kp, 0), x]); m = np.sqrt(mix(nr) ** 2 + mix(nt) ** 2 + mix(nu) ** 2); er = np.abs(c['n_r'][sel, x] - mix(nr) / m)[inner]; et = np.abs(c['n_t'][sel, x] - mix(nt) / m)[inner] + assert er.max() < 1e-3 and et.max() < 1e-3, ('the normal is not the normalised blend of the two samples', er.max(), et.max()) + +TESTS = [v for k, v in sorted(globals().items()) if k.startswith("test_")] +if __name__ == '__main__': + fails = 0 + for t in TESTS: + try: t(); print("PASS", t.__name__) + except Exception as e: fails += 1; print("FAIL", t.__name__, "|", type(e).__name__, "|", traceback.extract_tb(e.__traceback__)[-1].filename, "|", repr(e)[:300]) # name | class | file of the innermost frame | repr: mutate.py kills only on an AssertionError raised in this directory + print("failures:", fails); sys.exit(1 if fails else 0) diff --git a/scripts/ridge-sky/build-night-sky.py b/scripts/ridge-sky/build-night-sky.py new file mode 100644 index 00000000..984548fd --- /dev/null +++ b/scripts/ridge-sky/build-night-sky.py @@ -0,0 +1,121 @@ +"""Pack the night sky's data into src/app/features/scene/ridge/nightSkyData.ts. + +Usage (parse downloads with isolated mode): + python -I scripts/ridge-sky/build-night-sky.py BSC5.DAT.GZ CONSTELLATIONS.LINES.JSON OUT.ts [MAX_MAG] + +Inputs, each in its own directory, never run from inside it: + bsc5.dat.gz Yale Bright Star Catalogue, 5th revised ed. (Hoffleit & Warren 1991), public domain; CDS/VizieR V/50. + CDS was unreachable on 2026-11-20, so the file is the SAO Telescope Data Center's copy of the same + catalogue: http://tdc-www.harvard.edu/catalogs/bsc5.dat.gz (fixed-width, CDS V/50 `catalog` layout). + constellations.lines.json d3-celestial (Olaf Frohn), BSD-3-Clause: + https://github.com/ofrohn/d3-celestial/blob/master/data/constellations.lines.json + GeoJSON MultiLineStrings of [RA, Dec] degrees, J2000. + +Stars (stars cut to Vmag <= MAX_MAG, default 5.5), 6 bytes each: RA uint16 (360 deg / 65536), Dec uint16 ((dec + 90) / 180 * 65535), +Vmag uint8 ((V + 2) * 20), B-V uint8 ((B-V + 0.5) * 50; missing B-V stored as 0.65). Little endian, base64. +Lines: per chain a uint8 vertex count then that many (RA uint16, Dec uint16) pairs, same scaling; chains concatenated; base64. +""" +import base64 +import gzip +import hashlib +import json +import struct +import sys + + +def sha256(path): + h = hashlib.sha256() + with open(path, "rb") as f: + h.update(f.read()) + return h.hexdigest() + + +def ra16(deg): + return int(round((deg % 360.0) / 360.0 * 65536.0)) % 65536 + + +def dec16(deg): + return int(round((deg + 90.0) / 180.0 * 65535.0)) + + +def stars(path, max_mag): + out = [] + for line in gzip.open(path, "rt", encoding="latin-1"): + if len(line) < 114 or not line[75:77].strip(): + continue # entries struck from the catalogue carry no position + try: + ra = (int(line[75:77]) + int(line[77:79]) / 60.0 + float(line[79:83]) / 3600.0) * 15.0 + dec = int(line[84:86]) + int(line[86:88]) / 60.0 + int(line[88:90]) / 3600.0 + dec = -dec if line[83] == "-" else dec + v = float(line[102:107]) + except ValueError: + continue + if v > max_mag: + continue + bv_text = line[109:114].strip() + bv = float(bv_text) if bv_text else 0.65 + out.append((ra, dec, v, bv)) + out.sort(key=lambda s: s[2]) # brightest first: a prefix is the brighter stars + return out + + +def pack_stars(rows): + buf = bytearray() + for ra, dec, v, bv in rows: + vq = min(255, max(0, int(round((v + 2.0) * 20.0)))) + bq = min(255, max(0, int(round((bv + 0.5) * 50.0)))) + buf += struct.pack(" 4 else 5.5 + rows = stars(bsc, max_mag) + star_bytes = pack_stars(rows) + line_bytes, chains = pack_lines(lines) + text = f"""/* eslint-disable */ +// GENERATED by scripts/ridge-sky/build-night-sky.py: do not edit. The night sky's data, J2000. +// Stars: Yale Bright Star Catalogue, 5th revised ed. (Hoffleit & Warren 1991; public domain), Vmag <= {max_mag}, {len(rows)} stars. +// source http://tdc-www.harvard.edu/catalogs/bsc5.dat.gz (copy of CDS/VizieR V/50), sha256 {sha256(bsc)} +// Constellation lines: d3-celestial constellations.lines.json (Olaf Frohn, BSD-3-Clause), {chains} chains. +// source https://github.com/ofrohn/d3-celestial/blob/master/data/constellations.lines.json, sha256 {sha256(lines)} +// Layout: see the generator's docstring. Stars are sorted brightest first. + +export const STAR_COUNT = {len(rows)}; +export const STARS_B64 = ` +{wrap(base64.b64encode(star_bytes).decode())} +`; + +export const LINE_CHAINS = {chains}; +export const LINES_B64 = ` +{wrap(base64.b64encode(line_bytes).decode())} +`; +""" + with open(out, "w", encoding="utf-8", newline="\n") as f: + f.write(text) + print(f"{len(rows)} stars, {chains} chains, {len(star_bytes)} + {len(line_bytes)} bytes") + + +main() diff --git a/src/app/components/AccountDataEditor.tsx b/src/app/components/AccountDataEditor.tsx index 2dbaf1f1..8c28b935 100644 --- a/src/app/components/AccountDataEditor.tsx +++ b/src/app/components/AccountDataEditor.tsx @@ -16,6 +16,7 @@ import { } from 'folds'; import { MatrixError } from 'matrix-js-sdk'; import { Cursor } from '../plugins/text-area'; +import { PhoneHit } from '../styles/PhoneHit.css'; import { syntaxErrorPosition } from '../utils/dom'; import { AsyncStatus, useAsyncCallback } from '../hooks/useAsyncCallback'; import { Page, PageHeader } from './page'; @@ -294,7 +295,7 @@ export function AccountDataEditor({ - + diff --git a/src/app/components/BackupRestore.tsx b/src/app/components/BackupRestore.tsx index 068f437b..57a18674 100644 --- a/src/app/components/BackupRestore.tsx +++ b/src/app/components/BackupRestore.tsx @@ -30,6 +30,7 @@ import { } from '../hooks/useKeyBackup'; import { stopPropagation } from '../utils/keyboard'; import { useRestoreBackupOnVerification } from '../hooks/useRestoreBackupOnVerification'; +import { PhoneHit } from '../styles/PhoneHit.css'; type BackupStatusProps = { enabled: boolean; @@ -177,6 +178,7 @@ export function BackupRestoreTile({ crypto }: BackupRestoreTileProps) { )} Device Verification - + diff --git a/src/app/components/DeviceVerificationSetup.tsx b/src/app/components/DeviceVerificationSetup.tsx index 433fa6a1..68f42221 100644 --- a/src/app/components/DeviceVerificationSetup.tsx +++ b/src/app/components/DeviceVerificationSetup.tsx @@ -25,6 +25,7 @@ import { ActionUIA, ActionUIAFlowsLoader } from './ActionUIA'; import { useMatrixClient } from '../hooks/useMatrixClient'; import { useAlive } from '../hooks/useAlive'; import { UseStateProvider } from './UseStateProvider'; +import { PhoneHit } from '../styles/PhoneHit.css'; type UIACallback = ( authDict: AuthDict | null @@ -301,7 +302,7 @@ export const DeviceVerificationSetup = forwardRef Setup Device Verification - + @@ -336,7 +337,7 @@ export const DeviceVerificationReset = forwardRef Reset Device Verification - + diff --git a/src/app/components/Pdf-viewer/PdfViewer.tsx b/src/app/components/Pdf-viewer/PdfViewer.tsx index 9c7fd980..d0e5f715 100644 --- a/src/app/components/Pdf-viewer/PdfViewer.tsx +++ b/src/app/components/Pdf-viewer/PdfViewer.tsx @@ -27,6 +27,7 @@ import { AsyncStatus } from '../../hooks/useAsyncCallback'; import { useZoom } from '../../hooks/useZoom'; import { createPage, usePdfDocumentLoader, usePdfJSLoader } from '../../plugins/pdfjs-dist'; import { stopPropagation } from '../../utils/keyboard'; +import { PhoneHit, PhoneHitSpread24 } from '../../styles/PhoneHit.css'; export type PdfViewerProps = { name: string; @@ -108,7 +109,7 @@ export const PdfViewer = as<'div', PdfViewerProps>(
- + @@ -117,6 +118,7 @@ export const PdfViewer = as<'div', PdfViewerProps>( ( {Math.round(zoom * 100)}% 1 ? 'Success' : 'SurfaceVariant'} outlined={zoom > 1} size="300" diff --git a/src/app/components/ServerConfigsLoader.test.ts b/src/app/components/ServerConfigsLoader.test.ts new file mode 100644 index 00000000..527895a0 --- /dev/null +++ b/src/app/components/ServerConfigsLoader.test.ts @@ -0,0 +1,32 @@ +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { loadServerConfigs } from './ServerConfigsLoader'; + +const server = (authMetadata: () => Promise) => + ({ + getCapabilities: async () => ({}), + getMediaConfig: async () => ({ 'm.upload.size': 1 }), + getAuthMetadata: authMetadata, + } as unknown as Parameters[0]); + +describe('loadServerConfigs', () => { + afterEach(() => vi.restoreAllMocks()); + + it('logs nothing when the homeserver has no OIDC (no auth metadata came back)', async () => { + const error = vi.spyOn(console, 'error').mockImplementation(() => {}); + const configs = await loadServerConfigs( + server(async () => { + throw new Error('M_UNRECOGNIZED'); + }) + ); + expect(error).not.toHaveBeenCalled(); + expect(configs.authMetadata).toBeUndefined(); + expect(configs.mediaConfig).toEqual({ 'm.upload.size': 1 }); + }); + + it('still logs and drops auth metadata that came back malformed', async () => { + const error = vi.spyOn(console, 'error').mockImplementation(() => {}); + const configs = await loadServerConfigs(server(async () => ({ issuer: 'https://x' }))); + expect(error).toHaveBeenCalled(); + expect(configs.authMetadata).toBeUndefined(); + }); +}); diff --git a/src/app/components/ServerConfigsLoader.tsx b/src/app/components/ServerConfigsLoader.tsx index 3c8ce8eb..ea56d8d2 100644 --- a/src/app/components/ServerConfigsLoader.tsx +++ b/src/app/components/ServerConfigsLoader.tsx @@ -1,5 +1,10 @@ import { ReactNode, useCallback, useMemo } from 'react'; -import { Capabilities, validateAuthMetadata, ValidatedAuthMetadata } from 'matrix-js-sdk'; +import { + Capabilities, + MatrixClient, + validateAuthMetadata, + ValidatedAuthMetadata, +} from 'matrix-js-sdk'; import { AsyncStatus, useAsyncCallbackValue } from '../hooks/useAsyncCallback'; import { useMatrixClient } from '../hooks/useMatrixClient'; import { MediaConfig } from '../hooks/useMediaConfig'; @@ -14,35 +19,42 @@ export type ServerConfigs = { type ServerConfigsLoaderProps = { children: (configs: ServerConfigs) => ReactNode; }; +/** + * The homeserver's capabilities, media config and OIDC metadata. A homeserver with no OIDC (and the demo's pretend + * server) returns no auth metadata: there is nothing to validate, so nothing is logged. Metadata that did come back + * and fails validation is logged and dropped. + */ +export async function loadServerConfigs( + mx: Pick +): Promise { + const result = await Promise.allSettled([ + mx.getCapabilities(), + mx.getMediaConfig(), + mx.getAuthMetadata(), + ]); + + const capabilities = promiseFulfilledResult(result[0]); + const mediaConfig = promiseFulfilledResult(result[1]); + const authMetadata = promiseFulfilledResult(result[2]); + let validatedAuthMetadata: ValidatedAuthMetadata | undefined; + + if (authMetadata) { + try { + validatedAuthMetadata = validateAuthMetadata(authMetadata); + } catch (e) { + console.error(e); + } + } + + return { capabilities, mediaConfig, authMetadata: validatedAuthMetadata }; +} + export function ServerConfigsLoader({ children }: ServerConfigsLoaderProps) { const mx = useMatrixClient(); const fallbackConfigs = useMemo(() => ({}), []); const [configsState] = useAsyncCallbackValue( - useCallback(async () => { - const result = await Promise.allSettled([ - mx.getCapabilities(), - mx.getMediaConfig(), - mx.getAuthMetadata(), - ]); - - const capabilities = promiseFulfilledResult(result[0]); - const mediaConfig = promiseFulfilledResult(result[1]); - const authMetadata = promiseFulfilledResult(result[2]); - let validatedAuthMetadata: ValidatedAuthMetadata | undefined; - - try { - validatedAuthMetadata = validateAuthMetadata(authMetadata); - } catch (e) { - console.error(e); - } - - return { - capabilities, - mediaConfig, - authMetadata: validatedAuthMetadata, - }; - }, [mx]) + useCallback(() => loadServerConfigs(mx), [mx]) ); const configs: ServerConfigs = diff --git a/src/app/components/UIAFlowOverlay.tsx b/src/app/components/UIAFlowOverlay.tsx index a2bdd1b8..49e1d821 100644 --- a/src/app/components/UIAFlowOverlay.tsx +++ b/src/app/components/UIAFlowOverlay.tsx @@ -13,6 +13,7 @@ import { IconButton, } from 'folds'; import FocusTrap from 'focus-trap-react'; +import { PhoneHit } from '../styles/PhoneHit.css'; export type UIAFlowOverlayProps = { currentStep: number; @@ -53,6 +54,7 @@ export function UIAFlowOverlay({ > {(anchorRef) => ( - setOpen(!open)}> - - - }> - - setOpen(false), - clickOutsideDeactivates: true, - escapeDeactivates: stopPropagation, - }} - > - -
- - - - } - after={ - <> - setToolbar(!toolbar)} - aria-pressed={toolbar} - > - - - - - - - - - - } - bottom={ - toolbar && ( -
- - -
- ) - } - /> -
-
-
-
-
- - ); -} diff --git a/src/app/components/editor/Toolbar.tsx b/src/app/components/editor/Toolbar.tsx index 7d701c42..3721b909 100644 --- a/src/app/components/editor/Toolbar.tsx +++ b/src/app/components/editor/Toolbar.tsx @@ -36,6 +36,7 @@ import { KeySymbol } from '../../utils/key-symbol'; import { useSetting } from '../../state/hooks/settings'; import { settingsAtom } from '../../state/settings'; import { stopPropagation } from '../../utils/keyboard'; +import { PhoneHit, PhoneHitRoom36, PhoneHitSpread36 } from '../../styles/PhoneHit.css'; function BtnTooltip({ text, shortCode }: { text: string; shortCode?: string }) { return ( @@ -72,6 +73,7 @@ export function MarkButton({ format, icon, tooltip }: MarkButtonProps) { {(triggerRef) => ( {(triggerRef) => ( {(triggerRef) => ( handleMenuSelect(1)} size="400" @@ -178,6 +182,7 @@ export function HeadingBlockButton() { > {(triggerRef) => ( handleMenuSelect(2)} size="400" @@ -193,6 +198,7 @@ export function HeadingBlockButton() { > {(triggerRef) => ( handleMenuSelect(3)} size="400" @@ -208,6 +214,7 @@ export function HeadingBlockButton() { } > {(triggerRef) => ( {(triggerRef) => ( setIsMarkdown(!isMarkdown)} diff --git a/src/app/components/emoji-board/components/Sidebar.tsx b/src/app/components/emoji-board/components/Sidebar.tsx index de22b483..d2d5f197 100644 --- a/src/app/components/emoji-board/components/Sidebar.tsx +++ b/src/app/components/emoji-board/components/Sidebar.tsx @@ -14,6 +14,7 @@ import { } from 'folds'; import classNames from 'classnames'; import * as css from './styles.css'; +import { PhoneHit } from '../../../styles/PhoneHit.css'; export function Sidebar({ children }: { children: ReactNode }) { return ( @@ -68,6 +69,7 @@ function SidebarBtn({ > {(ref) => ( ( Seen by - +
diff --git a/src/app/components/image-editor/ImageEditor.tsx b/src/app/components/image-editor/ImageEditor.tsx index 1ec474e8..0f072bb0 100644 --- a/src/app/components/image-editor/ImageEditor.tsx +++ b/src/app/components/image-editor/ImageEditor.tsx @@ -2,6 +2,7 @@ import React from 'react'; import classNames from 'classnames'; import { Box, Chip, Header, Icon, IconButton, Icons, Text, as } from 'folds'; import * as css from './ImageEditor.css'; +import { PhoneHit } from '../../styles/PhoneHit.css'; export type ImageEditorProps = { name: string; @@ -24,7 +25,7 @@ export const ImageEditor = as<'div', ImageEditorProps>( >
- + diff --git a/src/app/components/image-pack-view/ImagePackView.tsx b/src/app/components/image-pack-view/ImagePackView.tsx index ab81d503..15b1cd08 100644 --- a/src/app/components/image-pack-view/ImagePackView.tsx +++ b/src/app/components/image-pack-view/ImagePackView.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { Box, IconButton, Text, Icon, Icons, Scroll, Chip } from 'folds'; import { PackAddress } from '../../plugins/custom-emoji'; +import { PhoneHit } from '../../styles/PhoneHit.css'; import { Page, PageHeader, PageContent } from '../page'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { RoomImagePack } from './RoomImagePack'; @@ -29,7 +30,7 @@ export function ImagePackView({ address, requestClose }: ImagePackViewProps) { - + diff --git a/src/app/components/image-viewer/ImageViewer.tsx b/src/app/components/image-viewer/ImageViewer.tsx index 4956a7b6..4d2d7694 100644 --- a/src/app/components/image-viewer/ImageViewer.tsx +++ b/src/app/components/image-viewer/ImageViewer.tsx @@ -7,6 +7,7 @@ import * as css from './ImageViewer.css'; import { useZoom } from '../../hooks/useZoom'; import { usePan } from '../../hooks/usePan'; import { downloadMedia } from '../../utils/matrix'; +import { PhoneHit, PhoneHitSpread24 } from '../../styles/PhoneHit.css'; export type ImageViewerProps = { alt: string; @@ -33,7 +34,7 @@ export const ImageViewer = as<'div', ImageViewerProps>( >
- + @@ -42,6 +43,7 @@ export const ImageViewer = as<'div', ImageViewerProps>( ( {Math.round(zoom * 100)}% 1 ? 'Success' : 'SurfaceVariant'} outlined={zoom > 1} size="300" diff --git a/src/app/components/invite-user-prompt/InviteUserPrompt.tsx b/src/app/components/invite-user-prompt/InviteUserPrompt.tsx index ddac0576..a503fe13 100644 --- a/src/app/components/invite-user-prompt/InviteUserPrompt.tsx +++ b/src/app/components/invite-user-prompt/InviteUserPrompt.tsx @@ -42,6 +42,7 @@ import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { BreakWord } from '../../styles/Text.css'; import { useAlive } from '../../hooks/useAlive'; +import { PhoneHit } from '../../styles/PhoneHit.css'; const SEARCH_OPTIONS: UseAsyncSearchOptions = { limit: 1000, @@ -173,7 +174,7 @@ export function InviteUserPrompt({ room, requestClose }: InviteUserProps) { - + diff --git a/src/app/components/join-address-prompt/JoinAddressPrompt.tsx b/src/app/components/join-address-prompt/JoinAddressPrompt.tsx index 50a89418..ffd5241c 100644 --- a/src/app/components/join-address-prompt/JoinAddressPrompt.tsx +++ b/src/app/components/join-address-prompt/JoinAddressPrompt.tsx @@ -20,6 +20,7 @@ import { stopPropagation } from '../../utils/keyboard'; import { isRoomAlias, isRoomId } from '../../utils/matrix'; import { parseMatrixToRoom, parseMatrixToRoomEvent, testMatrixTo } from '../../plugins/matrix-to'; import { tryDecodeURIComponent } from '../../utils/dom'; +import { PhoneHit } from '../../styles/PhoneHit.css'; type JoinAddressProps = { onOpen: (roomIdOrAlias: string, via?: string[], eventId?: string) => void; @@ -82,7 +83,7 @@ export function JoinAddressPrompt({ onOpen, onCancel }: JoinAddressProps) { Join with Address - +
diff --git a/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx b/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx index 217491e6..832dd59d 100644 --- a/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx +++ b/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx @@ -20,6 +20,7 @@ import { MatrixError } from 'matrix-js-sdk'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback'; import { stopPropagation } from '../../utils/keyboard'; +import { PhoneHit } from '../../styles/PhoneHit.css'; type LeaveRoomPromptProps = { roomId: string; @@ -68,7 +69,7 @@ export function LeaveRoomPrompt({ roomId, onDone, onCancel }: LeaveRoomPromptPro Leave Room - +
diff --git a/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx b/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx index 8709b942..6c75ef99 100644 --- a/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx +++ b/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx @@ -20,6 +20,7 @@ import { MatrixError } from 'matrix-js-sdk'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback'; import { stopPropagation } from '../../utils/keyboard'; +import { PhoneHit } from '../../styles/PhoneHit.css'; type LeaveSpacePromptProps = { roomId: string; @@ -68,7 +69,7 @@ export function LeaveSpacePrompt({ roomId, onDone, onCancel }: LeaveSpacePromptP Leave Space - + diff --git a/src/app/components/logo/logoMark.css.ts b/src/app/components/logo/logoMark.css.ts new file mode 100644 index 00000000..4c967088 --- /dev/null +++ b/src/app/components/logo/logoMark.css.ts @@ -0,0 +1,9 @@ +import { globalStyle, style } from '@vanilla-extract/css'; + +/** + * The Ratatoskr mark is white on transparent (Meta's matte). On any light theme (they all carry `prism-light`) a class + * of this name darkens it to the dark ink; put it on every that shows the mark on a themed surface. The favicon and + * notification icons are files the browser draws and cannot take it. + */ +export const LogoMark = style({}); +globalStyle(`body.prism-light .${LogoMark}`, { filter: 'brightness(0.18)' }); diff --git a/src/app/components/message/FileHeader.tsx b/src/app/components/message/FileHeader.tsx index 2ffc9ec4..41cef5f4 100644 --- a/src/app/components/message/FileHeader.tsx +++ b/src/app/components/message/FileHeader.tsx @@ -2,6 +2,7 @@ import { Badge, Box, Icon, IconButton, Icons, Spinner, Text, as, toRem } from 'f import React, { ReactNode, useCallback } from 'react'; import { EncryptedAttachmentInfo } from 'browser-encrypt-attachment'; import FileSaver from 'file-saver'; +import { PhoneHit } from '../../styles/PhoneHit.css'; import { mimeTypeToExt } from '../../utils/mimeTypes'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { useMediaAuthentication } from '../../hooks/useMediaAuthentication'; @@ -48,6 +49,7 @@ export function FileDownloadButton({ filename, url, mimeType, encInfo }: FileDow variant={hasError ? 'Critical' : 'SurfaceVariant'} size="300" radii="300" + className={PhoneHit} > {downloading ? ( diff --git a/src/app/components/message/Reaction.css.ts b/src/app/components/message/Reaction.css.ts index f020080e..08003f0e 100644 --- a/src/app/components/message/Reaction.css.ts +++ b/src/app/components/message/Reaction.css.ts @@ -1,6 +1,9 @@ import { createVar, style } from '@vanilla-extract/css'; import { DefaultReset, FocusOutline, color, config, toRem } from 'folds'; +import { MOBILE_BREAKPOINT } from '../../hooks/useScreenSize'; +import { PHONE_TAP } from '../../styles/PhoneHit.css'; +const PHONE = `screen and (max-width: ${MOBILE_BREAKPOINT}px)`; const Container = createVar(); const ContainerHover = createVar(); const ContainerActive = createVar(); @@ -25,6 +28,14 @@ export const Reaction = style([ selectors: { 'button&': { cursor: 'pointer', + // Phone tap target: the chip is 26 px tall, so its hit area grows 9 px above and below (an ::after) and the + // same 9 px of margin opens the row, so the chips of one row and of the next never share a tap. + '@media': { [PHONE]: { position: 'relative', marginBlock: (PHONE_TAP - 26) / 2 } }, + }, + 'button&::after': { + '@media': { + [PHONE]: { content: '""', position: 'absolute', inset: `${-(PHONE_TAP - 26) / 2}px 0` }, + }, }, '&[aria-pressed=true]': { vars: { diff --git a/src/app/components/message/Reply.css.ts b/src/app/components/message/Reply.css.ts index 7e5540fd..d5254ecb 100644 --- a/src/app/components/message/Reply.css.ts +++ b/src/app/components/message/Reply.css.ts @@ -31,6 +31,7 @@ export const Reply = style({ }); export const ReplyContent = style({ + minWidth: 0, opacity: config.opacity.P300, selectors: { @@ -39,3 +40,19 @@ export const ReplyContent = style({ }, }, }); + +export const ReplyText = style({ + display: '-webkit-box', + WebkitBoxOrient: 'vertical', + WebkitLineClamp: 2, + overflow: 'hidden', + minWidth: 0, + maxWidth: '100%', + overflowWrap: 'anywhere', + wordBreak: 'break-word', +}); + +export const ReplyWrap = style({ + minWidth: 0, + maxWidth: '100%', +}); diff --git a/src/app/components/message/Reply.tsx b/src/app/components/message/Reply.tsx index 57bf2af9..894b3b03 100644 --- a/src/app/components/message/Reply.tsx +++ b/src/app/components/message/Reply.tsx @@ -101,7 +101,14 @@ export const Reply = as<'div', ReplyProps>( const bodyJSX = body ? scaleSystemEmoji(trimReplyFromBody(body)) : fallbackBody; return ( - + {threadRootId && ( )} @@ -119,7 +126,7 @@ export const Reply = as<'div', ReplyProps>( onClick={onClick} > {replyEvent !== undefined ? ( - + {badEncryption ? : bodyJSX} ) : ( diff --git a/src/app/components/message/content/AudioContent.tsx b/src/app/components/message/content/AudioContent.tsx index 478486a4..94132cea 100644 --- a/src/app/components/message/content/AudioContent.tsx +++ b/src/app/components/message/content/AudioContent.tsx @@ -3,6 +3,7 @@ import React, { ReactNode, useCallback, useRef, useState } from 'react'; import { Badge, Chip, Icon, IconButton, Icons, ProgressBar, Spinner, Text, toRem } from 'folds'; import { EncryptedAttachmentInfo } from 'browser-encrypt-attachment'; import { Range } from 'react-range'; +import { PhoneHitSpread24 } from '../../../styles/PhoneHit.css'; import { useMatrixClient } from '../../../hooks/useMatrixClient'; import { AsyncStatus, useAsyncCallback } from '../../../hooks/useAsyncCallback'; import { IAudioInfo } from '../../../../types/matrix/common'; @@ -159,6 +160,7 @@ export function AudioContent({ variant="SurfaceVariant" size="300" radii="Pill" + className={PhoneHitSpread24} onClick={() => setMute(!mute)} aria-pressed={mute} > diff --git a/src/app/components/message/layout/Bubble.tsx b/src/app/components/message/layout/Bubble.tsx index 066a827f..6f4e94b0 100644 --- a/src/app/components/message/layout/Bubble.tsx +++ b/src/app/components/message/layout/Bubble.tsx @@ -30,10 +30,8 @@ type BubbleLayoutProps = { hideBubble?: boolean; /** The sender is the signed-in user: right-aligned, in the accent colour, no avatar. */ own?: boolean; - /** A Mind's pose portrait; it replaces the avatar and sits beside (wide) or inside (phone) the bubble. */ + /** A Mind's pose portrait; it replaces the avatar and nests in a corner of the bubble. */ pose?: ReactNode; - /** On phones the portrait floats on the other side. */ - alt?: boolean; /** Delay in ms before the first-appearance animation; undefined plays none. */ enterDelay?: number; before?: ReactNode; @@ -41,7 +39,7 @@ type BubbleLayoutProps = { }; export const BubbleLayout = as<'div', BubbleLayoutProps>( - ({ hideBubble, own, pose, alt, enterDelay, before, header, children, style, ...props }, ref) => { + ({ hideBubble, own, pose, enterDelay, before, header, children, style, ...props }, ref) => { // `false` is a Mind's message continuing a run: aligned with the portraits, showing none. const poseRow = pose !== undefined; const arrow = !!before && !poseRow && !own; @@ -50,12 +48,7 @@ export const BubbleLayout = as<'div', BubbleLayoutProps>( @@ -67,28 +60,19 @@ export const BubbleLayout = as<'div', BubbleLayoutProps>( - {header && ( -
- {header} -
- )} + {header &&
{header}
} {hideBubble ? ( children ) : ( - + { + const filePath = `${process.cwd()}/src/app/components/message/layout/layout.css.ts`; + const { source } = await compile({ filePath, cwd: process.cwd(), identOption: 'debug' }); + const code = await processVanillaFile({ source, filePath, identOption: 'debug' }); + const bytes = Buffer.from( + (code.match(/source=#?([A-Za-z0-9+/=]+)/) as RegExpMatchArray)[1], + 'base64' + ); + return (bytes[0] === 0x1f && bytes[1] === 0x8b ? zlib.gunzipSync(bytes) : bytes).toString(); +}; + +const declarations = (css: string, className: string): string[] => { + const rule = new RegExp(`^\\.layout_${className}__[\\w-]+ \\{\\n([^}]*)\\}`, 'm').exec(css); + expect(rule, `no .layout_${className} rule emitted`).toBeTruthy(); + return (rule as RegExpExecArray)[1].split('\n').map((l) => l.trim().replace(/;$/, '')); +}; + +describe('bubble rows shrink to their column', () => { + it.each([ + ['BubbleColumn', ['min-width: 0']], + ['BubbleContentRow', ['min-width: 0', 'max-width: 100%']], + ['BubbleContent', ['min-width: 0']], + ])('%s', async (name, expected) => { + const css = await emitted(); + expect(declarations(css, name)).toEqual(expect.arrayContaining(expected)); + }); + + it('BubbleContent keeps its 800px cap inside the column width', async () => { + const css = await emitted(); + expect(declarations(css, 'BubbleContent').join('\n')).toMatch(/max-width: min\(100%, 50rem\)/); + }); + + it('Bubble.tsx puts BubbleColumn on the column and BubbleContentRow on the row', () => { + const tsx = readFileSync( + `${process.cwd()}/src/app/components/message/layout/Bubble.tsx`, + 'utf8' + ); + expect(tsx).toMatch(/classNames\(css\.BubbleColumn,/); + expect(tsx).toMatch(//); + }); +}); diff --git a/src/app/components/message/layout/layout.css.ts b/src/app/components/message/layout/layout.css.ts index a724241c..39a40aa8 100644 --- a/src/app/components/message/layout/layout.css.ts +++ b/src/app/components/message/layout/layout.css.ts @@ -1,6 +1,7 @@ import { createVar, globalStyle, keyframes, style, styleVariants } from '@vanilla-extract/css'; import { recipe, RecipeVariants } from '@vanilla-extract/recipes'; import { DefaultReset, color, config, toRem } from 'folds'; +import { MOBILE_BREAKPOINT } from '../../../hooks/useScreenSize'; export const StickySection = style({ position: 'sticky', @@ -138,8 +139,22 @@ export const BubbleBefore = style({ minWidth: toRem(36), }); +// minWidth 0 down the column: a flex item never shrinks below its content (a reply quote's unbroken text), +// so without it a long quote pushes the column past the row, and a right-aligned row pushes it off the left edge. +export const BubbleColumn = style({ + minWidth: 0, +}); + +// The row around a bubble sizes to its content in a right-aligned (own) column, and a quote's nowrap text +// makes that content as wide as the quote: cap the row at the column so the bubble can shrink inside it. +export const BubbleContentRow = style({ + minWidth: 0, + maxWidth: '100%', +}); + export const BubbleContent = style({ - maxWidth: toRem(800), + minWidth: 0, + maxWidth: `min(100%, ${toRem(800)})`, padding: config.space.S200, backgroundColor: color.SurfaceVariant.Container, color: color.SurfaceVariant.OnContainer, @@ -152,39 +167,21 @@ export const BubbleContentArrowLeft = style({ borderTopLeftRadius: 0, }); -// Look of the three-doors mock-up (chat.gamecult.org/mockups/three-doors): a Mind's pose sits -// beside its bubble on wide screens; on phones it floats inside the bubble, overhanging the top -// edge, and the text wraps around its silhouette (shape-outside on the alpha channel). +// A Mind's pose nests in the corner of its bubble, on phones and wide screens alike: the sprite's +// body sits in the bubble's padding and the bubble's edge cuts it, so nothing hangs outside; the +// text wraps around its silhouette (shape-outside, traced from the alpha channel) and the bubble +// grows to hold it. How much of the art the edge may cut comes from pose/nest.ts. +// Displayed width of the whole sprite image; the crop fractions are multiples of it. +export const portraitWidth = createVar(); const PHONE = 'screen and (max-width: 700px)'; +const PORTRAIT = toRem(190); const PHONE_PORTRAIT = 'min(38vw, 160px)'; const PHONE_TEXT_FLOOR = toRem(170); -const PORTRAIT_OVERHANG = 58; -const PORTRAIT = toRem(124); -const POSE_GUTTER = toRem(14); +const BUBBLE_PAD = toRem(12); const BUBBLE_CORNER = toRem(6); const POP = 'cubic-bezier(0.34, 1.7, 0.64, 1)'; const RISE = 'cubic-bezier(0.34, 1.45, 0.64, 1)'; -export const BubbleRowPose = style({ - position: 'relative', - paddingLeft: `calc(${PORTRAIT} + ${POSE_GUTTER})`, - '@media': { - [PHONE]: { - paddingLeft: 0, - }, - }, -}); - -// A row that shows a portrait: room for it to hang above the bubble on phones. -export const BubbleRowPortrait = style({ - minHeight: PORTRAIT, - '@media': { - [PHONE]: { - minHeight: 0, - }, - }, -}); - export const BubbleRowOwn = style({ justifyContent: 'flex-end', }); @@ -198,66 +195,31 @@ export const BubbleHeaderOwn = style({ alignSelf: 'flex-end', }); -// Phone: name and time are one plain line in flow above the bubble, on the side opposite the -// portrait. It is as wide as the full name needs, up to the room beside the portrait; only a name -// longer than that wraps (and then the time drops below it). It is capped by the viewport, not by -// the column: a short bubble's column is narrower than its own name, and a percentage cap there -// truncated names to one letter. -export const BubbleHeaderPose = style({ - '@media': { - [PHONE]: { - alignSelf: 'flex-end', - // The band above the bubble where the portrait overhangs: the header sits at its foot, beside - // the portrait, so the overhang needs no margin of its own. - minHeight: toRem(PORTRAIT_OVERHANG), - display: 'flex', - flexDirection: 'column', - justifyContent: 'flex-end', - margin: `0 ${toRem(14)} ${toRem(2)}`, - width: 'max-content', - maxWidth: `calc(100vw - ${PHONE_PORTRAIT} - ${toRem(64)})`, - textAlign: 'right', - }, - }, -}); - -export const BubbleHeaderPoseAlt = style({ - '@media': { - [PHONE]: { - alignSelf: 'flex-start', - textAlign: 'left', - }, - }, -}); - -// A portrait row with no header (nothing to fill the overhang band) keeps the band as a margin. -globalStyle(`${BubbleRowPortrait}:not(:has(.${BubbleHeaderPose}))`, { - '@media': { - [PHONE]: { - marginTop: toRem(PORTRAIT_OVERHANG), - }, - }, -}); - -export const BubbleColumnPose = style({ - position: 'relative', -}); - +// The message body is a flex column, which forms its own block formatting context and would sit +// whole beside the floated portrait; as a plain block its lines wrap around the silhouette and +// then run the bubble's full width below it. export const BubbleContentPose = style({ - borderRadius: config.radii.R500, - borderTopLeftRadius: BUBBLE_CORNER, + display: 'flow-root', + overflow: 'clip', + padding: BUBBLE_PAD, +}); + +// A bubble that shows a portrait is at least portrait + a readable column wide, or the text beside +// it collapses to a strip. +export const BubbleContentPortrait = style({ + vars: { [portraitWidth]: PORTRAIT }, + minWidth: `min(100%, calc(${portraitWidth} + ${PHONE_TEXT_FLOOR}))`, '@media': { [PHONE]: { - display: 'flow-root', - // A bubble with a portrait is at least portrait + a readable column wide, or the text - // beside the portrait collapses to a strip. - minWidth: `min(100%, calc(${PHONE_PORTRAIT} + ${PHONE_TEXT_FLOOR}))`, - borderTopLeftRadius: config.radii.R500, - padding: `${toRem(24)} ${toRem(14)} ${toRem(14)}`, + vars: { [portraitWidth]: PHONE_PORTRAIT }, }, }, }); +globalStyle(`${BubbleContentPose} > div`, { + display: 'block', +}); + export const BubbleContentOwn = style({ backgroundColor: color.Primary.Container, color: color.Primary.OnContainer, @@ -266,51 +228,37 @@ export const BubbleContentOwn = style({ borderTopRightRadius: BUBBLE_CORNER, }); +// The button is the visible part of the sprite (the part inside the bubble's corner); the image +// inside it is offset by the crop. The inline --pose-* fractions (of the image width) come from +// nestView; until the art's size is known the button is simply the whole image. export const PoseButton = style({ - position: 'absolute', - top: 0, - left: `calc(-1 * (${PORTRAIT} + ${POSE_GUTTER}))`, - width: PORTRAIT, - height: PORTRAIT, + float: 'left', + width: `var(--pose-bw, ${portraitWidth})`, + height: 'var(--pose-bh, auto)', + // Out into the padding on the top, bottom and outer side, so the bubble's edge is the crop. + margin: `calc(-1 * ${BUBBLE_PAD}) ${toRem(6)} calc(-1 * ${BUBBLE_PAD}) calc(-1 * ${BUBBLE_PAD})`, padding: 0, border: 'none', background: 'none', cursor: 'pointer', lineHeight: 0, + overflow: 'hidden', + shapeMargin: toRem(7), transformOrigin: '50% 90%', - '@media': { - [PHONE]: { - position: 'static', - float: 'left', - width: PHONE_PORTRAIT, - height: 'auto', - margin: `${toRem(-82)} ${toRem(8)} 0 ${toRem(-12)}`, - shapeMargin: toRem(7), - WebkitMaskImage: 'linear-gradient(#000 84%, transparent)', - maskImage: 'linear-gradient(#000 84%, transparent)', - }, - }, }); export const PoseButtonAlt = style({ - '@media': { - [PHONE]: { - float: 'right', - margin: `${toRem(-82)} ${toRem(-12)} 0 ${toRem(8)}`, - }, - }, + float: 'right', + margin: `calc(-1 * ${BUBBLE_PAD}) calc(-1 * ${BUBBLE_PAD}) calc(-1 * ${BUBBLE_PAD}) ${toRem(6)}`, }); export const PosePortrait = style({ - width: '100%', - height: '100%', - objectFit: 'contain', - objectPosition: 'top', - '@media': { - [PHONE]: { - height: 'auto', - }, - }, + display: 'block', + width: portraitWidth, + maxWidth: 'none', + height: 'auto', + marginLeft: 'var(--pose-ix, 0)', + marginTop: 'var(--pose-iy, 0)', }); const pop = keyframes({ @@ -350,6 +298,12 @@ export const BubbleLeftArrow = style({ zIndex: 1, }); +// Phone tap target: a sender name is 23 px tall, so the button grows 11 px above and below (44+ px to tap) and the +// negative margin takes the growth back out of the layout. Sideways it cannot borrow from the layout the +// same way (a negative inline margin makes the button shrink inside its shrink-to-fit parent and clip the name), so +// a name under 44 px is 44 px wide, text kept at the start: real growth of at most 16 px, in a row with room for it. +// No background, border or outline moves. +const SCREEN_PHONE = `screen and (max-width: ${MOBILE_BREAKPOINT}px)`; export const Username = style({ overflow: 'hidden', whiteSpace: 'nowrap', @@ -357,6 +311,9 @@ export const Username = style({ selectors: { 'button&': { cursor: 'pointer', + '@media': { + [SCREEN_PHONE]: { paddingBlock: 11, marginBlock: -11, minWidth: 44, textAlign: 'start' }, + }, }, 'button&:hover, button&:focus-visible': { textDecoration: 'underline', @@ -395,61 +352,12 @@ export const MessageTextBody = recipe({ export type MessageTextBodyVariants = RecipeVariants; -// The message content is a flex column, which forms its own block formatting context and so sits -// whole beside the floated portrait: the text stays as narrow as the gap beside it for the -// bubble's full height. As a plain block its lines wrap around the silhouette and then run the -// bubble's full width below it. -globalStyle(`${BubbleContentPose} > div`, { - '@media': { - [PHONE]: { - display: 'block', - }, - }, -}); - -// The name wraps instead of ellipsising: the header already caps its own width, and Username's own -// nowrap + ellipsis, and the truncate on the Text inside it, clipped long names to "Heimdall o…". -globalStyle(`${BubbleHeaderPose} ${Username}, ${BubbleHeaderPose} ${Username} *`, { - '@media': { - [PHONE]: { - whiteSpace: 'normal', - overflow: 'visible', - textOverflow: 'clip', - overflowWrap: 'break-word', - }, - }, -}); - -// A name too long for one line takes its own lines and the time drops below it, instead of the -// name shrinking to a sliver beside the time (the header's one child is the flex row of both). The -// row hugs the side the header sits on, so a dropped time stays under the name's edge. -globalStyle(`${BubbleHeaderPose} > div`, { - '@media': { - [PHONE]: { - flexWrap: 'wrap', - justifyContent: 'flex-end', - }, - }, -}); - -globalStyle(`${BubbleHeaderPoseAlt} > div`, { - '@media': { - [PHONE]: { - justifyContent: 'flex-start', - }, - }, -}); - // An outside list marker hangs left of its item's text and ignores the portrait's silhouette, so // beside a left portrait the number lands under the art. Inside, it is a word on the first line // and wraps around the silhouette like the rest. globalStyle(`${BubbleContentPose} ol, ${BubbleContentPose} ul`, { - '@media': { - [PHONE]: { - listStylePosition: 'inside', - paddingLeft: 0, - }, - }, + listStylePosition: 'inside', + paddingLeft: 0, }); // While the background scene runs (html[data-scene]) a chat bubble is the one filled surface in diff --git a/src/app/components/message/pose/PoseAvatar.tsx b/src/app/components/message/pose/PoseAvatar.tsx index 75a4b333..05e60631 100644 --- a/src/app/components/message/pose/PoseAvatar.tsx +++ b/src/app/components/message/pose/PoseAvatar.tsx @@ -1,53 +1,126 @@ import React, { useEffect, useRef, useState } from 'react'; import classNames from 'classnames'; import * as css from '../layout/layout.css'; -import { poseSrc } from './poses'; +import { poseSrc, safeBox } from './poses'; +import { alphaBounds, nestView, type Box } from './nest'; import { silhouette } from './silhouette'; type PoseAvatarProps = { mind: string; pose: string; userId: string; - /** Float on the right on phones. */ + /** Nest in the bubble's top-right corner instead of the top-left. */ alt?: boolean; /** Play the first-appearance pop. */ enter?: boolean; - onClick: React.MouseEventHandler; + /** Without it the portrait is a plain image: no button, no tab stop. */ + onClick?: React.MouseEventHandler; +}; + +// Safe boxes derived from art's alpha, by source; the art is traced once. +const traced = new Map(); +const trace = (img: HTMLImageElement, src: string) => { + const hit = traced.get(src); + if (hit) return hit; + const w = img.naturalWidth; + const h = img.naturalHeight; + const ctx = document.createElement('canvas').getContext('2d'); + if (!ctx) return undefined; + ctx.canvas.width = w; + ctx.canvas.height = h; + ctx.drawImage(img, 0, 0); + const box = alphaBounds(ctx.getImageData(0, 0, w, h).data, w, h); + if (!box) return undefined; + const found = { box, size: [w, h] as [number, number] }; + traced.set(src, found); + return found; }; export function PoseAvatar({ mind, pose, userId, alt, enter, onClick }: PoseAvatarProps) { const src = poseSrc(mind, pose, import.meta.env.BASE_URL); const imgRef = useRef(null); const [shape, setShape] = useState(); + const measured = safeBox(mind, pose); + const [derived, setDerived] = useState<{ box: Box; size: [number, number] }>(); + const art = measured ?? (derived?.size ? derived : undefined); + // Measured boxes are cropped by the share Aqua's numbers allow; a box traced from the alpha is + // already tight to the art, so the bubble may take all of the transparent margin. + const view = art && nestView(art.box, art.size, !!alt, measured ? undefined : 1); - // On phones the bubble text wraps around the portrait's silhouette. Retraced when the art - // loads and when the portrait's width changes with the viewport. + // Art with no measured box: find its extent when it loads. + useEffect(() => { + setDerived(undefined); + const img = imgRef.current; + if (!img || measured) return undefined; + const find = () => { + if (!img.complete || img.naturalWidth === 0) return; + try { + setDerived(trace(img, src)); + } catch { + setDerived(undefined); + } + }; + find(); + img.addEventListener('load', find); + return () => img.removeEventListener('load', find); + }, [src, measured]); + + // The bubble text wraps around the portrait's silhouette. Retraced when the art loads, when its + // crop is known, and when its width changes with the viewport. useEffect(() => { const img = imgRef.current; if (!img) return undefined; - const trace = () => { + const retrace = () => { if (!img.complete || img.naturalWidth === 0) return; try { - setShape(silhouette(img, !alt)); + const box = img.parentElement; + const style = getComputedStyle(img); + setShape( + silhouette( + img, + !alt, + box + ? { + x: 0 - parseFloat(style.marginLeft || '0'), + y: 0 - parseFloat(style.marginTop || '0'), + width: box.clientWidth, + height: box.clientHeight, + } + : undefined + ) + ); } catch { setShape(undefined); } }; - trace(); - img.addEventListener('load', trace); - const resize = new ResizeObserver(trace); + retrace(); + img.addEventListener('load', retrace); + const resize = new ResizeObserver(retrace); resize.observe(img); return () => { - img.removeEventListener('load', trace); + img.removeEventListener('load', retrace); resize.disconnect(); }; - }, [src, alt]); + }, [src, alt, view?.x, view?.y, view?.width, view?.height]); + // Crop fractions are of the image's width, so one set serves every displayed size. + const frac = (px: number) => `calc(${css.portraitWidth} * ${px / (art?.size[0] ?? 1)})`; + const cropStyle = + art && view + ? ({ + '--pose-bw': frac(view.width), + '--pose-bh': frac(view.height), + '--pose-ix': frac(-view.x), + '--pose-iy': frac(-view.y), + } as React.CSSProperties) + : undefined; + + const Tag = onClick ? 'button' : 'span'; return ( - + ); } diff --git a/src/app/components/message/pose/nest.test.ts b/src/app/components/message/pose/nest.test.ts new file mode 100644 index 00000000..d8e6f36e --- /dev/null +++ b/src/app/components/message/pose/nest.test.ts @@ -0,0 +1,72 @@ +import { describe, expect, it } from 'vitest'; +import { alphaBounds, nestView } from './nest'; +import boxes from './safeBoxes.json'; + +describe('nestView', () => { + // Aqua neutral: 560x374, safe box [144,22,492,317] (right margin 68, top 22). + it('crops half the right and top margins for a top-right nest', () => { + expect(nestView([144, 22, 492, 317], [560, 374], true)).toEqual({ + x: 0, + y: 11, + width: 526, + height: 363, + }); + }); + + it('crops the left margin instead for a top-left nest', () => { + expect(nestView([144, 22, 492, 317], [560, 374], false)).toEqual({ + x: 72, + y: 11, + width: 488, + height: 363, + }); + }); + + it('never crops the top of art already touching it (smug, headband at y=0)', () => { + const v = nestView([140, 0, 487, 241], [560, 374], true); + expect(v.y).toBe(0); + expect(v.height).toBe(374); + }); + + it('can take the whole margin', () => { + expect(nestView([10, 4, 90, 50], [100, 60], true, 1)).toEqual({ + x: 0, + y: 4, + width: 90, + height: 56, + }); + }); + + it('keeps every measured safe box intact at the default share', () => { + const aqua = boxes.aqua as Record; + expect(Object.keys(aqua)).toHaveLength(15); + Object.values(aqua).forEach(([x0, y0, x1, y1, w, h]) => { + const right = nestView([x0, y0, x1, y1], [w, h], true); + expect(right.x).toBeLessThanOrEqual(x0); + expect(right.x + right.width).toBeGreaterThanOrEqual(x1); + expect(right.y).toBeLessThanOrEqual(y0); + const left = nestView([x0, y0, x1, y1], [w, h], false); + expect(left.x).toBeLessThanOrEqual(x0); + expect(left.x + left.width).toBe(w); + }); + }); +}); + +describe('alphaBounds', () => { + it('finds the opaque rectangle', () => { + const w = 6; + const h = 5; + const data = new Uint8ClampedArray(w * h * 4); + [ + [2, 1], + [4, 3], + ].forEach(([x, y]) => { + data[(y * w + x) * 4 + 3] = 255; + }); + expect(alphaBounds(data, w, h)).toEqual([2, 1, 5, 4]); + }); + + it('reports nothing for an empty image', () => { + expect(alphaBounds(new Uint8ClampedArray(16), 2, 2)).toBeUndefined(); + }); +}); diff --git a/src/app/components/message/pose/nest.ts b/src/app/components/message/pose/nest.ts new file mode 100644 index 00000000..ffee1490 --- /dev/null +++ b/src/app/components/message/pose/nest.ts @@ -0,0 +1,58 @@ +// A pose nests into the corner of its bubble: the sprite's body sits in the bubble's padding and is +// cut off by the bubble's edge, so nothing hangs outside it. + +/** [x0, y0, x1, y1] in image pixels, origin top-left, x1/y1 exclusive. */ +export type Box = [number, number, number, number]; + +// Share of the room between the safe box and the image edge that the bubble edge may cut away. +// Aqua's measurement says all of it can go; half leaves the outline a little air. +export const CROP_SHARE = 0.5; + +export type NestView = { + /** The visible region of the image, in pixels. */ + x: number; + y: number; + width: number; + height: number; +}; + +// The part of the image that shows, for a sprite in the bubble's top-right (`right`) or top-left +// corner. Only the corner's two sides are cropped: the side towards the bubble's edge and the top. +// The far side and the bottom stay whole; the bubble's bottom edge cuts the bust. +export const nestView = ( + safe: Box, + size: [number, number], + right: boolean, + share = CROP_SHARE +): NestView => { + const [w, h] = size; + const [x0, y0, x1] = safe; + const side = Math.round(share * (right ? w - x1 : x0)); + const top = Math.round(share * y0); + const x = right ? 0 : side; + return { x, y: top, width: w - side, height: h - top }; +}; + +// Bounds of the pixels whose alpha exceeds `min`, as a safe box for art with no measured one. +export const alphaBounds = ( + data: ArrayLike, + w: number, + h: number, + min = 8 +): Box | undefined => { + let x0 = w; + let y0 = h; + let x1 = 0; + let y1 = 0; + for (let y = 0; y < h; y += 1) { + for (let x = 0; x < w; x += 1) { + if (data[(y * w + x) * 4 + 3] > min) { + x0 = Math.min(x0, x); + x1 = Math.max(x1, x + 1); + y0 = Math.min(y0, y); + y1 = y + 1; + } + } + } + return x1 > x0 ? [x0, y0, x1, y1] : undefined; +}; diff --git a/src/app/components/message/pose/poses.test.ts b/src/app/components/message/pose/poses.test.ts index 81c2f0c6..c6089f62 100644 --- a/src/app/components/message/pose/poses.test.ts +++ b/src/app/components/message/pose/poses.test.ts @@ -3,10 +3,7 @@ import catalogue from './catalogue.json'; import { mindOfSender, poseSrc, - poseStatusLine, - poseStatuses, resolvePose, - splitNewestStatus, } from './poses'; describe('resolvePose', () => { @@ -53,52 +50,5 @@ describe('poseSrc', () => { }); }); -describe('poseStatuses', () => { - const ev = (sender: string, ts: number, label: unknown) => ({ - sender, - localpart: sender, - ts, - label, - }); - it('reports the latest pose per Mind and when its unbroken run began', () => { - const out = poseStatuses([ - ev('aqua', 1, 'happy'), - ev('aqua', 2, 'sigh'), - ev('aqua', 3, 'sigh'), - ev('alice', 4, 'happy'), - ev('eureka', 5, 'probe'), - ]); - expect(out).toEqual([ - { mind: 'aqua', pose: 'sigh', since: 2 }, - { mind: 'eureka', pose: 'probe', since: 5 }, - ]); - }); - it('treats unknown labels as neutral runs', () => { - expect(poseStatuses([ev('void', 1, 'bogus'), ev('void', 2, undefined)])).toEqual([ - { mind: 'void', pose: 'neutral', since: 1 }, - ]); - }); -}); -describe('poseStatusLine', () => { - it('formats the client-status line', () => { - const since = new Date(2026, 10, 4, 9, 5).getTime(); - expect(poseStatusLine({ mind: 'void', pose: 'reading', since })).toBe( - 'Ratatoskr: Void is reading, since 09:05' - ); - }); -}); -describe('splitNewestStatus', () => { - const s = (mind: string, since: number) => ({ mind, pose: 'happy', since }); - - it('picks the status that changed last and keeps the others in their order', () => { - const { newest, rest } = splitNewestStatus([s('eureka', 100), s('void', 300), s('nibu', 200)]); - expect(newest?.mind).toBe('void'); - expect(rest.map((r) => r.mind)).toEqual(['eureka', 'nibu']); - }); - - it('has no newest for an empty list', () => { - expect(splitNewestStatus([])).toEqual({ newest: undefined, rest: [] }); - }); -}); diff --git a/src/app/components/message/pose/poses.ts b/src/app/components/message/pose/poses.ts index 7175196a..b1f983ea 100644 --- a/src/app/components/message/pose/poses.ts +++ b/src/app/components/message/pose/poses.ts @@ -1,4 +1,6 @@ import catalogue from './catalogue.json'; +import safeBoxes from './safeBoxes.json'; +import type { Box } from './nest'; // Pose labels travel in the event content under POSE_KEY. The catalogue // (cast-art poses/catalogue.json, synced by `npm run sync:poses`) is the only @@ -40,50 +42,14 @@ export const resolvePose = (mind: string, label: unknown): string => { export const poseSrc = (mind: string, pose: string, base = '/'): string => `${base}public/poses/${artPath(mind, pose) ?? artPath(mind, NEUTRAL)}`; -export type PoseStatus = { mind: string; pose: string; since: number }; -export type PoseEvent = { - sender: string; - localpart?: string; - name?: string; - ts: number; - label: unknown; -}; - -// Latest pose per Mind in a room's events (oldest first), and when that pose -// began: the first of its unbroken run of messages carrying the same pose. -export const poseStatuses = (events: PoseEvent[]): PoseStatus[] => { - const bySender = new Map(); - events.forEach((e) => { - const mind = mindOfSender(e.localpart, e.name); - if (!mind) return; - const entry = bySender.get(e.sender) ?? { mind, run: [] }; - entry.run.push({ pose: resolvePose(mind, e.label), ts: e.ts }); - bySender.set(e.sender, entry); - }); - return [...bySender.values()].map(({ mind, run }) => { - const last = run[run.length - 1]; - let i = run.length - 1; - while (i > 0 && run[i - 1].pose === last.pose) i -= 1; - return { mind, pose: last.pose, since: run[i].ts }; - }); -}; - -// The status that changed last, and the rest in their given order (phones show only the first). -export const splitNewestStatus = ( - statuses: PoseStatus[] -): { newest: PoseStatus | undefined; rest: PoseStatus[] } => { - let newest: PoseStatus | undefined; - statuses.forEach((st) => { - if (!newest || st.since > newest.since) newest = st; - }); - return { newest, rest: statuses.filter((st) => st !== newest) }; -}; - -const two = (n: number) => String(n).padStart(2, '0'); - -// Client-status text. Rendered locally only; it is never sent to a room. -export const poseStatusLine = ({ mind, pose, since }: PoseStatus): string => { - const d = new Date(since); - const name = mind.charAt(0).toUpperCase() + mind.slice(1); - return `Ratatoskr: ${name} is ${pose}, since ${two(d.getHours())}:${two(d.getMinutes())}`; +// Safe-crop boxes measured from the art's pixels (Aqua, `aqua-pose-crop-boxes-20261110`): the +// head and headphones plus outline, which the bubble's edge must not cut. [x0, y0, x1, y1, width, +// height] in image pixels. Art with no entry gets its box from the sprite's alpha at load time. +const boxes = safeBoxes as Record>; +export const safeBox = ( + mind: string, + pose: string +): { box: Box; size: [number, number] } | undefined => { + const b = Object.prototype.hasOwnProperty.call(boxes, mind) ? boxes[mind][pose] : undefined; + return b ? { box: [b[0], b[1], b[2], b[3]], size: [b[4], b[5]] } : undefined; }; diff --git a/src/app/components/message/pose/safeBoxes.json b/src/app/components/message/pose/safeBoxes.json new file mode 100644 index 00000000..eff7011e --- /dev/null +++ b/src/app/components/message/pose/safeBoxes.json @@ -0,0 +1,19 @@ +{ + "aqua": { + "neutral": [144, 22, 492, 317, 560, 374], + "happy": [157, 22, 506, 317, 574, 374], + "amused": [154, 22, 500, 317, 562, 374], + "thinking": [154, 16, 500, 307, 562, 374], + "annoyed": [154, 4, 499, 282, 562, 374], + "surprised": [141, 5, 485, 282, 560, 374], + "concerned": [156, 4, 501, 283, 574, 374], + "fretful": [156, 16, 503, 305, 574, 374], + "weary": [161, 16, 509, 307, 624, 374], + "glare": [160, 5, 508, 282, 624, 374], + "smug": [140, 0, 487, 241, 560, 374], + "sigh": [154, 0, 500, 241, 574, 374], + "charging": [152, 0, 497, 241, 562, 374], + "delighted": [159, 0, 507, 241, 624, 374], + "content": [144, 16, 492, 306, 560, 374] + } +} diff --git a/src/app/components/message/pose/sentiment.test.ts b/src/app/components/message/pose/sentiment.test.ts new file mode 100644 index 00000000..bc4a8c28 --- /dev/null +++ b/src/app/components/message/pose/sentiment.test.ts @@ -0,0 +1,40 @@ +import { describe, expect, it } from 'vitest'; +import { classifyPose, messagePose } from './sentiment'; + +describe('classifyPose', () => { + it.each([ + ['annoyed', 'ugh, this again'], + ['surprised', 'wow, no way'], + ['amused', 'hahaha that is funny'], + ['happy', 'thanks, great work'], + ['thinking', 'should we ship it?'], + ['neutral', 'Merged the branch.'], + ['neutral', 'sorry, that failed with an error'], + ])('%s', (label, text) => expect(classifyPose(text)).toBe(label)); + it('is neutral for empty or non-string text', () => { + expect(classifyPose('')).toBe('neutral'); + expect(classifyPose(undefined)).toBe('neutral'); + expect(classifyPose(5)).toBe('neutral'); + }); + it('is deterministic', () => { + expect(classifyPose('thanks?')).toBe(classifyPose('thanks?')); + }); +}); + +describe('messagePose', () => { + it('lets an explicit label win over the text', () => { + expect(messagePose('aqua', { body: 'thanks!', 'org.gamecult.pose': 'annoyed' })).toBe( + 'annoyed' + ); + }); + it('keeps an unknown explicit label neutral instead of classifying', () => { + expect(messagePose('aqua', { body: 'thanks!', 'org.gamecult.pose': 'conduct' })).toBe( + 'neutral' + ); + }); + it('classifies when there is no label, and never outputs a signature label', () => { + expect(messagePose('aqua', { body: 'thanks!' })).toBe('happy'); + expect(messagePose('kiko', { body: 'sorry' })).toBe('neutral'); + expect(messagePose('aqua', {})).toBe('neutral'); + }); +}); diff --git a/src/app/components/message/pose/sentiment.ts b/src/app/components/message/pose/sentiment.ts new file mode 100644 index 00000000..bd685a07 --- /dev/null +++ b/src/app/components/message/pose/sentiment.ts @@ -0,0 +1,35 @@ +import { POSE_KEY, NEUTRAL, resolvePose } from './poses'; + +// catalogue.json beside this file is a vendored copy of /opt/commons/cast-art/poses/catalogue.json +// (npm run sync:poses); nothing else publishes it to the browser. +// Local sentiment -> pose label. A lexicon over the message text, no network, no model: the +// same text always gives the same pose. Rules are tried in order and the first hit wins, so a +// message that says "wow" and "thanks" reads as surprised. Only the shared labels (identical art +// for all eight Minds, catalogue.json) are ever output; signature labels are explicit-only. +const RULES: [string, RegExp][] = [ + ['annoyed', /\b(annoy\w*|ugh+|argh+|frustrat\w*|again\?|why won'?t|stop it)\b/i], + ['surprised', /\b(wow|whoa|woah|omg|no way|unexpected\w*|surpris\w*|wait,? what)\b|[?!]{2,}/i], + [ + 'determined', + /\b(let'?s (go|do|fix|ship)|on it|i'?ll (fix|do|handle)|will do|fixing|resolved?)\b/i, + ], + ['amused', /\b(ha(ha)+|lol|lmao|rofl|funny|hilarious)\b|😂|🤣/i], + [ + 'happy', + /\b(thanks?|thank you|thx|great|awesome|nice|love|perfect|excellent|yay|congrats)\b|🎉|😊/i, + ], + ['thinking', /\?\s*$|\b(hmm+|maybe|perhaps|i wonder|not sure|how (do|does|about)|what if)\b/i], +]; + +export const classifyPose = (text: unknown): string => { + if (typeof text !== 'string') return NEUTRAL; + const hit = RULES.find(([, re]) => re.test(text)); + return hit ? hit[0] : NEUTRAL; +}; + +// An explicit org.gamecult.pose label always wins, even when it is unknown (then neutral). +// Only events with no label are read for sentiment. +export const messagePose = (mind: string, content: Record): string => + content[POSE_KEY] !== undefined + ? resolvePose(mind, content[POSE_KEY]) + : resolvePose(mind, classifyPose(content.body)); diff --git a/src/app/components/message/pose/silhouette.test.ts b/src/app/components/message/pose/silhouette.test.ts index 9deb3f4f..ba9d5ecb 100644 --- a/src/app/components/message/pose/silhouette.test.ts +++ b/src/app/components/message/pose/silhouette.test.ts @@ -53,4 +53,22 @@ describe('silhouette', () => { silhouette({ clientWidth: 0, clientHeight: 0 } as HTMLImageElement, true) ).toBeUndefined(); }); + + it('traces only the visible part of a cropped portrait, drawn at its offset', () => { + const drawImage = vi.fn(); + const canvas = { + width: 0, + height: 0, + getContext: () => ({ + canvas, + drawImage, + getImageData: () => ({ data: new Uint8ClampedArray(40 * 8 * 4) }), + }), + }; + vi.stubGlobal('document', { createElement: () => canvas }); + const img = { clientWidth: 100, clientHeight: 20 } as HTMLImageElement; + silhouette(img, true, { x: 0, y: 12, width: 40, height: 8 }); + expect([canvas.width, canvas.height]).toEqual([40, 8]); + expect(drawImage).toHaveBeenCalledWith(img, 0, -12, 100, 20); + }); }); diff --git a/src/app/components/message/pose/silhouette.ts b/src/app/components/message/pose/silhouette.ts index e9596ded..019c0716 100644 --- a/src/app/components/message/pose/silhouette.ts +++ b/src/app/components/message/pose/silhouette.ts @@ -5,14 +5,23 @@ const ROW = 4; // `shape-outside: url()` cannot do this: the browser sizes that image at its natural size and // anchors it at the margin box, which the phone layout's negative top margin shifts down by the // overhang, so the exclusion neither matches the art's size nor its place. -export const silhouette = (img: HTMLImageElement, textOnRight: boolean): string | undefined => { - const w = Math.round(img.clientWidth); - const h = Math.round(img.clientHeight); +// +// `view` is the part of the displayed image that shows (the button's box, in displayed pixels): +// the portrait is cropped by the bubble, so the polygon is traced over what is left of the art. +export type View = { x: number; y: number; width: number; height: number }; + +export const silhouette = ( + img: HTMLImageElement, + textOnRight: boolean, + view?: View +): string | undefined => { + const w = Math.round(view?.width ?? img.clientWidth); + const h = Math.round(view?.height ?? img.clientHeight); const ctx = w > 0 && h > 0 ? document.createElement('canvas').getContext('2d') : null; if (!ctx) return undefined; ctx.canvas.width = w; ctx.canvas.height = h; - ctx.drawImage(img, 0, 0, w, h); + ctx.drawImage(img, 0 - (view?.x ?? 0), 0 - (view?.y ?? 0), img.clientWidth, img.clientHeight); const { data } = ctx.getImageData(0, 0, w, h); const outer = textOnRight ? 0 : w; const edge: string[] = []; diff --git a/src/app/components/nav/NavGutter.tsx b/src/app/components/nav/NavGutter.tsx new file mode 100644 index 00000000..c0a6e50e --- /dev/null +++ b/src/app/components/nav/NavGutter.tsx @@ -0,0 +1,12 @@ +import React, { ReactNode } from 'react'; +import * as css from './styles.css'; + +/** The fixed-width first column of a navigator row or section header; its content is centred in it. */ +export function NavGutter({ children }: { children: ReactNode }) { + return {children}; +} + +/** One nesting step: everything inside is indented by the same constant. */ +export function NavLevel({ children }: { children: ReactNode }) { + return
{children}
; +} diff --git a/src/app/components/nav/index.ts b/src/app/components/nav/index.ts index 12267446..2ed29601 100644 --- a/src/app/components/nav/index.ts +++ b/src/app/components/nav/index.ts @@ -4,3 +4,4 @@ export * from './NavEmptyLayout'; export * from './NavItem'; export * from './NavItemContent'; export * from './NavItemOptions'; +export * from './NavGutter'; diff --git a/src/app/components/nav/styles.css.ts b/src/app/components/nav/styles.css.ts index feee3276..a3845e90 100644 --- a/src/app/components/nav/styles.css.ts +++ b/src/app/components/nav/styles.css.ts @@ -2,15 +2,42 @@ import { ComplexStyleRule, StyleRule, createVar, globalStyle, style } from '@van import { RecipeVariants, recipe } from '@vanilla-extract/recipes'; import { ContainerColor, DefaultReset, Disabled, RadiiVariant, color, config, toRem } from 'folds'; import { surfaceInk } from '../../features/scene/sceneShell.css'; +import { skyLabelInk } from '../../features/scene/skyLabelInk'; // Wash strengths over the scene: rows and labels are faint, and hover, selected and pressed rows // are three distinct steps above them. -const SCRIM_LABEL = '12%'; -const SCRIM_ROW = '16%'; -const SCRIM_HOVER = '26%'; -const SCRIM_SELECTED = '36%'; +// Meta, 2026-11-09: "this UI needs no chrome". Rows and labels are bare ink on the scene; hover and selection keep a faint wash. +const SCRIM_LABEL = '0%'; +const SCRIM_ROW = '0%'; +const SCRIM_HOVER = '14%'; +const SCRIM_SELECTED = '22%'; const SCRIM_PRESSED = '48%'; +// The navigator's one column grid. Every row, section header and join row begins with a gutter of +// the same width, with its chevron, room icon or avatar centred in it, so every label starts at +// the same x for its depth; each nesting level (NavLevel) indents by one constant step. +const GUTTER = toRem(32); +const LEVEL_STEP = toRem(16); + +export const NavGutter = style({ + width: GUTTER, + minWidth: GUTTER, + flexShrink: 0, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', +}); + +export const NavLevel = style({ + paddingLeft: LEVEL_STEP, +}); + +// Chevrons and room icons are matched in measured ink (a room glyph is about 1.7x a chevron's; unread rooms stay far above), so a foldout is not outweighed by its rooms. +export const NAV_ICON_REST_OPACITY = 0.9; +// A room's glyph is bigger and denser than the chevron, so it rests lighter to read as the same weight. +export const NAV_ROOM_ICON_REST_OPACITY = 0.26; +export const NAV_ICON_UNREAD_OPACITY = 0.6; + export const NavCategory = style([ DefaultReset, { @@ -20,7 +47,16 @@ export const NavCategory = style([ export const NavCategoryHeader = style({ gap: config.space.S100, + selectors: { + // The header's own side padding would shift its gutter off the rows': the section button + // carries the same left inset as NavItemContent instead. + '&&': { paddingLeft: 0 }, + }, '@media': { + // A phone's section header is as tall as its 44 px button, so it does not overlap the next row. + 'screen and (max-width: 750px)': { + selectors: { '&&': { minHeight: toRem(44), height: toRem(44) } }, + }, // Category labels sit on the scene like the rows do, and need a wash to be read (wide screens; // a phone's list is plain text). 'screen and (min-width: 751px)': { @@ -85,6 +121,8 @@ const NavItemBase = style({ [PHONE]: { backgroundColor: 'transparent', borderRadius: 0, + // The row is as tall as the 44 px tap target inside it (EstateNavigator.css.ts), so neighbours do not overlap. + minHeight: toRem(44), }, [WIDE]: { selectors: { @@ -95,7 +133,7 @@ const NavItemBase = style({ backgroundColor: ContainerHover, }, // While the background scene runs the shell is clear (sceneShell.css.ts); a row is a faint - // wash of the theme's own surface: the terrain stays visible, the text stays readable. + // wash of the theme's own surface: the scene stays visible, the text stays readable. // Hover, the selected row and a press each strengthen it a step. ':root[data-scene] &': { backgroundColor: `color-mix(in srgb, ${surfaceInk} ${SCRIM_ROW}, transparent)`, @@ -221,6 +259,7 @@ phoneLabel(`.${NavItemBase}:has(.${NavLink}:active) ${label}`, { textDecorationLine: 'underline', }); phoneLabel(`:root[data-scene] ${label}`, { + color: skyLabelInk('inherit'), textShadow: `0 0 3px ${surfaceInk}, 0 0 8px ${surfaceInk}`, }); @@ -233,22 +272,18 @@ globalStyle(`:root[data-scene] ${NavItemBase} svg, :root[data-scene] ${NavItemBa }, }); -// The Join action on a phone is a plain underlined word, not a pill. +// The Join action is a plain underlined word on every screen, not a pill. export const NavAction = style({ - '@media': { - [PHONE]: { - selectors: { - '&&': { - backgroundColor: 'transparent', - boxShadow: 'none', - border: 'none', - borderRadius: 0, - minWidth: 0, - textDecoration: 'underline', - textUnderlineOffset: toRem(4), - flexShrink: 0, - }, - }, + selectors: { + '&&': { + backgroundColor: 'transparent', + boxShadow: 'none', + border: 'none', + borderRadius: 0, + minWidth: 0, + textDecoration: 'underline', + textUnderlineOffset: toRem(4), + flexShrink: 0, }, }, }); diff --git a/src/app/components/password-input/PasswordInput.tsx b/src/app/components/password-input/PasswordInput.tsx index 4ffe0d83..6aa0d4f3 100644 --- a/src/app/components/password-input/PasswordInput.tsx +++ b/src/app/components/password-input/PasswordInput.tsx @@ -1,6 +1,7 @@ import React, { ComponentProps, forwardRef } from 'react'; import { Icon, IconButton, Input, config, Icons } from 'folds'; import { UseStateProvider } from '../UseStateProvider'; +import { PhoneHit } from '../../styles/PhoneHit.css'; type PasswordInputProps = Omit, 'type' | 'size'> & { size: '400' | '500'; @@ -23,6 +24,7 @@ export const PasswordInput = forwardRef( <> {after} setVisible(!visible)} type="button" variant={visible ? 'Warning' : variant} diff --git a/src/app/components/room-topic-viewer/RoomTopicViewer.tsx b/src/app/components/room-topic-viewer/RoomTopicViewer.tsx index 52128772..0d091e7e 100644 --- a/src/app/components/room-topic-viewer/RoomTopicViewer.tsx +++ b/src/app/components/room-topic-viewer/RoomTopicViewer.tsx @@ -4,6 +4,7 @@ import classNames from 'classnames'; import Linkify from 'linkify-react'; import * as css from './style.css'; import { LINKIFY_OPTS, scaleSystemEmoji } from '../../plugins/react-custom-html-parser'; +import { PhoneHit } from '../../styles/PhoneHit.css'; export const RoomTopicViewer = as< 'div', @@ -26,7 +27,7 @@ export const RoomTopicViewer = as< {name}
- + diff --git a/src/app/components/text-viewer/TextViewer.tsx b/src/app/components/text-viewer/TextViewer.tsx index ec4ed0a5..e9e150b5 100644 --- a/src/app/components/text-viewer/TextViewer.tsx +++ b/src/app/components/text-viewer/TextViewer.tsx @@ -5,6 +5,7 @@ import { Box, Chip, Header, Icon, IconButton, Icons, Scroll, Text, as } from 'fo import { ErrorBoundary } from 'react-error-boundary'; import * as css from './TextViewer.css'; import { copyToClipboard } from '../../utils/dom'; +import { PhoneHit } from '../../styles/PhoneHit.css'; const ReactPrism = lazy(() => import('../../plugins/react-prism/ReactPrism')); @@ -53,7 +54,7 @@ export const TextViewer = as<'div', TextViewerProps>( >
- + diff --git a/src/app/components/uia-stages/PasswordStage.tsx b/src/app/components/uia-stages/PasswordStage.tsx index 0164cae6..a7ca2d06 100644 --- a/src/app/components/uia-stages/PasswordStage.tsx +++ b/src/app/components/uia-stages/PasswordStage.tsx @@ -4,6 +4,7 @@ import { AuthType } from 'matrix-js-sdk'; import { StageComponentProps } from './types'; import { ErrorCode } from '../../cs-errorcode'; import { PasswordInput } from '../password-input'; +import { PhoneHit } from '../../styles/PhoneHit.css'; export function PasswordStage({ stageData, @@ -45,7 +46,7 @@ export function PasswordStage({ Account Password - +
diff --git a/src/app/components/uia-stages/SSOStage.tsx b/src/app/components/uia-stages/SSOStage.tsx index e3d6126a..20decb6c 100644 --- a/src/app/components/uia-stages/SSOStage.tsx +++ b/src/app/components/uia-stages/SSOStage.tsx @@ -1,6 +1,7 @@ import { Box, Button, color, config, Dialog, Header, Icon, IconButton, Icons, Text } from 'folds'; import React, { useCallback, useEffect, useState } from 'react'; import { StageComponentProps } from './types'; +import { PhoneHit } from '../../styles/PhoneHit.css'; export function SSOStage({ ssoRedirectURL, @@ -56,7 +57,7 @@ export function SSOStage({ SSO Login - + diff --git a/src/app/components/unread-badge/UnreadBadge.tsx b/src/app/components/unread-badge/UnreadBadge.tsx index f8bfefa3..00c7fa2f 100644 --- a/src/app/components/unread-badge/UnreadBadge.tsx +++ b/src/app/components/unread-badge/UnreadBadge.tsx @@ -22,7 +22,9 @@ export function UnreadBadge({ highlight, count }: UnreadBadgeProps) { 0 ? '400' : '200'} - fill="Solid" + // A mention and the bare unread dot are solid (a soft dot measured 1.6:1 against the ground); a plain unread + // count is a soft tint, so a row's count is never its loudest part. + fill={highlight || count === 0 ? 'Solid' : 'Soft'} radii="Pill" outlined={false} > diff --git a/src/app/components/upload-card/CompactUploadCardRenderer.tsx b/src/app/components/upload-card/CompactUploadCardRenderer.tsx index b9bada71..5fe73a10 100644 --- a/src/app/components/upload-card/CompactUploadCardRenderer.tsx +++ b/src/app/components/upload-card/CompactUploadCardRenderer.tsx @@ -6,6 +6,8 @@ import { useMatrixClient } from '../../hooks/useMatrixClient'; import { TUploadContent } from '../../utils/matrix'; import { bytesToSize, getFileTypeIcon } from '../../utils/common'; import { useMediaConfig } from '../../hooks/useMediaConfig'; +import { UploadFailureNote } from './UploadFailureNote'; +import { PhoneHitSpread28 } from '../../styles/PhoneHit.css'; type CompactUploadCardRendererProps = { isEncrypted?: boolean; @@ -63,6 +65,7 @@ export function CompactUploadCardRenderer({ )} - {upload.error.message} + )} {upload.status === UploadStatus.Idle && fileSizeExceeded && ( diff --git a/src/app/components/upload-card/UploadCardRenderer.tsx b/src/app/components/upload-card/UploadCardRenderer.tsx index f5bc68e0..e1d12843 100644 --- a/src/app/components/upload-card/UploadCardRenderer.tsx +++ b/src/app/components/upload-card/UploadCardRenderer.tsx @@ -12,6 +12,8 @@ import { } from '../../state/room/roomInputDrafts'; import { useObjectURL } from '../../hooks/useObjectURL'; import { useMediaConfig } from '../../hooks/useMediaConfig'; +import { UploadFailureNote } from './UploadFailureNote'; +import { PhoneHitSpread28 } from '../../styles/PhoneHit.css'; type PreviewImageProps = { fileItem: TUploadItem; @@ -160,6 +162,7 @@ export function UploadCardRenderer({ )} - {upload.error.message} + )} {upload.status === UploadStatus.Idle && fileSizeExceeded && ( diff --git a/src/app/components/upload-card/UploadFailureNote.test.tsx b/src/app/components/upload-card/UploadFailureNote.test.tsx new file mode 100644 index 00000000..c2f917ec --- /dev/null +++ b/src/app/components/upload-card/UploadFailureNote.test.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; +import { describe, expect, it } from 'vitest'; +import { uploadFailure } from '../../utils/matrix'; +import { UploadFailureNote } from './UploadFailureNote'; + +const text = (html: string) => + html + .replace(/<[^>]*>/g, ' ') + .replace(/\s+/g, ' ') + .trim(); + +describe('the failed upload card', () => { + it('leads with the reason and the next step, and keeps the diagnostics behind Details', async () => { + const error = await uploadFailure(new DOMException('', 'AbortError'), new Blob(['abcd']), { + startedAt: Date.now(), + }); + const html = renderToStaticMarkup(); + const before = html.slice(0, html.indexOf(']*>.*Details.*<\/details>/s); + expect(text(html.slice(html.indexOf(' { + const html = renderToStaticMarkup(); + expect(text(html)).toContain('Upload failed. Send again'); + expect(text(html)).toContain('boom'); + }); +}); diff --git a/src/app/components/upload-card/UploadFailureNote.tsx b/src/app/components/upload-card/UploadFailureNote.tsx new file mode 100644 index 00000000..df4498ba --- /dev/null +++ b/src/app/components/upload-card/UploadFailureNote.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import { Text } from 'folds'; +import { uploadFailureText } from '../../utils/uploadReason'; + +/** A failed upload as the card shows it: the reason and what to do, the diagnostic text one tap away. */ +export function UploadFailureNote({ error }: { error: Error }) { + return ( + <> + {uploadFailureText(error)} +
+ + + Details + + + + {error.message} + +
+ + ); +} diff --git a/src/app/components/url-preview/UrlPreviewCard.tsx b/src/app/components/url-preview/UrlPreviewCard.tsx index ee8967af..5d40e10c 100644 --- a/src/app/components/url-preview/UrlPreviewCard.tsx +++ b/src/app/components/url-preview/UrlPreviewCard.tsx @@ -1,3 +1,4 @@ +import classNames from 'classnames'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import { IPreviewUrlResponse } from 'matrix-js-sdk'; import { Box, Icon, IconButton, Icons, Scroll, Spinner, Text, as, color, config } from 'folds'; @@ -10,6 +11,7 @@ import { useIntersectionObserver, } from '../../hooks/useIntersectionObserver'; import * as css from './UrlPreviewCard.css'; +import { PhoneHitInPlace } from '../../styles/PhoneHit.css'; import { tryDecodeURIComponent } from '../../utils/dom'; import { mxcUrlToHttp } from '../../utils/matrix'; import { useMediaAuthentication } from '../../hooks/useMediaAuthentication'; @@ -181,7 +183,10 @@ export const UrlPreviewHolder = as<'div'>(({ children, ...props }, ref) => { <>
(({ children, ...props }, ref) => { <>
Self Demotion - + @@ -120,7 +121,7 @@ function SharedPowerAlert({ power, onCancel, onChange }: SharedPowerAlertProps) Shared Power - + diff --git a/src/app/features/add-existing/AddExisting.tsx b/src/app/features/add-existing/AddExisting.tsx index d100096b..a57a6b10 100644 --- a/src/app/features/add-existing/AddExisting.tsx +++ b/src/app/features/add-existing/AddExisting.tsx @@ -54,6 +54,7 @@ import { StateEvent } from '../../../types/matrix/room'; import { getViaServers } from '../../plugins/via-servers'; import { rateLimitedActions } from '../../utils/matrix'; import { useAlive } from '../../hooks/useAlive'; +import { PhoneHit } from '../../styles/PhoneHit.css'; const SEARCH_OPTS: UseAsyncSearchOptions = { limit: 500, @@ -201,7 +202,7 @@ export function AddExistingModal({ parentId, space, requestClose }: AddExistingM Add Existing - + diff --git a/src/app/features/albums/AlbumView.css.ts b/src/app/features/albums/AlbumView.css.ts new file mode 100644 index 00000000..d60dba43 --- /dev/null +++ b/src/app/features/albums/AlbumView.css.ts @@ -0,0 +1,71 @@ +import { style } from '@vanilla-extract/css'; +import { color, config, toRem } from 'folds'; +import { MOBILE_BREAKPOINT } from '../../hooks/useScreenSize'; + +const WIDE = `screen and (min-width: ${MOBILE_BREAKPOINT + 1}px)`; + +/** One column, bare ink on the scene. */ +export const Column = style({ + maxWidth: toRem(720), + width: '100%', + margin: '0 auto', + padding: config.space.S400, + display: 'flex', + flexDirection: 'column', + gap: config.space.S200, +}); + +/** A tappable text row: no border, no fill, at least 44 px tall. */ +export const Row = style({ + all: 'unset', + boxSizing: 'border-box', + cursor: 'pointer', + minHeight: 44, + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + gap: toRem(2), + color: color.Background.OnContainer, + ':focus-visible': { textDecoration: 'underline' }, +}); + +export const Back = style([Row, { minHeight: 44 }]); + +export const Files = style({ + display: 'flex', + flexDirection: 'column', + gap: config.space.S400, +}); + +/** Images may tile into a grid on wide screens only. */ +export const FilesWide = style({ + '@media': { + [WIDE]: { + display: 'grid', + gridTemplateColumns: 'repeat(auto-fill, minmax(220px, 1fr))', + alignItems: 'start', + }, + }, +}); + +export const Dim = style({ opacity: config.opacity.P300 }); + +/** The share panel: idle it is one row; the title, names and Send mount only once files are picked. */ +export const SharePanel = style({ + display: 'flex', + flexDirection: 'column', + gap: config.space.S200, +}); + +export const ShareTitle = style({ + all: 'unset', + boxSizing: 'border-box', + minHeight: 44, + width: '100%', + borderBottom: `1px solid ${color.Background.ContainerLine}`, + color: color.Background.OnContainer, + ':focus-visible': { borderBottomColor: color.Background.OnContainer }, +}); + +/** Picked names and send notes wrap, even a long unbroken name. */ +export const ShareNames = style({ overflowWrap: 'anywhere' }); diff --git a/src/app/features/albums/AlbumView.tsx b/src/app/features/albums/AlbumView.tsx new file mode 100644 index 00000000..f1a7f01a --- /dev/null +++ b/src/app/features/albums/AlbumView.tsx @@ -0,0 +1,267 @@ +import React, { useEffect, useMemo, useState } from 'react'; +import { Box, Scroll, Text } from 'folds'; +import { Room, RoomEvent } from 'matrix-js-sdk'; +import { MediaControl } from '../../components/media'; +import { AudioContent } from '../../components/message'; +import { RenderMessageContent } from '../../components/RenderMessageContent'; +import { IAudioContent } from '../../../types/matrix/common'; +import { LINKIFY_OPTS, getReactCustomHtmlParser } from '../../plugins/react-custom-html-parser'; +import { useMatrixClient } from '../../hooks/useMatrixClient'; +import { useMediaAuthentication } from '../../hooks/useMediaAuthentication'; +import { useSetting } from '../../state/hooks/settings'; +import { settingsAtom } from '../../state/settings'; +import { markAsRead } from '../../utils/notifications'; +import { getBlobSafeMimeType } from '../../utils/mimeTypes'; +import { timeDayMonYear } from '../../utils/time'; +import { getMemberDisplayName } from '../../utils/room'; +import { + Album, + AlbumFile, + TimelineEvent, + lastEvent, + looseFiles, + looseNoteFor, +} from './buildAlbums'; +import { folderOf, listFolder, pathLabel } from './albumFolders'; +import { FileReadBy } from './FileReadBy'; +import { ShareSet, useShareEnabled } from './ShareSet'; +import { useAlbums } from './useAlbums'; +import * as css from './AlbumView.css'; + +/** + * Audio goes straight to AudioContent, skipping the chat Attachment frame and file-type badge: the + * title above it is the only label and the transport controls sit on the scene. Anything that is + * not playable audio falls through to the stock renderer (a file download). + */ +const playableAudio = (content: Record) => { + const c = content as IAudioContent; + const url = c.file?.url ?? c.url; + const mimeType = getBlobSafeMimeType(c.info?.mimetype ?? ''); + if (!c.info || typeof url !== 'string' || !mimeType.startsWith('audio')) return undefined; + return { info: c.info, url, mimeType, encInfo: c.file }; +}; + +type FileRowProps = { room: Room; file: AlbumFile; author: string }; +function FileRow({ room, file, author }: FileRowProps) { + const mx = useMatrixClient(); + const useAuthentication = useMediaAuthentication(); + const [mediaAutoLoad] = useSetting(settingsAtom, 'mediaAutoLoad'); + const htmlReactParserOptions = useMemo( + () => + getReactCustomHtmlParser(mx, room.roomId, { linkifyOpts: LINKIFY_OPTS, useAuthentication }), + [mx, room.roomId, useAuthentication] + ); + const audio = file.kind === 'audio' ? playableAudio(file.content) : undefined; + return ( + + + {file.name} + + + {audio ? ( + } /> + ) : ( + () => file.content as T} + mediaAutoLoad={mediaAutoLoad} + htmlReactParserOptions={htmlReactParserOptions} + linkifyOpts={LINKIFY_OPTS} + /> + )} + + ); +} + +/** A file, and under it a row that unfolds the versions it supersedes. */ +function VersionedFileRow({ room, file, author }: FileRowProps) { + const [shown, setShown] = useState(false); + const n = file.earlier.length; + return ( + <> + + {n > 0 && ( + + )} + {shown && + file.earlier.map((e) => )} + + ); +} + +const countLabel = (n: number) => `${n} ${n === 1 ? 'file' : 'files'}`; + +/** The zone never mounts RoomTimeline, so it sends the read receipt the timeline would. */ +function useMarkZoneRead(room: Room) { + const mx = useMatrixClient(); + const [hideActivity] = useSetting(settingsAtom, 'hideActivity'); + useEffect(() => { + const mark = () => { + markAsRead(mx, room.roomId, hideActivity).catch(() => undefined); + }; + mark(); + room.on(RoomEvent.Timeline, mark); + return () => { + room.off(RoomEvent.Timeline, mark); + }; + }, [mx, room, hideActivity]); +} + +/** The file events in the room's live timeline that no album thread holds, kept current as it syncs. */ +function useLooseFiles(room: Room): AlbumFile[] { + const [, bump] = useState(0); + useEffect(() => { + const on = () => bump((n) => n + 1); + room.on(RoomEvent.Timeline, on); + room.on(RoomEvent.Redaction, on); + return () => { + room.off(RoomEvent.Timeline, on); + room.off(RoomEvent.Redaction, on); + }; + }, [room]); + const events: TimelineEvent[] = room + .getLiveTimeline() + .getEvents() + .map((e) => ({ + event_id: e.getId(), + type: e.getType(), + sender: e.getSender(), + origin_server_ts: e.getTs(), + content: e.getContent(), + unsigned: e.getUnsigned() as Record, + threadRoot: e.threadRootId, + })); + return looseFiles(events); +} + +type AlbumViewProps = { room: Room; onTimeline: () => void }; +export function AlbumView({ room, onTimeline }: AlbumViewProps) { + useMarkZoneRead(room); + const { loading, error, albums, truncated } = useAlbums(room); + const [dateFormat] = useSetting(settingsAtom, 'dateFormatString'); + const [openId, setOpenId] = useState(); + const [path, setPath] = useState([]); + const open: Album | undefined = albums.find((a) => a.id === openId); + const authorOf = (a: Album) => getMemberDisplayName(room, a.author) ?? a.author; + const encrypted = room.hasEncryptionStateEvent(); + const canShare = useShareEnabled(room); + const loose = useLooseFiles(room); + const looseNote = looseNoteFor(loose, { + open: !!open, + encrypted, + loading, + error: !!error, + }); + + let body: React.ReactNode; + if (loading) body = Loading albums…; + else if (error) body = Could not load albums: {error.message}; + else if (open) { + const images = open.files.length > 0 && open.files.every((f) => f.kind === 'image'); + body = ( + <> + + {open.title} + + {authorOf(open)} · {countLabel(open.count)} · {timeDayMonYear(open.ts, dateFormat)} + + {open.count === 0 && This album has no files.} + {canShare && ( + + )} +
+ {open.files.map((f) => ( + + ))} +
+ + ); + } else if (encrypted) + body = This zone is encrypted, so its albums cannot be listed here.; + else if (albums.length === 0 && path.length === 0) body = No albums yet.; + else { + const here = listFolder(albums, path); + body = ( + <> + {path.length > 0 && ( + + )} + {path.length > 0 && {pathLabel(path)}} + {here.folders.map((f) => ( + + ))} + {here.albums.map(({ album: a, leaf }) => ( + + ))} + {here.folders.length === 0 && here.albums.length === 0 && Nothing here.} + {truncated && ( + + The list is cut short: some albums or files are not loaded. + + )} + + ); + } + + return ( + +
+ {body} + {looseNote && ( + + {looseNote} + + )} + {/* Stays mounted while an album is open, so a running send keeps its progress. */} + {canShare && ( + + )} + +
+
+ ); +} diff --git a/src/app/features/albums/FileReadBy.tsx b/src/app/features/albums/FileReadBy.tsx new file mode 100644 index 00000000..28f9205c --- /dev/null +++ b/src/app/features/albums/FileReadBy.tsx @@ -0,0 +1,32 @@ +import React from 'react'; +import { MatrixEvent, Room } from 'matrix-js-sdk'; +import { Text } from 'folds'; +import { getMemberDisplayName } from '../../utils/room'; +import { FileReader, readLine } from './fileReceipt'; +import { useFileReaders } from './useFileReaders'; +import * as css from './AlbumView.css'; + +type FileReadByProps = { + room: Room; + fileId: string; + content: Record; + /** Receipts already read elsewhere (an album's thread replies): merged with the timeline's, a Mind once. */ + also?: FileReader[]; +}; +/** "fetched for " under a file: the Minds whose verified receipts are in the room's timeline. Nothing when none. */ +export function FileReadBy({ room, fileId, content, also = [] }: FileReadByProps) { + const seen = useFileReaders(room, fileId, content); + const readers = [...new Map([...also, ...seen].map((r) => [r.sender, r])).values()].sort( + (a, b) => a.ts - b.ts + ); + if (readers.length === 0) return null; + return ( + + {readLine(readers, (id) => getMemberDisplayName(room, id) ?? id)} + + ); +} + +/** A timeline message that is a file: audio, image, video or file. */ +export const isFileMessage = (mEvent: MatrixEvent): boolean => + ['m.audio', 'm.image', 'm.video', 'm.file'].includes(mEvent.getContent().msgtype); diff --git a/src/app/features/albums/ShareSet.folder.test.tsx b/src/app/features/albums/ShareSet.folder.test.tsx new file mode 100644 index 00000000..abb8f2bb --- /dev/null +++ b/src/app/features/albums/ShareSet.folder.test.tsx @@ -0,0 +1,140 @@ +import React from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; +import { beforeEach, describe, expect, it, vi } from 'vitest'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { MatrixClientProvider } from '../../hooks/useMatrixClient'; +import { MediaConfig, MediaConfigProvider } from '../../hooks/useMediaConfig'; + +// ShareSet hands its folder to the title the send lands under. The controller is held still and its +// `run` captured, and sendShareSet records the title it was given, so the path from the `folder` +// prop to the album root's title is read without a homeserver or a DOM. +const captured = vi.hoisted(() => ({ + run: undefined as undefined | ((files: unknown[], title: string, onFile: () => void) => unknown), + maxBytes: undefined as undefined | (() => number | undefined), + titles: [] as string[], +})); + +vi.mock('./shareController', () => ({ + createShareController: (deps: { + run: NonNullable; + maxBytes: NonNullable; + }) => { + captured.run = deps.run; + captured.maxBytes = deps.maxBytes; + return { + subscribe: () => () => undefined, + getState: () => ({ files: [], title: '', phase: { kind: 'idle' }, epoch: 0 }), + pick: () => undefined, + setTitle: () => undefined, + send: () => undefined, + cancel: () => undefined, + }; + }, +})); +vi.mock('./shareSet', async (importOriginal) => ({ + ...(await importOriginal()), + sendShareSet: async (_port: unknown, into: string | { albumId: string; lastId: string }) => { + captured.titles.push(typeof into === 'string' ? into : `into:${into.albumId}@${into.lastId}`); + return { albumId: '$a', sent: 0, failed: [], failedAt: [] }; + }, +})); +vi.mock('react', async (importOriginal) => { + const actual = await importOriginal(); + // The server renderer has no snapshot for an external store; read the client one. + const useSyncExternalStore = (_sub: unknown, get: () => unknown) => get(); + return { ...actual, default: { ...actual, useSyncExternalStore }, useSyncExternalStore }; +}); + +// eslint-disable-next-line import/first +import { ShareSet } from './ShareSet'; + +const timeline: unknown[] = []; +const ev = (id: string, ts: number, threadRootId?: string, status: string | null = null) => ({ + getId: () => id, + getTs: () => ts, + threadRootId, + status, +}); +const mount = ( + folder?: string[], + into?: { albumId: string; lastId: string; lastTs: number }, + mediaConfig: MediaConfig = {} +) => { + const room = { + roomId: '!r:x', + hasEncryptionStateEvent: () => false, + getLiveTimeline: () => ({ getEvents: () => timeline }), + } as never; + renderToStaticMarkup( + + ({ event_id: '$e' }) } as never}> + + + + + + ); +}; +const send = async (typed: string) => { + await captured.run?.([], typed, () => undefined); + return captured.titles.at(-1); +}; + +describe('ShareSet: the folder reaches the album title', () => { + beforeEach(() => { + captured.run = undefined; + captured.titles.length = 0; + timeline.length = 0; + }); + + it('at the top, the typed title goes as typed', async () => { + mount(); + expect(await send('Poses')).toBe('Poses'); + }); + + it('inside a folder, the path prefixes the typed title', async () => { + mount(['cast-art', 'poses']); + expect(await send('Set 2')).toBe('cast-art/poses/Set 2'); + }); + + it('an empty typed title falls back to the default, still under the folder', async () => { + mount(['handoff']); + expect(await send(' ')).toBe('handoff/Shared files'); + }); + + it('a typed title containing a slash goes deeper', async () => { + mount(['a']); + expect(await send('b/c')).toBe('a/b/c'); + }); + + it('an existing album takes the files instead of a title, whatever the folder', async () => { + mount(['a'], { albumId: '$alb', lastId: '$last', lastTs: 5 }); + expect(await send('ignored')).toBe('into:$alb@$last'); + }); + + it('the freshest sent event of that thread in the room timeline is where the files thread after', async () => { + timeline.push( + ev('$other', 99, '$else'), + ev('$local', 98, '$alb', 'sending'), + ev('$new', 50, '$alb'), + ev('$sentNotEchoed', 60, '$alb', 'sent'), + ev('$failed', 70, '$alb', 'not_sent') + ); + mount(['a'], { albumId: '$alb', lastId: '$last', lastTs: 5 }); + expect(await send('x')).toBe('into:$alb@$sentNotEchoed'); + }); +}); + +describe('ShareSet: the homeserver upload cap reaches the controller', () => { + it('is the server-stated m.upload.size, and none when the server states none', () => { + mount([], undefined, { 'm.upload.size': 52428800 }); + expect(captured.maxBytes?.()).toBe(52428800); + mount([], undefined, {}); + expect(captured.maxBytes?.()).toBeUndefined(); + // A cap that is not a positive number is no cap, never "refuse everything". + [0, -1, Number.NaN, '50' as unknown as number].forEach((bad) => { + mount([], undefined, { 'm.upload.size': bad }); + expect(captured.maxBytes?.()).toBeUndefined(); + }); + }); +}); diff --git a/src/app/features/albums/ShareSet.test.tsx b/src/app/features/albums/ShareSet.test.tsx new file mode 100644 index 00000000..b3da7a3d --- /dev/null +++ b/src/app/features/albums/ShareSet.test.tsx @@ -0,0 +1,123 @@ +import React from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; +import { describe, expect, it } from 'vitest'; +import { ClientConfigProvider } from '../../hooks/useClientConfig'; +import type { ClientConfig } from '../../hooks/useClientConfig'; +import { ShareState } from './shareController'; +import { ShareSetView, shareEnabled, useShareEnabled } from './ShareSet'; + +const text = (html: string) => + html + .replace(/<[^>]*>/g, ' ') + .replace(/\s+/g, ' ') + .trim(); +const noop = () => undefined; +const file = (name: string) => ({ name, type: 'audio/ogg' } as File); + +const view = (over: Partial> = {}, adding = false) => + renderToStaticMarkup( + + ); + +describe('the share panel, drawn', () => { + it('idle: one "Share files" row and no title, names, Send or Cancel', () => { + const html = view(); + expect(text(html)).toBe('Share files ›'); + expect(html).not.toContain('aria-label="Album title"'); + expect(html).toContain('type="file"'); + expect(html).toContain('multiple'); + expect(html).toContain('hidden'); + }); + + it('picked: the title field, the names on one line, Send N files and Cancel; no pick row', () => { + const html = view({ files: [file('a.ogg'), file('b.ogg')] }); + expect(html).toContain('aria-label="Album title"'); + expect(html).toContain('placeholder="Shared files"'); + expect(text(html)).toBe('a.ogg · b.ogg Send 2 files Cancel'); + expect(text(html)).not.toContain('Share files'); + }); + + it('one picked file reads "Send 1 file"', () => { + expect(text(view({ files: [file('a.ogg')] }))).toContain('Send 1 file Cancel'); + }); + + it('sending: progress replaces Send and Cancel, and the title is locked', () => { + const html = view({ + files: [file('a'), file('b'), file('c')], + phase: { kind: 'sending', done: 2 }, + }); + expect(text(html)).toContain('Sending 2 of 3…'); + expect(text(html)).toContain('Stop'); + expect(text(html)).not.toContain('Send 3 files'); + expect(text(html)).not.toContain('Cancel'); + expect(html).toMatch( + /aria-label="Album title"[^>]*disabled|disabled[^>]*aria-label="Album title"/ + ); + }); + + it('the encrypted note shows above the kept pick', () => { + const html = view({ + files: [file('a.ogg')], + phase: { kind: 'done', text: 'Not shared: this room is encrypted.' }, + }); + expect(text(html)).toBe('Not shared: this room is encrypted. a.ogg Send 1 file Cancel'); + }); + + it('after a full success the idle row and the note show together', () => { + expect(text(view({ phase: { kind: 'done', text: 'Shared 2 files.' } }))).toBe( + 'Share files › Shared 2 files.' + ); + }); +}); + +describe('adding to an existing album', () => { + it('the idle row says Add files', () => { + expect(text(view({}, true))).toBe('Add files ›'); + }); + + it('picked: no title field, the names, Send and Cancel', () => { + const html = view({ files: [file('a.ogg')] }, true); + expect(html).not.toContain('aria-label="Album title"'); + expect(text(html)).toBe('a.ogg Send 1 file Cancel'); + }); +}); + +describe('the flag', () => { + it('off, missing or empty offers no share', () => { + expect(shareEnabled({}, false)).toBe(false); + expect(shareEnabled({ fileZoneShare: {} }, false)).toBe(false); + expect(shareEnabled({ fileZoneShare: { enabled: false } }, false)).toBe(false); + }); + + it('on offers it, except in an encrypted room', () => { + expect(shareEnabled({ fileZoneShare: { enabled: true } }, false)).toBe(true); + expect(shareEnabled({ fileZoneShare: { enabled: true } }, true)).toBe(false); + }); + + it('the hook reads the client config and the room, as AlbumView mounts it', () => { + const room = (encrypted: boolean) => ({ hasEncryptionStateEvent: () => encrypted } as never); + function Probe({ encrypted }: { encrypted: boolean }) { + return {String(useShareEnabled(room(encrypted)))}; + } + const probe = (config: ClientConfig, encrypted: boolean) => + text( + renderToStaticMarkup( + + + + ) + ); + expect(probe({}, false)).toBe('false'); + expect(probe({ fileZoneShare: { enabled: true } }, false)).toBe('true'); + expect(probe({ fileZoneShare: { enabled: true } }, true)).toBe('false'); + }); +}); diff --git a/src/app/features/albums/ShareSet.tsx b/src/app/features/albums/ShareSet.tsx new file mode 100644 index 00000000..b7f26e7e --- /dev/null +++ b/src/app/features/albums/ShareSet.tsx @@ -0,0 +1,210 @@ +import React, { useRef, useState, useSyncExternalStore } from 'react'; +import { Text } from 'folds'; +import { useQueryClient } from '@tanstack/react-query'; +import { EventStatus, Room } from 'matrix-js-sdk'; +import { useMatrixClient } from '../../hooks/useMatrixClient'; +import { useClientConfig } from '../../hooks/useClientConfig'; +import { useMediaConfig } from '../../hooks/useMediaConfig'; +import { uploadContent } from '../../utils/matrix'; +import { safeFile } from '../../utils/mimeTypes'; +import { getMsgContent } from '../room/msgContent'; +import { FILE_HASH_KEY, hashForSend } from './fileReceipt'; +import { ShareController, ShareState, createShareController } from './shareController'; +import { titleIn } from './albumFolders'; +import { DEFAULT_TITLE, ExistingAlbum, freshest, sendShareSet, ThreadEvent } from './shareSet'; +import * as css from './AlbumView.css'; + +/** Off unless `fileZoneShare.enabled` is true. An encrypted zone is never offered the share. */ +export const shareEnabled = ( + config: { fileZoneShare?: { enabled?: boolean } }, + encrypted: boolean +) => !!config.fileZoneShare?.enabled && !encrypted; + +export const useShareEnabled = (room: Room): boolean => + shareEnabled(useClientConfig(), room.hasEncryptionStateEvent()); + +type ShareViewProps = { + state: ShareState; + onPickClick: () => void; + onPicked: (files: File[]) => void; + onTitle: (title: string) => void; + onSend: () => void; + onCancel: () => void; + onStop: () => void; + /** Adding to an existing album: the files join it, so there is no title to ask for. */ + adding?: boolean; + inputRef?: React.Ref; +}; + +/** + * One row when idle. Picking files (any number, one picker) opens the panel: a title, the picked + * names, Send. Nothing but the row is visible until files are picked. + */ +export function ShareSetView({ + state, + onPickClick, + onPicked, + onTitle, + onSend, + onCancel, + onStop, + adding, + inputRef, +}: ShareViewProps) { + const { files, title, phase, epoch } = state; + return ( +
+ onPicked(Array.from(e.target.files ?? []))} + /> + {files.length === 0 && phase.kind !== 'sending' && ( + + )} + {phase.kind === 'done' && ( + + {phase.text} + + )} + {files.length > 0 && ( + <> + {!adding && ( + onTitle(e.target.value)} + /> + )} + + {files.map((f) => f.name).join(' · ')} + + {phase.kind === 'sending' ? ( + <> + + Sending {phase.done} of {files.length}… + + + + ) : ( + <> + + + + )} + + )} +
+ ); +} + +/** The sent events in the room's live timeline, as the thread view of them `freshest` reads. */ +const threadEvents = (room: Room): ThreadEvent[] => + room + .getLiveTimeline() + .getEvents() + .filter((e) => (!e.status || e.status === EventStatus.SENT) && !!e.getId()) + .map((e) => ({ id: e.getId() as string, ts: e.getTs(), threadRoot: e.threadRootId })); + +type ShareSetProps = { + room: Room; + /** The path a new album lands in: its title is prefixed by it (docs/commons-files-desk.md). */ + folder?: string[]; + /** Add the files to this album instead of making one. */ + into?: ExistingAlbum; +}; +export function ShareSet({ room, folder = [], into }: ShareSetProps) { + const mx = useMatrixClient(); + const queryClient = useQueryClient(); + const mediaConfig = useMediaConfig(); + const input = useRef(null); + // Built once per mount (AlbumView keys the panel by room): the pick lives in the controller, so a + // rerender with a new client or Room object must not build another. Live values go through `live`. + const live = useRef({ mx, room, queryClient, folder, into, mediaConfig }); + live.current = { mx, room, queryClient, folder, into, mediaConfig }; + const [controller]: [ShareController, unknown] = useState(() => + createShareController({ + roomId: room.roomId, + isEncrypted: () => live.current.room.hasEncryptionStateEvent(), + maxBytes: () => { + const cap = live.current.mediaConfig['m.upload.size']; + return typeof cap === 'number' && Number.isFinite(cap) && cap > 0 ? cap : undefined; + }, + onSent: () => + live.current.queryClient.invalidateQueries({ queryKey: ['albums', room.roomId] }), + run: (files, title, onFile, signal) => + sendShareSet( + { + signal, + send: async (content) => + (await live.current.mx.sendMessage(room.roomId, content as any)).event_id, + contentOf: async (f) => { + const file = safeFile(f.file); + const mxc = await new Promise((resolve, reject) => { + const { mx: client } = live.current; + let upload: Promise | undefined; + const abort = () => upload && client.cancelUpload(upload as never); + signal.addEventListener('abort', abort, { once: true }); + uploadContent(client, file, { + onPromise: (p) => { + upload = p; + if (signal.aborted) abort(); + }, + onSuccess: resolve, + onError: reject, + }); + }); + const content = await getMsgContent( + live.current.mx, + { + file, + originalFile: f.file, + metadata: { markedAsSpoiler: false }, + encInfo: undefined, + }, + mxc + ); + const sha256 = await hashForSend(f.file); + if (sha256) content.info = { ...content.info, [FILE_HASH_KEY]: sha256 }; + return content; + }, + onFile, + }, + live.current.into + ? freshest(live.current.into, threadEvents(live.current.room)) + : titleIn(live.current.folder, title, DEFAULT_TITLE), + files.map((file) => ({ name: file.name, mimeType: file.type, file })) + ), + }) + ); + const state = useSyncExternalStore(controller.subscribe, controller.getState); + return ( + input.current?.click()} + onPicked={controller.pick} + onTitle={controller.setTitle} + onSend={controller.send} + onCancel={controller.cancel} + onStop={controller.stop} + adding={!!into} + /> + ); +} diff --git a/src/app/features/albums/albumFolders.test.ts b/src/app/features/albums/albumFolders.test.ts new file mode 100644 index 00000000..9a9be53e --- /dev/null +++ b/src/app/features/albums/albumFolders.test.ts @@ -0,0 +1,133 @@ +import { describe, expect, it } from 'vitest'; +import { buildAlbums } from './buildAlbums'; +import type { Album, ZoneEvent } from './buildAlbums'; +import { folderOf, listFolder, splitPath, titleIn } from './albumFolders'; +import { DEFAULT_TITLE, sendShareSet } from './shareSet'; + +const album = (id: string, title: string, ts = 1): Album => ({ + id, + title, + author: '@a:x', + ts, + files: [], + count: 0, +}); +const names = (l: ReturnType) => ({ + folders: l.folders.map((f) => `${f.name}:${f.albums}`), + albums: l.albums.map((a) => `${a.album.id}=${a.leaf}`), +}); + +describe('splitPath', () => { + it('drops empty segments and padding; dots are names, not navigation', () => { + expect(splitPath(' a // b /')).toEqual(['a', 'b']); + expect(splitPath('../x')).toEqual(['..', 'x']); + expect(splitPath('///')).toEqual([]); + }); +}); + +describe('listFolder', () => { + const all = [ + album('$1', 'handoff/2026-11/notes', 10), + album('$2', 'handoff/2026-11/plan', 30), + album('$3', 'handoff/readme', 20), + album('$4', 'cast-art', 5), + album('$5', 'Plain album', 40), + ]; + + it('root: first segments become folders (counted below, newest first); single-segment titles are albums', () => { + expect(names(listFolder(all, []))).toEqual({ + folders: ['handoff:3'], + albums: ['$5=Plain album', '$4=cast-art'], + }); + }); + + it('nested: a folder shows its sub-folders and its own albums under their leaf names', () => { + expect(names(listFolder(all, ['handoff']))).toEqual({ + folders: ['2026-11:2'], + albums: ['$3=readme'], + }); + expect(names(listFolder(all, ['handoff', '2026-11']))).toEqual({ + folders: [], + albums: ['$2=plan', '$1=notes'], + }); + }); + + it('an album titled exactly like a folder is not hidden by it', () => { + const l = listFolder([album('$a', 'x'), album('$b', 'x/y')], []); + expect(names(l)).toEqual({ folders: ['x:1'], albums: ['$a=x'] }); + expect(names(listFolder([album('$a', 'x'), album('$b', 'x/y')], ['x']))).toEqual({ + folders: [], + albums: ['$b=y'], + }); + }); + + it('a path that exists nowhere lists nothing; the prefix match is by whole segment', () => { + expect(names(listFolder(all, ['hand']))).toEqual({ folders: [], albums: [] }); + }); + + it('an untitled or all-slash album stays at the root, nowhere else', () => { + const odd = [album('$u', '///')]; + expect(names(listFolder(odd, []))).toEqual({ folders: [], albums: ['$u=///'] }); + expect(names(listFolder(odd, ['x']))).toEqual({ folders: [], albums: [] }); + expect(names(listFolder([album('$w', ' ')], []))).toEqual({ + folders: [], + albums: ['$w=Untitled album'], + }); + }); + + it('server-supplied names like "constructor" are folders, not prototype hits', () => { + expect(names(listFolder([album('$c', 'constructor/a')], []))).toEqual({ + folders: ['constructor:1'], + albums: [], + }); + }); +}); + +describe('titleIn and folderOf', () => { + it('prefixes the folder, keeps a typed sub-path, falls back to the default title', () => { + expect(titleIn([], '', DEFAULT_TITLE)).toBe(DEFAULT_TITLE); + expect(titleIn([], ' Mine ', DEFAULT_TITLE)).toBe('Mine'); + expect(titleIn(['uploads', 'me'], '', DEFAULT_TITLE)).toBe(`uploads/me/${DEFAULT_TITLE}`); + expect(titleIn(['uploads'], 'a/b', DEFAULT_TITLE)).toBe('uploads/a/b'); + }); + + it('folderOf is the title path without its leaf', () => { + expect(folderOf(album('$', 'a/b/c'))).toEqual(['a', 'b']); + expect(folderOf(album('$', 'c'))).toEqual([]); + }); +}); + +describe('a share into a folder, read back as the viewer reads it', () => { + it('posts a root titled under the folder, and buildAlbums + listFolder put it in that folder', async () => { + const sent: Record[] = []; + const res = await sendShareSet( + { + send: async (c) => { + sent.push(c); + return `$e${sent.length}`; + }, + contentOf: async (f) => ({ msgtype: 'm.file', body: f.name, filename: f.name }), + }, + titleIn(['uploads', 'meta'], 'Photos', DEFAULT_TITLE), + [{ name: 'a.png', mimeType: 'image/png' }] + ); + expect(res.sent).toBe(1); + expect(sent[0]).toEqual({ msgtype: 'm.text', body: 'uploads/meta/Photos' }); + + const asEvent = (c: Record, id: string): ZoneEvent => ({ + event_id: id, + type: 'm.room.message', + sender: '@a:x', + origin_server_ts: 1, + content: c, + }); + const albums = buildAlbums([ + { root: asEvent(sent[0], '$e1'), replies: [asEvent(sent[1], '$e2')] }, + ]); + expect(names(listFolder(albums, []))).toEqual({ folders: ['uploads:1'], albums: [] }); + expect(names(listFolder(albums, ['uploads', 'meta']))).toEqual({ + folders: [], + albums: ['$e1=Photos'], + }); + }); +}); diff --git a/src/app/features/albums/albumFolders.ts b/src/app/features/albums/albumFolders.ts new file mode 100644 index 00000000..a74d363f --- /dev/null +++ b/src/app/features/albums/albumFolders.ts @@ -0,0 +1,73 @@ +// Pure: folders are albums whose title is a `/`-separated path (docs/commons-files-desk.md, "Folders"). +// No wire change: the album is still one thread root; the folder tree is only how the list is grouped. +import { Album, UNTITLED } from './buildAlbums'; + +/** A path as segments. Empty segments and surrounding space drop out; `.` and `..` are ordinary names, never navigation. */ +export const splitPath = (title: string): string[] => + title + .split('/') + .map((s) => s.trim()) + .filter(Boolean); + +export type FolderEntry = { + name: string; + /** Segments from the root to this folder. */ + path: string[]; + /** Albums at any depth below. */ + albums: number; + /** The newest album ts below, for ordering. */ + ts: number; +}; + +export type AlbumEntry = { album: Album; leaf: string }; + +export type FolderListing = { folders: FolderEntry[]; albums: AlbumEntry[] }; + +const startsWith = (path: string[], prefix: string[]) => prefix.every((seg, i) => path[i] === seg); + +/** + * What one folder shows: its direct sub-folders and the albums titled exactly at its path plus a leaf. + * An album titled `x` and a folder `x/` coexist at the same level; neither hides the other. Newest first, both lists. + */ +export const listFolder = (albums: readonly Album[], at: string[]): FolderListing => { + const folders = new Map(); + const direct: AlbumEntry[] = []; + albums.forEach((album) => { + const segs = splitPath(album.title); + if (segs.length === 0) { + // An untitled or all-slash title lives at the root under the title as written. + if (at.length === 0) direct.push({ album, leaf: album.title.trim() || UNTITLED }); + return; + } + if (!startsWith(segs, at)) return; + // An album titled exactly at this path sits in the parent, not inside the folder it shares a name with. + if (segs.length <= at.length) return; + if (segs.length === at.length + 1) { + direct.push({ album, leaf: segs[segs.length - 1] }); + return; + } + const name = segs[at.length]; + const f = folders.get(name) ?? { name, path: [...at, name], albums: 0, ts: 0 }; + f.albums += 1; + f.ts = Math.max(f.ts, album.ts); + folders.set(name, f); + }); + return { + folders: [...folders.values()].sort((a, b) => b.ts - a.ts), + albums: direct.sort((a, b) => b.album.ts - a.album.ts), + }; +}; + +/** The folder an album sits in: its title path without the leaf. */ +export const folderOf = (album: Album): string[] => splitPath(album.title).slice(0, -1); + +/** + * The title a share sends into `folder`: the folder path then what the sender typed. The typed title + * may itself contain `/`, which just goes deeper. An empty typed title falls back to `fallback`. + */ +export const titleIn = (folder: string[], typed: string, fallback: string): string => { + const leaf = splitPath(typed).join('/') || fallback; + return [...folder, leaf].join('/'); +}; + +export const pathLabel = (path: string[]): string => path.join(' / '); diff --git a/src/app/features/albums/buildAlbums.test.ts b/src/app/features/albums/buildAlbums.test.ts new file mode 100644 index 00000000..e1e7964b --- /dev/null +++ b/src/app/features/albums/buildAlbums.test.ts @@ -0,0 +1,336 @@ +import { describe, expect, it } from 'vitest'; +import { AlbumInput, ZoneEvent, buildAlbums, lastEvent } from './buildAlbums'; + +const root = (id: string, ts: number, over: Partial = {}): ZoneEvent => ({ + event_id: id, + type: 'm.room.message', + sender: '@void:x', + origin_server_ts: ts, + content: { msgtype: 'm.text', body: `album ${id}` }, + ...over, +}); +const reply = (id: string, ts: number, msgtype: string, body = id, extra = {}): ZoneEvent => ({ + event_id: id, + type: 'm.room.message', + sender: '@void:x', + origin_server_ts: ts, + content: { msgtype, body, ...extra }, +}); +const one = (r: ZoneEvent, replies: ZoneEvent[]) => buildAlbums([{ root: r, replies }])[0]; + +describe('buildAlbums', () => { + it('lists the newest album first', () => { + const inputs: AlbumInput[] = [ + { root: root('$old', 100), replies: [] }, + { root: root('$new', 300), replies: [] }, + { root: root('$mid', 200), replies: [] }, + ]; + expect(buildAlbums(inputs).map((a) => a.id)).toEqual(['$new', '$mid', '$old']); + }); + + it('takes title, author and date from the root', () => { + const a = one(root('$r', 555, { sender: '@eureka:x' }), []); + expect([a.title, a.author, a.ts]).toEqual(['album $r', '@eureka:x', 555]); + }); + + it('lists files oldest first whatever order the server returned them in', () => { + const a = one(root('$r', 1), [ + reply('$c', 30, 'm.audio'), + reply('$a', 10, 'm.audio'), + reply('$b', 20, 'm.audio'), + ]); + expect(a.files.map((f) => f.id)).toEqual(['$a', '$b', '$c']); + }); + + it('counts media replies only; a text reply is not a file', () => { + const a = one(root('$r', 1), [ + reply('$t', 5, 'm.text', 'nice'), + reply('$n', 6, 'm.notice', 'bot'), + reply('$a', 10, 'm.audio'), + reply('$f', 11, 'm.file'), + ]); + expect(a.count).toBe(2); + expect(a.files.map((f) => f.id)).toEqual(['$a', '$f']); + }); + + it('keeps a root with no media as an album of zero files', () => { + const a = one(root('$r', 1), [reply('$t', 5, 'm.text')]); + expect(a).toMatchObject({ id: '$r', count: 0, files: [], cover: undefined }); + }); + + it('uses the first image as the cover', () => { + const a = one(root('$r', 1), [ + reply('$a', 5, 'm.audio'), + reply('$i2', 20, 'm.image'), + reply('$i1', 10, 'm.image'), + ]); + expect(a.cover?.id).toBe('$i1'); + expect(one(root('$q', 1), [reply('$a', 5, 'm.audio')]).cover).toBeUndefined(); + }); + + it('derives the kind from the msgtype', () => { + const a = one(root('$r', 1), [ + reply('$1', 1, 'm.audio'), + reply('$2', 2, 'm.image'), + reply('$3', 3, 'm.video'), + reply('$4', 4, 'm.file'), + ]); + expect(a.files.map((f) => f.kind)).toEqual(['audio', 'image', 'video', 'file']); + }); + + it('names a file by filename, else body', () => { + const a = one(root('$r', 1), [ + reply('$1', 1, 'm.audio', 'caption', { filename: 'clip.wav' }), + reply('$2', 2, 'm.audio', 'plain.wav'), + ]); + expect(a.files.map((f) => f.name)).toEqual(['clip.wav', 'plain.wav']); + }); + + it('does not duplicate a file the relations endpoint returned twice', () => { + const a = one(root('$r', 1), [reply('$a', 5, 'm.audio'), reply('$a', 5, 'm.audio')]); + expect(a.count).toBe(1); + }); + + it('does not duplicate an album listed twice', () => { + expect( + buildAlbums([ + { root: root('$r', 1), replies: [] }, + { root: root('$r', 1), replies: [] }, + ]) + ).toHaveLength(1); + }); + + it('skips redacted and empty events', () => { + const redacted = { + ...reply('$x', 5, 'm.audio'), + content: {}, + unsigned: { redacted_because: {} }, + }; + const stillTyped = { ...reply('$y', 6, 'm.audio'), unsigned: { redacted_because: {} } }; + const empty: ZoneEvent = { event_id: '$z' }; + const a = one(root('$r', 1), [redacted, stillTyped, empty, reply('$ok', 7, 'm.audio')]); + expect(a.files.map((f) => f.id)).toEqual(['$ok']); + expect(buildAlbums([{ root: root('$g', 1, { content: {} }), replies: [] }])).toEqual([]); + expect( + buildAlbums([{ root: root('$h', 1, { unsigned: { redacted_because: {} } }), replies: [] }]) + ).toEqual([]); + }); + + it('tolerates events with missing fields', () => { + const a = one({ event_id: '$r', content: { msgtype: 'm.text' } }, [ + { event_id: '$a', content: { msgtype: 'm.audio' } }, + ]); + expect(a).toMatchObject({ title: 'Untitled album', author: '', ts: 0, count: 1 }); + }); + + it('does not read inherited object keys as file kinds', () => { + const a = one(root('$r', 1), [ + reply('$c', 1, 'constructor'), + reply('$p', 2, '__proto__'), + reply('$t', 3, 'toString'), + ]); + expect(a.count).toBe(0); + }); + + it('skips events that are not room messages even if their content looks like media', () => { + const reaction = { ...reply('$x', 5, 'm.audio'), type: 'm.reaction' }; + const a = one(root('$r', 1), [reaction, reply('$ok', 6, 'm.audio')]); + expect(a.files.map((f) => f.id)).toEqual(['$ok']); + expect(buildAlbums([{ root: root('$g', 1, { type: 'm.reaction' }), replies: [] }])).toEqual([]); + }); + + it('skips events without an event id', () => { + const anon: ZoneEvent = { type: 'm.room.message', content: { msgtype: 'm.audio', body: 'a' } }; + expect(one(root('$r', 1), [anon]).count).toBe(0); + expect( + buildAlbums([{ root: { content: { msgtype: 'm.text', body: 'x' } }, replies: [] }]) + ).toEqual([]); + }); + + it('titles an edited album by its latest edit', () => { + const edited = root('$r', 1, { + unsigned: { + 'm.relations': { + 'm.replace': { content: { 'm.new_content': { msgtype: 'm.text', body: 'renamed' } } }, + }, + }, + }); + expect(one(edited, []).title).toBe('renamed'); + const emptyEdit = root('$q', 1, { unsigned: { 'm.relations': { 'm.replace': {} } } }); + expect(one(emptyEdit, []).title).toBe('album $q'); + }); + + it('survives null or non-object entries in inputs and replies', () => { + const bad = [null, undefined, 'x', 7] as unknown as ZoneEvent[]; + const a = buildAlbums([ + null as unknown as AlbumInput, + { root: null as unknown as ZoneEvent, replies: [] }, + { root: root('$r', 1), replies: [...bad, reply('$ok', 2, 'm.audio')] }, + { root: root('$s', 2), replies: null as unknown as ZoneEvent[] }, + ]); + expect(a.map((x) => x.id)).toEqual(['$s', '$r']); + expect(a[1].files.map((f) => f.id)).toEqual(['$ok']); + }); + + it('treats a non-numeric timestamp as 0 so it sorts first, not by string order', () => { + const a = one(root('$r', 1), [ + reply('$b', 20, 'm.audio'), + { ...reply('$bad', 0, 'm.audio'), origin_server_ts: '5' as unknown as number }, + { ...reply('$nan', 0, 'm.audio'), origin_server_ts: NaN }, + reply('$a', 10, 'm.audio'), + ]); + expect(a.files.map((f) => f.id)).toEqual(['$bad', '$nan', '$a', '$b']); + const albums = buildAlbums([ + { root: root('$x', 100), replies: [] }, + { root: root('$y', 0, { origin_server_ts: '999' as unknown as number }), replies: [] }, + ]); + expect(albums.map((x) => [x.id, x.ts])).toEqual([ + ['$x', 100], + ['$y', 0], + ]); + }); + + it('gives an album with an empty body a fallback title', () => { + expect(one(root('$r', 1, { content: { msgtype: 'm.text', body: '' } }), []).title).toBe( + 'Untitled album' + ); + expect(one(root('$q', 1, { content: { msgtype: 'm.text' } }), []).title).toBe('Untitled album'); + }); + + it('never counts an edit event as a file or an album', () => { + const edit = reply('$e', 9, 'm.audio', '* x', { + 'm.relates_to': { rel_type: 'm.replace', event_id: '$a' }, + 'm.new_content': { msgtype: 'm.audio', body: 'x' }, + }); + const a = one(root('$r', 1), [reply('$a', 5, 'm.audio'), edit]); + expect(a.files.map((f) => f.id)).toEqual(['$a']); + const rootEdit = root('$re', 1, { + content: { msgtype: 'm.text', body: '* t', 'm.relates_to': { rel_type: 'm.replace' } }, + }); + expect(buildAlbums([{ root: rootEdit, replies: [] }])).toEqual([]); + const threaded = reply('$t', 6, 'm.audio', 't', { + 'm.relates_to': { rel_type: 'm.thread', event_id: '$r' }, + }); + expect(one(root('$q', 1), [threaded]).count).toBe(1); + }); +}); + +describe('versions', () => { + const v = (id: string, ts: number, replaces?: string) => + reply(id, ts, 'm.file', id, replaces ? { 'org.gamecult.publish': { replaces } } : {}); + + it('lists the latest of a chain and folds the earlier versions under it', () => { + const a = one(root('$r', 1), [v('$v1', 10), v('$v2', 20, '$v1'), reply('$x', 30, 'm.file')]); + expect(a.files.map((f) => [f.id, f.earlier.map((e) => e.id)])).toEqual([ + ['$v2', ['$v1']], + ['$x', []], + ]); + expect(a.count).toBe(2); + }); +}); + +describe('versions: cover and sender', () => { + it('the cover comes from the shown version, not a folded image', () => { + const img = (id: string, ts: number, type: string, replaces?: string) => + reply(id, ts, type, id, replaces ? { 'org.gamecult.publish': { replaces } } : {}); + const a = one(root('$r', 1), [img('$v1', 10, 'm.image'), img('$v2', 20, 'm.file', '$v1')]); + expect(a.files.map((f) => f.id)).toEqual(['$v2']); + expect(a.cover).toBeUndefined(); + }); +}); + +describe('lastEvent', () => { + it('is the newest event of the thread, a folded version included; the root when empty', () => { + const v = (id: string, ts: number, replaces?: string) => + reply(id, ts, 'm.file', id, replaces ? { 'org.gamecult.publish': { replaces } } : {}); + expect(lastEvent(one(root('$r', 1), [v('$a', 10), v('$b', 20, '$a'), v('$c', 15)]))).toEqual({ + id: '$b', + ts: 20, + }); + expect(lastEvent(one(root('$r', 1), []))).toEqual({ id: '$r', ts: 1 }); + }); +}); + +describe('Mind receipts', () => { + const HASH = 'a'.repeat(64); + const file = (id: string, sha?: string) => + reply(id, 10, 'm.audio', id, { info: sha ? { sha256: sha } : {} }); + const receipt = ( + id: string, + ts: number, + sender: string, + fileId: unknown, + sha?: unknown, + extra: Record = {} + ) => + ({ + event_id: id, + type: 'org.gamecult.file_received', + sender, + origin_server_ts: ts, + content: { 'org.gamecult.file_received': { event_id: fileId, sha256: sha, ...extra } }, + } as ZoneEvent); + + const oneX = (r: ZoneEvent, replies: ZoneEvent[]) => buildAlbums([{ root: r, replies }], 'x')[0]; + + it('shows who read a file when the receipt carries the file event hash', () => { + const a = oneX(root('$r', 1), [file('$f', HASH), receipt('$x', 20, '@void:x', '$f', HASH)]); + expect(a.files[0].readBy).toEqual([{ sender: '@void:x', ts: 20 }]); + expect(a.count).toBe(1); + }); + it('counts nothing for a hash that differs, a missing hash on either side, or a bad hash', () => { + const a = oneX(root('$r', 1), [ + file('$f', HASH), + file('$g'), + receipt('$x', 20, '@void:x', '$f', 'b'.repeat(64)), + receipt('$y', 21, '@void:x', '$g', HASH), + receipt('$z', 22, '@void:x', '$f', undefined), + receipt('$w', 23, '@void:x', '$f', 7), + ]); + expect(a.files.every((f) => f.readBy.length === 0)).toBe(true); + }); + it('trusts the event sender, never a Mind field inside the content', () => { + const a = oneX(root('$r', 1), [ + file('$f', HASH), + receipt('$x', 20, '@mallory:x', '$f', HASH, { mind: 'void', sender: '@void:x' }), + ]); + expect(a.files[0].readBy).toEqual([]); + }); + it('counts only a Mind of this homeserver: not another server, a lookalike, or a bare name', () => { + const a = oneX(root('$r', 1), [ + file('$f', HASH), + receipt('$x', 20, '@void-fan:x', '$f', HASH), + receipt('$y', 21, '@x:void', '$f', HASH), + receipt('$z', 22, '@aqua:x', '$f', HASH), + receipt('$e', 23, '@void:evil.example', '$f', HASH), + receipt('$b', 24, 'void:x', '$f', HASH), + ]); + expect(a.files[0].readBy.map((r) => r.sender)).toEqual(['@aqua:x']); + }); + it('keeps one receipt per Mind, the latest, and a second Mind beside it', () => { + const a = oneX(root('$r', 1), [ + file('$f', HASH), + receipt('$1', 20, '@void:x', '$f', HASH), + receipt('$2', 30, '@void:x', '$f', HASH), + receipt('$3', 25, '@eureka:x', '$f', HASH), + ]); + expect(a.files[0].readBy).toEqual([ + { sender: '@eureka:x', ts: 25 }, + { sender: '@void:x', ts: 30 }, + ]); + }); + it('ignores a receipt for a file not in the album, a malformed one, and a redacted one', () => { + const redacted = { + ...receipt('$d', 20, '@void:x', '$f', HASH), + unsigned: { redacted_because: {} }, + }; + const a = oneX(root('$r', 1), [ + file('$f', HASH), + receipt('$a', 20, '@void:x', '$elsewhere', HASH), + receipt('$b', 21, '@void:x', 42, HASH), + redacted, + ]); + expect(a.files[0].readBy).toEqual([]); + expect(a.count).toBe(1); + }); +}); diff --git a/src/app/features/albums/buildAlbums.ts b/src/app/features/albums/buildAlbums.ts new file mode 100644 index 00000000..5d3662e1 --- /dev/null +++ b/src/app/features/albums/buildAlbums.ts @@ -0,0 +1,184 @@ +// Pure: turns the thread roots of a file-zone room and each root's thread replies, in the JSON +// Synapse returns from GET /rooms/{roomId}/threads and GET /rooms/{roomId}/relations/{root}/m.thread, +// into albums. See docs/file-zone.md for the rulings this encodes. +import { readersOf } from './fileReceipt'; +import type { FileReader } from './fileReceipt'; +import { foldVersions } from './versions'; + +/** The slice of a Matrix event this module reads. Every field may be missing. */ +export type ZoneEvent = { + event_id?: string; + type?: string; + sender?: string; + origin_server_ts?: number; + content?: Record; + unsigned?: Record; +}; + +export type AlbumInput = { root: ZoneEvent; replies: ZoneEvent[] }; + +export type FileKind = 'audio' | 'image' | 'video' | 'file'; + +export type AlbumFile = { + id: string; + kind: FileKind; + name: string; + sender: string; + ts: number; + /** The event content, as RenderMessageContent reads it. */ + content: Record; + /** Receipts in this album that name this file, one per sender (the latest), oldest first. */ + readBy: FileReader[]; + /** The versions this file supersedes, nearest first (`org.gamecult.publish.replaces`). */ + earlier: AlbumFile[]; +}; + +export type Album = { + id: string; + title: string; + author: string; + ts: number; + cover?: AlbumFile; + files: AlbumFile[]; + count: number; +}; + +// A Map, not an object: msgtype is server-supplied and "constructor" must not name a kind. +const KIND_OF_MSGTYPE = new Map([ + ['m.audio', 'audio'], + ['m.image', 'image'], + ['m.video', 'video'], + ['m.file', 'file'], +]); + +// A redacted event keeps its id but loses its content and gains unsigned.redacted_because. +const live = ( + e: ZoneEvent +): e is ZoneEvent & { event_id: string; content: Record } => + !!e && + typeof e === 'object' && + !!e.event_id && + // An edit is an m.room.message too, but it revises an event; it is never a file or an album. + (e.content?.['m.relates_to'] as { rel_type?: unknown } | undefined)?.rel_type !== 'm.replace' && + !e.unsigned?.redacted_because && + (e.type === undefined || e.type === 'm.room.message') && + typeof e.content?.msgtype === 'string'; + +const tsOf = (v: unknown): number => (typeof v === 'number' && Number.isFinite(v) ? v : 0); + +const asString = (v: unknown): string => (typeof v === 'string' ? v : ''); + +export const toFile = (e: ZoneEvent): AlbumFile | undefined => { + if (!live(e)) return undefined; + const kind = KIND_OF_MSGTYPE.get(e.content.msgtype as string); + if (!kind) return undefined; + return { + id: e.event_id, + kind, + name: asString(e.content.filename) || asString(e.content.body), + sender: e.sender ?? '', + ts: tsOf(e.origin_server_ts), + content: e.content, + readBy: [], + earlier: [], + }; +}; + +export const UNTITLED = 'Untitled album'; + +// An edited root carries its latest edit under unsigned["m.relations"]["m.replace"]; the title is +// that edit's m.new_content.body, else the original body. +const titleOf = (root: ZoneEvent & { content: Record }): string => { + const relations = root.unsigned?.['m.relations'] as Record | undefined; + const edit = relations?.['m.replace'] as ZoneEvent | undefined; + const edited = (edit?.content?.['m.new_content'] as Record | undefined)?.body; + return asString(edited) || asString(root.content.body) || UNTITLED; +}; + +const toAlbum = (input: AlbumInput, server: string): Album | undefined => { + const { root, replies } = input ?? {}; + if (!live(root)) return undefined; + const seen = new Set(); + const list = Array.isArray(replies) ? replies : []; + const files = list + .map(toFile) + .filter((f): f is AlbumFile => { + if (!f || seen.has(f.id)) return false; + seen.add(f.id); + return true; + }) + .sort((a, b) => a.ts - b.ts) + .map((f) => ({ ...f, readBy: readersOf(list, f.id, f.content, server) })); + const heads = foldVersions(files); + return { + id: root.event_id, + title: titleOf(root), + author: root.sender ?? '', + ts: tsOf(root.origin_server_ts), + cover: heads.find((f) => f.kind === 'image'), + files: heads, + count: heads.length, + }; +}; + +/** Newest album first; files oldest first. Loose room messages never reach this function. */ +/** `server` is the homeserver's own domain: only its Minds' receipts count. */ +export const buildAlbums = (inputs: AlbumInput[], server = ''): Album[] => { + const seen = new Set(); + return inputs + .map((i) => toAlbum(i, server)) + .filter((a): a is Album => { + if (!a || seen.has(a.id)) return false; + seen.add(a.id); + return true; + }) + .sort((a, b) => b.ts - a.ts); +}; + +/** The newest event in an album's thread (shown or folded), else its root: where a new file threads after. */ +export const lastEvent = (album: Album): { id: string; ts: number } => + album.files + .flatMap((f) => [f, ...f.earlier]) + .reduce<{ id: string; ts: number }>((a, f) => (f.ts >= a.ts ? { id: f.id, ts: f.ts } : a), { + id: album.id, + ts: album.ts, + }); + +/** A room event with the thread root the SDK resolved for it, when it has one. */ +export type TimelineEvent = ZoneEvent & { threadRoot?: string }; + +/** + * File events that sit in the room outside any album thread: what a poster that does not thread + * its files leaves behind. The album list never reads them (it lists threads), so they are named + * to the sender instead of left out silently. + */ +export const looseFiles = (events: TimelineEvent[]): AlbumFile[] => + events + .filter((e) => { + const rel = e?.content?.['m.relates_to'] as { rel_type?: unknown } | undefined; + return !e?.threadRoot && rel?.rel_type !== 'm.thread'; + }) + .map(toFile) + .filter((f): f is AlbumFile => !!f); + +const NAMED = 3; + +/** The line that says loose files exist and are not listed; empty when there are none. */ +export const looseNote = (files: AlbumFile[]): string => { + if (files.length === 0) return ''; + const names = files.slice(0, NAMED).map((f) => f.name || 'unnamed'); + const more = files.length > NAMED ? ` and ${files.length - NAMED} more` : ''; + const what = files.length === 1 ? '1 file was' : `${files.length} files were`; + return `${what} posted outside an album and ${ + files.length === 1 ? 'is' : 'are' + } not listed here: ${names.join(', ')}${more}. ${ + files.length === 1 ? 'It is' : 'They are' + } in the Timeline.`; +}; + +/** Where the album view stands when it decides whether to show the loose-files note. */ +export type ViewState = { open: boolean; encrypted: boolean; loading: boolean; error: boolean }; + +/** The note for the list view only: never inside an open album, an encrypted zone, or a load that is not finished. */ +export const looseNoteFor = (files: AlbumFile[], view: ViewState): string => + view.open || view.encrypted || view.loading || view.error ? '' : looseNote(files); diff --git a/src/app/features/albums/fileReceipt.test.ts b/src/app/features/albums/fileReceipt.test.ts new file mode 100644 index 00000000..c3c85f5e --- /dev/null +++ b/src/app/features/albums/fileReceipt.test.ts @@ -0,0 +1,165 @@ +import { describe, expect, it } from 'vitest'; +import { ReceiptEvent, hashForSend, readLine, readersOf, sha256Hex } from './fileReceipt'; + +describe('sha256Hex', () => { + it('hashes the bytes: the FIPS 180 vector for "abc"', async () => { + expect(await sha256Hex(new Blob(['abc']))).toBe( + 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad' + ); + }); + it('hashes empty input', async () => { + expect(await sha256Hex(new Blob([]))).toBe( + 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855' + ); + }); +}); + +describe('hashForSend', () => { + it('gives no hash, and does not throw, when the blob cannot be read', async () => { + const broken = { arrayBuffer: () => Promise.reject(new Error('gone')) } as unknown as Blob; + expect(await hashForSend(broken)).toBeUndefined(); + }); +}); + +describe('readLine', () => { + it('names each reader', () => { + const name = (s: string) => s.slice(1, s.indexOf(':')); + expect( + readLine( + [ + { sender: '@void:x', ts: 1 }, + { sender: '@eureka:x', ts: 2 }, + ], + name + ) + ).toBe('fetched for void, eureka'); + }); +}); + +describe('readersOf: receipts anywhere in the room, thread reply or plain event', () => { + const HASH = 'a'.repeat(64); + const file = { info: { sha256: HASH } }; + const receipt = ( + id: string, + ts: number, + sender: string, + sha: unknown | undefined, + fileId: string | undefined, + relates?: object + ): ReceiptEvent => ({ + event_id: id, + type: 'org.gamecult.file_received', + sender, + origin_server_ts: ts, + content: { + ...(relates ? { 'm.relates_to': relates } : {}), + 'org.gamecult.file_received': { + event_id: fileId ?? '$f', + sha256: sha === undefined ? HASH : sha, + }, + }, + }); + const readers = (events: ReceiptEvent[], content: Record | undefined) => + readersOf(events, '$f', content, 'gamecult.org').map((r) => r.sender); + + it('counts a threadless receipt, as a composer file with no album root gets', () => { + expect(readers([receipt('$1', 5, '@void:gamecult.org', undefined, undefined)], file)).toEqual([ + '@void:gamecult.org', + ]); + }); + it('counts a thread reply the same way', () => { + const t = { rel_type: 'm.thread', event_id: '$root' }; + expect(readers([receipt('$1', 5, '@eureka:gamecult.org', HASH, '$f', t)], file)).toEqual([ + '@eureka:gamecult.org', + ]); + }); + it('refuses lookalike localparts and foreign servers', () => { + expect( + readers( + [ + receipt('$1', 1, '@void2:gamecult.org', undefined, undefined), + receipt('$2', 2, '@voidd:gamecult.org', undefined, undefined), + receipt('$3', 3, '@Void:gamecult.org', undefined, undefined), + receipt('$4', 4, '@void:evil.example', undefined, undefined), + receipt('$5', 5, '@void:gamecult.org.evil.example', undefined, undefined), + receipt('$6', 6, '@mallory:gamecult.org', undefined, undefined), + ], + file + ) + ).toEqual([]); + }); + it('shows nothing for a mismatched hash, a file with no hash, or another file', () => { + expect( + readers([receipt('$1', 1, '@void:gamecult.org', 'b'.repeat(64), undefined)], file) + ).toEqual([]); + expect( + readers([receipt('$1', 1, '@void:gamecult.org', undefined, undefined)], { info: {} }) + ).toEqual([]); + expect( + readers([receipt('$1', 1, '@void:gamecult.org', undefined, undefined)], undefined) + ).toEqual([]); + expect(readers([receipt('$1', 1, '@void:gamecult.org', HASH, '$other')], file)).toEqual([]); + }); + it('keeps one entry per Mind, the latest, oldest first', () => { + expect( + readersOf( + [ + receipt('$1', 30, '@void:gamecult.org', undefined, undefined), + receipt('$2', 10, '@void:gamecult.org', undefined, undefined), + receipt('$3', 20, '@aqua:gamecult.org', undefined, undefined), + ], + '$f', + file, + 'gamecult.org' + ) + ).toEqual([ + { sender: '@aqua:gamecult.org', ts: 20 }, + { sender: '@void:gamecult.org', ts: 30 }, + ]); + }); + it('ignores a redacted receipt and a malformed one', () => { + const redacted = { + ...receipt('$1', 1, '@void:gamecult.org', undefined, undefined), + unsigned: { redacted_because: {} }, + }; + expect( + readers( + [ + redacted, + receipt('$2', 2, '@void:gamecult.org', 7, undefined), + { + ...receipt('$3', 3, '@void:gamecult.org', undefined, undefined), + type: 'm.room.message', + }, + ], + file + ) + ).toEqual([]); + }); + + describe('an m.reference to the file', () => { + const ref = (id: string) => ({ rel_type: 'm.reference', event_id: id }); + it('counts when it names the same event as the content', () => { + expect( + readers([receipt('$1', 1, '@void:gamecult.org', HASH, '$f', ref('$f'))], file) + ).toEqual(['@void:gamecult.org']); + }); + it('counts for nothing when it names another event', () => { + expect( + readers([receipt('$1', 1, '@void:gamecult.org', HASH, '$f', ref('$other'))], file) + ).toEqual([]); + }); + it('draws one entry per Mind however many receipts exist', () => { + expect( + readers( + [ + receipt('$1', 1, '@void:gamecult.org', HASH, '$f', ref('$f')), + receipt('$2', 2, '@void:gamecult.org', HASH, '$f'), + receipt('$3', 3, '@void:gamecult.org', HASH, '$f', ref('$f')), + ], + file + ) + ).toEqual(['@void:gamecult.org']); + }); + }); +}); diff --git a/src/app/features/albums/fileReceipt.ts b/src/app/features/albums/fileReceipt.ts new file mode 100644 index 00000000..93fa73f0 --- /dev/null +++ b/src/app/features/albums/fileReceipt.ts @@ -0,0 +1,89 @@ +// The file-zone Mind contract (docs/file-zone-mind-contract.md): the plaintext hash a sender writes +// into a file event, and the receipt a Mind answers with. + +import { MINDS } from '../../components/message/pose/poses'; + +/** A Mind's verified receipt for one file: its sender, who the Matrix server says posted it. */ +export type FileReader = { sender: string; ts: number }; + +/** The slice of a Matrix event a receipt is read from. Every field may be missing. */ +export type ReceiptEvent = { + event_id?: string; + type?: string; + sender?: string; + origin_server_ts?: number; + content?: Record; + unsigned?: Record; +}; + +/** Hex sha256 of the plaintext bytes, written at `content.info[FILE_HASH_KEY]` in unencrypted rooms. */ +export const FILE_HASH_KEY = 'sha256'; + +/** A Mind's receipt: event type, and the content key holding { event_id, sha256, size }. Inert: nothing in it is fetched or trusted but the sender and the hash. */ +export const FILE_RECEIVED = 'org.gamecult.file_received'; + +export const sha256Hex = async (data: Blob): Promise => { + const digest = await crypto.subtle.digest('SHA-256', await data.arrayBuffer()); + return Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, '0')).join(''); +}; + +/** The hash to write for a file about to be sent in an unencrypted room; none when it cannot be computed. */ +export const hashForSend = async (data: Blob): Promise => { + try { + return await sha256Hex(data); + } catch { + return undefined; + } +}; + +export const readLine = (readBy: FileReader[], name: (sender: string) => string): string => + `fetched for ${readBy.map((r) => name(r.sender)).join(', ')}`; + +const receiptOf = (e: ReceiptEvent) => { + if (!e || typeof e !== 'object' || e.type !== FILE_RECEIVED || !e.event_id) return undefined; + if (e.unsigned?.redacted_because) return undefined; + const body = e.content?.[FILE_RECEIVED] as { event_id?: unknown; sha256?: unknown } | undefined; + if (typeof body?.event_id !== 'string' || typeof body.sha256 !== 'string') return undefined; + if (typeof e.sender !== 'string') return undefined; + // A reference to the file (Eureka's dedup, via /relations) must name the same event as the content, or the + // receipt counts for nothing. Matching is by content.event_id; other relations (a thread) are not read. + const rel = e.content?.['m.relates_to'] as { rel_type?: unknown; event_id?: unknown } | undefined; + if (rel?.rel_type === 'm.reference' && rel.event_id !== body.event_id) return undefined; + const ts = e.origin_server_ts; + return { + file: body.event_id, + sender: e.sender, + ts: typeof ts === 'number' && Number.isFinite(ts) ? ts : 0, + sha256: body.sha256, + }; +}; + +// Only the event's sender counts, never a name inside the content, and only a Mind's own Matrix +// identity on this homeserver (`@:`, a mind named in the Persona catalogue). +const isMind = (sender: string, server: string) => MINDS.some((m) => sender === `@${m}:${server}`); + +/** + * Who has read the file `fileId`, from receipts found anywhere in `events` (an album's thread replies, or the room's + * timeline: a receipt is a thread reply when the file has an album root, otherwise a plain room event; both count). + * "Read" means verified: the receipt's sha256 must equal the file event's `info.sha256`, so a file with no hash, or a + * mismatch, shows nothing. One entry per Mind (its latest), oldest first. + */ +export const readersOf = ( + events: ReceiptEvent[], + fileId: string, + fileContent: Record | undefined, + server: string +): FileReader[] => { + const sent = (fileContent?.info as Record | undefined)?.[FILE_HASH_KEY]; + if (typeof sent !== 'string') return []; + const latest = new Map(); + events + .map(receiptOf) + .filter( + (r): r is NonNullable => + !!r && r.file === fileId && r.sha256 === sent && isMind(r.sender, server) + ) + .sort((a, b) => a.ts - b.ts) + .forEach((r) => latest.set(r.sender, { sender: r.sender, ts: r.ts })); + return [...latest.values()].sort((a, b) => a.ts - b.ts); +}; diff --git a/src/app/features/albums/isFileZone.test.ts b/src/app/features/albums/isFileZone.test.ts new file mode 100644 index 00000000..0e55269f --- /dev/null +++ b/src/app/features/albums/isFileZone.test.ts @@ -0,0 +1,24 @@ +import { describe, expect, it } from 'vitest'; +import { isFileZone } from './isFileZone'; + +const room = { roomId: '!f:x', aliases: ['#files:x'] }; + +describe('isFileZone', () => { + it('is true for the file-zone create type', () => { + expect(isFileZone({ ...room, createType: 'org.gamecult.file_zone' }, {})).toBe(true); + }); + it('is false for other create types and for plain rooms', () => { + expect(isFileZone({ ...room, createType: 'm.space' }, {})).toBe(false); + expect(isFileZone({ ...room, createType: 'org.gamecult.other' }, {})).toBe(false); + expect(isFileZone({ ...room, createType: 'org.gamecult.file_zone.x' }, {})).toBe(false); + expect(isFileZone(room, {})).toBe(false); + expect(isFileZone(room, { fileZoneRooms: [] })).toBe(false); + }); + it('is true when the room id or an alias is configured', () => { + expect(isFileZone(room, { fileZoneRooms: ['!f:x'] })).toBe(true); + expect(isFileZone(room, { fileZoneRooms: ['#other:x', '#files:x'] })).toBe(true); + }); + it('is false when only another room is configured', () => { + expect(isFileZone(room, { fileZoneRooms: ['!g:x', '#g:x'] })).toBe(false); + }); +}); diff --git a/src/app/features/albums/isFileZone.ts b/src/app/features/albums/isFileZone.ts new file mode 100644 index 00000000..071ef17b --- /dev/null +++ b/src/app/features/albums/isFileZone.ts @@ -0,0 +1,14 @@ +export const FILE_ZONE_TYPE = 'org.gamecult.file_zone'; + +export type FileZoneRoom = { + roomId: string; + /** Canonical and alternative aliases. */ + aliases?: string[]; + /** The `type` of the room's m.room.create content. */ + createType?: string; +}; + +/** A room is the file zone when its create type says so or the client config lists it. */ +export const isFileZone = (room: FileZoneRoom, config: { fileZoneRooms?: string[] }): boolean => + room.createType === FILE_ZONE_TYPE || + !!config.fileZoneRooms?.some((r) => r === room.roomId || room.aliases?.includes(r)); diff --git a/src/app/features/albums/mapLimit.test.ts b/src/app/features/albums/mapLimit.test.ts new file mode 100644 index 00000000..24898cb0 --- /dev/null +++ b/src/app/features/albums/mapLimit.test.ts @@ -0,0 +1,29 @@ +import { describe, expect, it } from 'vitest'; +import { mapLimit } from './mapLimit'; + +describe('mapLimit', () => { + it('keeps result order and never exceeds the limit', async () => { + let inFlight = 0; + let peak = 0; + const out = await mapLimit([5, 1, 4, 2, 3, 0], 2, async (n) => { + inFlight += 1; + peak = Math.max(peak, inFlight); + await new Promise((r) => { + setTimeout(r, n); + }); + inFlight -= 1; + return n * 10; + }); + expect(out).toEqual([50, 10, 40, 20, 30, 0]); + expect(peak).toBe(2); + }); + it('handles an empty list and rejects when a call rejects', async () => { + expect(await mapLimit([], 3, async (n) => n)).toEqual([]); + await expect( + mapLimit([1, 2], 2, async (n) => { + if (n === 2) throw new Error('boom'); + return n; + }) + ).rejects.toThrow('boom'); + }); +}); diff --git a/src/app/features/albums/mapLimit.ts b/src/app/features/albums/mapLimit.ts new file mode 100644 index 00000000..e850add0 --- /dev/null +++ b/src/app/features/albums/mapLimit.ts @@ -0,0 +1,19 @@ +/** Like Promise.all(items.map(fn)) but with at most `limit` calls in flight; result order kept. */ +export const mapLimit = async ( + items: T[], + limit: number, + fn: (item: T) => Promise +): Promise => { + const out = new Array(items.length); + let next = 0; + const worker = async () => { + while (next < items.length) { + const i = next; + next += 1; + // eslint-disable-next-line no-await-in-loop + out[i] = await fn(items[i]); + } + }; + await Promise.all(Array.from({ length: Math.min(limit, items.length) }, worker)); + return out; +}; diff --git a/src/app/features/albums/publisherWire.test.ts b/src/app/features/albums/publisherWire.test.ts new file mode 100644 index 00000000..83bddf3a --- /dev/null +++ b/src/app/features/albums/publisherWire.test.ts @@ -0,0 +1,126 @@ +import { describe, expect, it } from 'vitest'; +import { buildAlbums, looseFiles, looseNote, looseNoteFor, TimelineEvent } from './buildAlbums'; + +// The Commons publisher as it posted before gamecult-ops #121: loose files (no album thread), a +// flat `org.gamecult.publish.replaces` key, no info.sha256. The sender must see that, not a +// silently empty or silently unfolded zone. +const MIND = '@eureka:gamecult.org'; +const file = ( + id: string, + name: string, + extra: Record = {}, + ts = 1 +): TimelineEvent => ({ + event_id: id, + type: 'm.room.message', + sender: MIND, + origin_server_ts: ts, + content: { msgtype: 'm.file', body: name, filename: name, url: `mxc://x/${id}`, ...extra }, +}); +const text = (id: string, body: string): TimelineEvent => ({ + event_id: id, + type: 'm.room.message', + sender: MIND, + origin_server_ts: 1, + content: { msgtype: 'm.text', body }, +}); + +describe('loose files from a poster that does not thread', () => { + it('are found, with the names the sender sees', () => { + const loose = looseFiles([file('$a', 'notes.md'), file('$b', 'plan.pdf')]); + expect(loose.map((f) => f.name)).toEqual(['notes.md', 'plan.pdf']); + }); + + it('are not the album roots, thread replies (by SDK root or by relation), edits or redactions', () => { + const events: TimelineEvent[] = [ + text('$root', 'handoff/eureka'), + { ...file('$r1', 'a.md'), threadRoot: '$root' }, + file('$r2', 'b.md', { + 'm.relates_to': { rel_type: 'm.thread', event_id: '$root' }, + }), + file('$edit', 'c.md', { 'm.relates_to': { rel_type: 'm.replace', event_id: '$r1' } }), + { ...file('$gone', 'd.md'), unsigned: { redacted_because: {} } }, + file('$loose', 'e.md'), + ]; + expect(looseFiles(events).map((f) => f.id)).toEqual(['$loose']); + }); + + it('a zone holding only loose files still has no albums, and the note says why', () => { + const events = [file('$a', 'notes.md')]; + expect(buildAlbums([])).toEqual([]); + expect(looseNote(looseFiles(events))).toBe( + '1 file was posted outside an album and is not listed here: notes.md. It is in the Timeline.' + ); + }); + + it('the note names three and counts the rest', () => { + const many = looseFiles(['a', 'b', 'c', 'd', 'e'].map((n) => file(`$${n}`, `${n}.md`))); + expect(looseNote(many)).toBe( + '5 files were posted outside an album and are not listed here: a.md, b.md, c.md and 2 more. They are in the Timeline.' + ); + expect(looseNote([])).toBe(''); + }); +}); + +describe('where the loose-files note shows', () => { + const loose = looseFiles([file('$a', 'notes.md')]); + const list = { open: false, encrypted: false, loading: false, error: false }; + + it('on the album list, and only there', () => { + expect(looseNoteFor(loose, list)).toContain('notes.md'); + expect(looseNoteFor(loose, { ...list, open: true })).toBe(''); + expect(looseNoteFor(loose, { ...list, encrypted: true })).toBe(''); + expect(looseNoteFor(loose, { ...list, loading: true })).toBe(''); + expect(looseNoteFor(loose, { ...list, error: true })).toBe(''); + }); + + it('says nothing when there are no loose files', () => { + expect(looseNoteFor([], list)).toBe(''); + }); + + it('names m.notice and m.sticker posts as not files', () => { + const notice = { ...text('$n', 'hi'), content: { msgtype: 'm.notice', body: 'hi' } }; + expect(looseFiles([notice])).toEqual([]); + }); + + it('a file with no name reads as unnamed', () => { + const bare: TimelineEvent = { ...file('$b', ''), content: { msgtype: 'm.file', body: '' } }; + expect(looseNote(looseFiles([bare]))).toContain('unnamed'); + }); +}); + +describe('the old wire shape inside an album', () => { + const root = text('$root', 'handoff/eureka'); + const albumOf = (replies: TimelineEvent[]) => buildAlbums([{ root, replies }], 'gamecult.org')[0]; + + it('a flat replaces key folds nothing: both versions show, none is hidden', () => { + const album = albumOf([ + file('$v1', 'plan.md', { 'org.gamecult.publish.sha256': 'aa' }, 1), + file('$v2', 'plan.md', { 'org.gamecult.publish.replaces': '$v1' }, 2), + ]); + expect(album.files.map((f) => f.id)).toEqual(['$v1', '$v2']); + expect(album.files.every((f) => f.earlier.length === 0)).toBe(true); + }); + + it('the nested shape from the fixed publisher folds as before', () => { + const album = albumOf([ + file('$v1', 'plan.md', {}, 1), + file('$v2', 'plan.md', { 'org.gamecult.publish': { replaces: '$v1' } }, 2), + ]); + expect(album.files.map((f) => f.id)).toEqual(['$v2']); + expect(album.files[0].earlier.map((f) => f.id)).toEqual(['$v1']); + }); + + it('a file with no info.sha256 lists fine, with no readers even when a receipt names it', () => { + const receipt: TimelineEvent = { + event_id: '$rc', + type: 'org.gamecult.file_received', + sender: '@void:gamecult.org', + origin_server_ts: 5, + content: { 'org.gamecult.file_received': { event_id: '$v1', sha256: 'aa', size: 1 } }, + }; + const album = albumOf([file('$v1', 'plan.md'), receipt]); + expect(album.count).toBe(1); + expect(album.files[0].readBy).toEqual([]); + }); +}); diff --git a/src/app/features/albums/readPages.test.ts b/src/app/features/albums/readPages.test.ts new file mode 100644 index 00000000..124a32a6 --- /dev/null +++ b/src/app/features/albums/readPages.test.ts @@ -0,0 +1,55 @@ +import { describe, expect, it } from 'vitest'; +import { Page, readPages } from './readPages'; + +const pager = (pages: Page[]) => { + const froms: (string | undefined)[] = []; + return { + froms, + fetchPage: async (from: string | undefined) => { + froms.push(from); + return pages[froms.length - 1] ?? {}; + }, + }; +}; + +describe('readPages', () => { + it('one page without a token is the whole read', async () => { + const p = pager([{ chunk: [1, 2] }]); + expect(await readPages(p.fetchPage)).toEqual({ items: [1, 2], truncated: false }); + expect(p.froms).toEqual([undefined]); + }); + + it('follows next_batch in order, passing each token back', async () => { + const p = pager([ + { chunk: [1], next_batch: 'a' }, + { chunk: [2], next_batch: 'b' }, + { chunk: [3] }, + ]); + expect(await readPages(p.fetchPage)).toEqual({ items: [1, 2, 3], truncated: false }); + expect(p.froms).toEqual([undefined, 'a', 'b']); + }); + + it('a missing chunk reads as empty', async () => { + expect(await readPages(async () => ({}))).toEqual({ items: [], truncated: false }); + }); + + it('an empty page ends the read even when it carries a token', async () => { + const p = pager([ + { chunk: [1], next_batch: 'a' }, + { chunk: [], next_batch: 'b' }, + ]); + expect(await readPages(p.fetchPage)).toEqual({ items: [1], truncated: false }); + expect(p.froms).toHaveLength(2); + }); + + it('the cap stops the read and says it was cut short', async () => { + const p = pager(Array.from({ length: 10 }, (_, i) => ({ chunk: [i], next_batch: `t${i}` }))); + expect(await readPages(p.fetchPage, 3)).toEqual({ items: [0, 1, 2], truncated: true }); + expect(p.froms).toHaveLength(3); + }); + + it('a last page exactly at the cap is not truncated', async () => { + const p = pager([{ chunk: [1], next_batch: 'a' }, { chunk: [2] }]); + expect((await readPages(p.fetchPage, 2)).truncated).toBe(false); + }); +}); diff --git a/src/app/features/albums/readPages.ts b/src/app/features/albums/readPages.ts new file mode 100644 index 00000000..a2b888e5 --- /dev/null +++ b/src/app/features/albums/readPages.ts @@ -0,0 +1,27 @@ +/** One page of a Matrix paginated endpoint: its events and the token for the next page, if any. */ +export type Page = { chunk?: T[]; next_batch?: string }; + +/** Pages read per endpoint at most, so a runaway zone cannot hold the phone in a loop. */ +export const MAX_PAGES = 20; + +/** + * Reads every page of an endpoint by following `next_batch`, up to `maxPages`. `truncated` is true + * when the cap stopped the read with more still to come, so a caller can say the list is partial. + */ +export const readPages = async ( + fetchPage: (from: string | undefined) => Promise>, + maxPages = MAX_PAGES +): Promise<{ items: T[]; truncated: boolean }> => { + const items: T[] = []; + let from: string | undefined; + for (let n = 0; n < maxPages; n += 1) { + // eslint-disable-next-line no-await-in-loop + const page = await fetchPage(from); + items.push(...(page.chunk ?? [])); + // An empty page ends the read even if a token is returned: a server that keeps handing out + // tokens with nothing behind them would otherwise spend every page of the cap. + if (!page.next_batch || !page.chunk?.length) return { items, truncated: false }; + from = page.next_batch; + } + return { items, truncated: true }; +}; diff --git a/src/app/features/albums/receiptStore.test.ts b/src/app/features/albums/receiptStore.test.ts new file mode 100644 index 00000000..c97202e5 --- /dev/null +++ b/src/app/features/albums/receiptStore.test.ts @@ -0,0 +1,116 @@ +import { EventEmitter } from 'events'; +import { describe, expect, it, vi } from 'vitest'; +import { MatrixEvent, Room, RoomEvent } from 'matrix-js-sdk'; +import { receiptStoreOf } from './receiptStore'; +import { readersOf } from './fileReceipt'; + +const HASH = 'a'.repeat(64); + +type Fake = { + id: string; + type: string; + sender: string; + ts: number; + content: object; + redacted?: boolean; +}; +const event = (f: Fake) => + ({ + getId: () => f.id, + getType: () => f.type, + getSender: () => f.sender, + getTs: () => f.ts, + getContent: () => f.content, + isRedacted: () => !!f.redacted, + } as unknown as MatrixEvent); +const receipt = (id: string, sender: string, fileId = '$f', over: Partial = {}): Fake => ({ + id, + type: 'org.gamecult.file_received', + sender, + ts: 1, + content: { 'org.gamecult.file_received': { event_id: fileId, sha256: HASH } }, + ...over, +}); + +const fakeRoom = (initial: Fake[] = []) => { + const emitter = new EventEmitter(); + emitter.setMaxListeners(0); + let events = initial; + const room = Object.assign(emitter, { + getUnfilteredTimelineSet: () => ({ + getLiveTimeline: () => ({ getEvents: () => events.map(event) }), + }), + }) as unknown as Room; + return { + room, + emitter, + set: (next: Fake[]) => { + events = next; + }, + }; +}; +const listeners = (e: EventEmitter) => + [RoomEvent.Timeline, RoomEvent.Redaction, RoomEvent.TimelineReset].map((n) => e.listenerCount(n)); + +describe('receiptStoreOf: one subscription per room', () => { + it('registers one listener per event for 200 file rows, and none once they are gone', () => { + const { room, emitter } = fakeRoom(); + const store = receiptStoreOf(room); + const off = Array.from({ length: 200 }, () => store.subscribe(() => undefined)); + expect(listeners(emitter)).toEqual([1, 1, 1]); + off.forEach((o) => o()); + expect(listeners(emitter)).toEqual([0, 0, 0]); + }); + + it('is one store per room', () => { + const a = fakeRoom(); + const b = fakeRoom(); + expect(receiptStoreOf(a.room)).toBe(receiptStoreOf(a.room)); + expect(receiptStoreOf(a.room)).not.toBe(receiptStoreOf(b.room)); + }); + + it('notifies rows when a receipt arrives, not for unrelated timeline events, and gives readersOf what it needs', () => { + const { room, emitter, set } = fakeRoom(); + const store = receiptStoreOf(room); + const cb = vi.fn(); + store.subscribe(cb); + expect(store.getSnapshot()).toEqual([]); + set([{ id: '$m', type: 'm.room.message', sender: '@x:gamecult.org', ts: 1, content: {} }]); + emitter.emit(RoomEvent.Timeline); + expect(cb).not.toHaveBeenCalled(); + set([receipt('$r', '@void:gamecult.org')]); + emitter.emit(RoomEvent.Timeline); + expect(cb).toHaveBeenCalledTimes(1); + const snap = store.getSnapshot(); + expect( + readersOf(snap, '$f', { info: { sha256: HASH } }, 'gamecult.org').map((r) => r.sender) + ).toEqual(['@void:gamecult.org']); + emitter.emit(RoomEvent.Timeline); + expect(store.getSnapshot()).toBe(snap); + }); + + it('rescans on a redaction and on a timeline reset', () => { + const { room, emitter, set } = fakeRoom([receipt('$r', '@void:gamecult.org')]); + const store = receiptStoreOf(room); + const cb = vi.fn(); + store.subscribe(cb); + expect(store.getSnapshot()).toHaveLength(1); + set([receipt('$r', '@void:gamecult.org', '$f', { redacted: true })]); + emitter.emit(RoomEvent.Redaction); + expect(cb).toHaveBeenCalledTimes(1); + expect( + readersOf(store.getSnapshot(), '$f', { info: { sha256: HASH } }, 'gamecult.org') + ).toEqual([]); + set([]); + emitter.emit(RoomEvent.TimelineReset); + expect(cb).toHaveBeenCalledTimes(2); + expect(store.getSnapshot()).toEqual([]); + }); + + it('picks up what is already loaded when the first row subscribes', () => { + const { room } = fakeRoom([receipt('$r', '@aqua:gamecult.org')]); + const store = receiptStoreOf(room); + store.subscribe(() => undefined); + expect(store.getSnapshot()).toHaveLength(1); + }); +}); diff --git a/src/app/features/albums/receiptStore.ts b/src/app/features/albums/receiptStore.ts new file mode 100644 index 00000000..1f69aba9 --- /dev/null +++ b/src/app/features/albums/receiptStore.ts @@ -0,0 +1,79 @@ +import type { MatrixEvent, Room } from 'matrix-js-sdk'; +import { RoomEvent } from 'matrix-js-sdk'; +import { FILE_RECEIVED, ReceiptEvent } from './fileReceipt'; + +/** + * One subscription per room to the file receipts in its loaded timeline, shared by every file row: a row costs a + * callback in a Set, not a Room listener (matrix-js-sdk warns past 100 listeners). The snapshot is the receipt events + * themselves; each row derives its own readers from it with `readersOf`, so the rules (sender, hash, reference, one per + * Mind) live in one place and the store holds no verdicts. The snapshot changes identity only when the set of receipts + * or one's redaction state does, so rows re-render for a receipt, not for every timeline event. + */ +export type ReceiptStore = { + subscribe: (onChange: () => void) => () => void; + getSnapshot: () => ReceiptEvent[]; +}; + +const asReceiptEvent = (e: MatrixEvent): ReceiptEvent => ({ + event_id: e.getId(), + type: e.getType(), + sender: e.getSender(), + origin_server_ts: e.getTs(), + content: e.getContent(), + unsigned: e.isRedacted() ? { redacted_because: true } : undefined, +}); + +const same = (a: ReceiptEvent[], b: ReceiptEvent[]): boolean => + a.length === b.length && + a.every( + (r, i) => + r.event_id === b[i].event_id && + !r.unsigned?.redacted_because === !b[i].unsigned?.redacted_because + ); + +// A redaction removes a tick and a reset drops the window: both rescan, not only a new event. +const EVENTS = [RoomEvent.Timeline, RoomEvent.Redaction, RoomEvent.TimelineReset] as const; + +const make = (room: Room): ReceiptStore => { + const subscribers = new Set<() => void>(); + let snapshot: ReceiptEvent[] = []; + const read = (): boolean => { + const next = room + .getUnfilteredTimelineSet() + .getLiveTimeline() + .getEvents() + .filter((e) => e.getType() === FILE_RECEIVED) + .map(asReceiptEvent); + if (same(snapshot, next)) return false; + snapshot = next; + return true; + }; + const scan = () => { + if (read()) subscribers.forEach((cb) => cb()); + }; + return { + subscribe: (onChange) => { + subscribers.add(onChange); + if (subscribers.size === 1) { + EVENTS.forEach((ev) => room.on(ev, scan)); + read(); // the first row sees what is already loaded; it reads the snapshot after subscribing + } + return () => { + subscribers.delete(onChange); + if (subscribers.size === 0) EVENTS.forEach((ev) => room.off(ev, scan)); + }; + }, + getSnapshot: () => snapshot, + }; +}; + +const stores = new WeakMap(); + +export const receiptStoreOf = (room: Room): ReceiptStore => { + let store = stores.get(room); + if (!store) { + store = make(room); + stores.set(room, store); + } + return store; +}; diff --git a/src/app/features/albums/shareController.test.ts b/src/app/features/albums/shareController.test.ts new file mode 100644 index 00000000..b163b736 --- /dev/null +++ b/src/app/features/albums/shareController.test.ts @@ -0,0 +1,380 @@ +import { describe, expect, it } from 'vitest'; +import { Picked, ShareDeps, createShareController } from './shareController'; +import { ShareResult } from './shareSet'; + +const file = (name: string, size?: number): Picked => ({ name, type: 'audio/ogg', size }); +const MB = 1024 * 1024; +const ok = (n: number): ShareResult => ({ albumId: '$r', sent: n, failed: [], failedAt: [] }); + +/** A run the test settles by hand, so "in flight" is a state the test can stand in. */ +const hand = () => { + const calls: { files: Picked[]; title: string; onFile: () => void; signal: AbortSignal }[] = []; + let release: (r: ShareResult) => void = () => undefined; + let fail: (e: Error) => void = () => undefined; + const run: ShareDeps['run'] = (files, title, onFile, signal) => { + calls.push({ files, title, onFile, signal }); + return new Promise((resolve, reject) => { + release = resolve; + fail = reject; + }); + }; + return { calls, run, release: (r: ShareResult) => release(r), fail: (e: Error) => fail(e) }; +}; + +const make = (over: Partial> = {}, roomId = '!zone:x') => { + const h = hand(); + const sentTo: string[] = []; + const c = createShareController({ + roomId, + isEncrypted: () => false, + run: h.run, + onSent: () => sentTo.push(roomId), + ...over, + }); + return { c, h, sentTo }; +}; + +describe('picking', () => { + it('starts idle with nothing picked, and a pick holds the files in order', () => { + const { c } = make(); + expect(c.getState().files).toEqual([]); + expect(c.getState().phase).toEqual({ kind: 'idle' }); + c.pick([file('a'), file('b')]); + expect(c.getState().files.map((f) => f.name)).toEqual(['a', 'b']); + }); + + it('Cancel empties the pick and the title and bumps the input epoch', () => { + const { c } = make(); + c.pick([file('a')]); + c.setTitle('Take 4'); + const before = c.getState().epoch; + c.cancel(); + expect(c.getState()).toMatchObject({ files: [], title: '', epoch: before + 1 }); + }); + + it('subscribers hear every change and stop hearing after unsubscribe', () => { + const { c } = make(); + let heard = 0; + const off = c.subscribe(() => { + heard += 1; + }); + c.pick([file('a')]); + off(); + c.pick([]); + expect(heard).toBe(1); + }); +}); + +describe('the Send guard', () => { + it('a double tap starts one send', async () => { + const { c, h } = make(); + c.pick([file('a'), file('b')]); + const first = c.send(); + const second = c.send(); + expect(h.calls).toHaveLength(1); + h.release(ok(2)); + await Promise.all([first, second]); + expect(h.calls).toHaveLength(1); + }); + + it('a re-mounted panel for the same room cannot start a second send while one is in flight', async () => { + const { c, h } = make(); + c.pick([file('a')]); + const first = c.send(); + // The page was left and returned to: a new controller, nothing picked in it but a new pick. + const again = make({}, '!zone:x'); + again.c.pick([file('b')]); + await again.c.send(); + expect(again.h.calls).toHaveLength(0); + h.release(ok(1)); + await first; + // Once the first has settled the room is free again. + const next = again.c.send(); + expect(again.h.calls).toHaveLength(1); + again.h.release(ok(1)); + await next; + }); + + it('another room is not blocked by a send in flight', async () => { + const a = make({}, '!a:x'); + const b = make({}, '!b:x'); + a.c.pick([file('a')]); + b.c.pick([file('b')]); + const sendA = a.c.send(); + const sendB = b.c.send(); + expect(b.h.calls).toHaveLength(1); + a.h.release(ok(1)); + b.h.release(ok(1)); + await Promise.all([sendA, sendB]); + }); + + it('sends nothing when nothing is picked', async () => { + const { c, h } = make(); + await c.send(); + expect(h.calls).toHaveLength(0); + }); + + it('a send that throws frees the room and says so', async () => { + const { c, h } = make(); + c.pick([file('a')]); + const p = c.send(); + h.fail(new Error('M_FORBIDDEN')); + await p; + expect(c.getState().phase).toEqual({ kind: 'done', text: 'Could not share: M_FORBIDDEN' }); + expect(c.getState().files).toHaveLength(1); + const retry = c.send(); + expect(h.calls).toHaveLength(2); + h.release(ok(1)); + await retry; + }); +}); + +describe('progress and results', () => { + it('counts files as they settle, passing the title through', async () => { + const { c, h } = make(); + c.pick([file('a'), file('b')]); + c.setTitle('Take 4'); + const p = c.send(); + expect(c.getState().phase).toEqual({ kind: 'sending', done: 0 }); + expect(h.calls[0].title).toBe('Take 4'); + h.calls[0].onFile(); + expect(c.getState().phase).toEqual({ kind: 'sending', done: 1 }); + h.release(ok(2)); + await p; + expect(c.getState().phase).toEqual({ kind: 'done', text: 'Shared 2 files.' }); + }); + + it('full success clears the pick, tells the room list, and remounts the input', async () => { + const { c, h, sentTo } = make(); + c.pick([file('a')]); + const { epoch } = c.getState(); + const p = c.send(); + h.release(ok(1)); + await p; + expect(c.getState()).toMatchObject({ files: [], title: '', epoch: epoch + 1 }); + expect(sentTo).toEqual(['!zone:x']); + }); + + it('failed files stay picked by position, so a same-named twin that went is not re-sent', async () => { + const { c, h } = make(); + const twins = [file('a.ogg'), file('a.ogg'), file('b.ogg')]; + c.pick(twins); + const p = c.send(); + h.release({ albumId: '$r', sent: 2, failed: ['a.ogg'], failedAt: [1] }); + await p; + expect(c.getState().files).toEqual([twins[1]]); + expect(c.getState().phase).toEqual({ kind: 'done', text: 'Shared 2. Not sent: a.ogg' }); + }); + + it('when every upload failed everything stays picked and the note says nothing was shared', async () => { + const { c, h } = make(); + const picked = [file('a'), file('b')]; + c.pick(picked); + const p = c.send(); + h.release({ albumId: '$r', sent: 0, failed: ['a', 'b'], failedAt: [0, 1] }); + await p; + expect(c.getState().files).toEqual(picked); + expect(c.getState().phase).toEqual({ + kind: 'done', + text: 'Nothing was shared. Not sent: a, b', + }); + }); + + it('a new pick after a result drops the result note', async () => { + const { c, h } = make(); + c.pick([file('a')]); + const p = c.send(); + h.release(ok(1)); + await p; + c.pick([file('b')]); + expect(c.getState().phase).toEqual({ kind: 'idle' }); + }); +}); + +describe('what a send leaves behind', () => { + it('keeps the title when some files failed, so the retry has the same name', async () => { + const { c, h } = make(); + c.pick([file('a'), file('b')]); + c.setTitle('Take 4'); + const p = c.send(); + h.release({ albumId: '$r', sent: 1, failed: ['b'], failedAt: [1] }); + await p; + expect(c.getState().title).toBe('Take 4'); + }); + + it('tells the room list only after the send settled, and not when it threw', async () => { + const { c, h, sentTo } = make(); + c.pick([file('a')]); + const p = c.send(); + expect(sentTo).toEqual([]); + h.release(ok(1)); + await p; + expect(sentTo).toEqual(['!zone:x']); + + const bad = make(); + bad.c.pick([file('a')]); + const q = bad.c.send(); + bad.h.fail(new Error('boom')); + await q; + expect(bad.sentTo).toEqual([]); + }); + + it('a success lands in one notification: the pick is never empty while still sending', async () => { + const { c, h } = make(); + c.pick([file('a')]); + const p = c.send(); + const seen: string[] = []; + c.subscribe(() => { + const st = c.getState(); + seen.push(`${st.files.length}:${st.phase.kind}`); + }); + h.release(ok(1)); + await p; + expect(seen).toEqual(['0:done']); + }); +}); + +describe('an encrypted room', () => { + it('says so, sends nothing and keeps the pick', async () => { + const { c, h } = make({ isEncrypted: () => true }); + c.pick([file('a')]); + await c.send(); + expect(c.getState().phase).toEqual({ + kind: 'done', + text: 'Not shared: this room is encrypted.', + }); + expect(c.getState().files).toHaveLength(1); + expect(h.calls).toHaveLength(0); + }); + + it('is checked at Send, not at mount: a room that turns encrypted after the pick is refused', async () => { + let encrypted = false; + const { c, h } = make({ isEncrypted: () => encrypted }); + c.pick([file('a')]); + encrypted = true; + await c.send(); + expect(h.calls).toHaveLength(0); + expect(c.getState().phase).toMatchObject({ + kind: 'done', + text: 'Not shared: this room is encrypted.', + }); + }); +}); + +describe('Stop', () => { + it('aborts the signal of the send in flight, and only that send', async () => { + const { c, h } = make(); + c.pick([file('a'), file('b')]); + c.stop(); // nothing running: nothing to abort + const sending = c.send(); + expect(h.calls[0].signal.aborted).toBe(false); + c.stop(); + expect(h.calls[0].signal.aborted).toBe(true); + h.release({ albumId: '$r', sent: 0, failed: ['a', 'b'], failedAt: [0, 1] }); + await sending; + expect(c.getState().files.map((f) => f.name)).toEqual(['a', 'b']); + // the next send gets a fresh signal + const again = c.send(); + expect(h.calls[1].signal.aborted).toBe(false); + h.release(ok(2)); + await again; + }); +}); + +describe('files over the homeserver cap', () => { + const cap = 50 * MB; + const capped = () => make({ maxBytes: () => cap }); + + it('are named in the note and never sent; the rest go', async () => { + const { c, h } = capped(); + c.pick([file('small.ogg', 3 * MB), file('film.mp4', 80 * MB), file('also.ogg', 1)]); + const sent = c.send(); + expect(h.calls[0].files.map((f) => f.name)).toEqual(['small.ogg', 'also.ogg']); + expect(c.getState().files.map((f) => f.name)).toEqual(['small.ogg', 'also.ogg']); + h.release(ok(2)); + await sent; + expect(c.getState().phase).toEqual({ + kind: 'done', + text: 'Shared 2 files. Too large for this server (limit 50 MB): film.mp4', + }); + expect(c.getState().files).toEqual([]); + }); + + it('are not kept for a retry that cannot help them, while a failed small file is', async () => { + const { c, h } = capped(); + c.pick([file('a.ogg', 1), file('big.wav', 60 * MB)]); + const sent = c.send(); + h.release({ albumId: '$r', sent: 0, failed: ['a.ogg'], failedAt: [0] }); + await sent; + expect(c.getState().files.map((f) => f.name)).toEqual(['a.ogg']); + }); + + it('a pick that is all over the cap sends nothing: no run, so no album root, and the pick clears', async () => { + const { c, h, sentTo } = capped(); + c.pick([file('a.mp4', 51 * MB), file('b.mp4', 99 * MB)]); + const { epoch } = c.getState(); + await c.send(); + expect(h.calls).toHaveLength(0); + expect(sentTo).toEqual([]); + expect(c.getState()).toMatchObject({ files: [], epoch: epoch + 1 }); + expect(c.getState().phase).toEqual({ + kind: 'done', + text: 'Nothing was shared. Too large for this server (limit 50 MB): a.mp4, b.mp4', + }); + }); + + it('a file of exactly the cap goes: the server refuses only what is larger', async () => { + const { c, h } = capped(); + c.pick([file('edge.bin', cap)]); + const sent = c.send(); + expect(h.calls[0].files).toHaveLength(1); + h.release(ok(1)); + await sent; + }); + + it('the room is not held busy by an all-refused pick, so the next pick sends', async () => { + const { c, h } = capped(); + c.pick([file('a.mp4', 99 * MB)]); + await c.send(); + c.pick([file('b.ogg', 1)]); + const sent = c.send(); + expect(h.calls).toHaveLength(1); + h.release(ok(1)); + await sent; + }); + + it('a server that states no cap, or a file with no size, refuses nothing', async () => { + const none = make(); + none.c.pick([file('a', 10 ** 12)]); + const s1 = none.c.send(); + expect(none.h.calls[0].files).toHaveLength(1); + none.h.release(ok(1)); + await s1; + const unsized = make({ maxBytes: () => cap }, '!other:x'); + unsized.c.pick([file('b')]); + const s2 = unsized.c.send(); + expect(unsized.h.calls[0].files).toHaveLength(1); + unsized.h.release(ok(1)); + await s2; + }); + + it('a fractional cap reads with one decimal', async () => { + const { c } = make({ maxBytes: () => 1.5 * MB }); + c.pick([file('a', 2 * MB)]); + await c.send(); + expect(c.getState().phase).toMatchObject({ text: expect.stringContaining('limit 1.5 MB') }); + }); + + it('a run that throws still names the refused files, which are not kept', async () => { + const { c, h } = capped(); + c.pick([file('a.ogg', 1), file('big.wav', 60 * MB)]); + const sent = c.send(); + h.fail(new Error('network down')); + await sent; + expect(c.getState().phase).toEqual({ + kind: 'done', + text: 'Could not share: network down. Too large for this server (limit 50 MB): big.wav', + }); + expect(c.getState().files.map((f) => f.name)).toEqual(['a.ogg']); + }); +}); diff --git a/src/app/features/albums/shareController.ts b/src/app/features/albums/shareController.ts new file mode 100644 index 00000000..72f786c9 --- /dev/null +++ b/src/app/features/albums/shareController.ts @@ -0,0 +1,135 @@ +// The share panel's state machine, apart from React and Matrix: what is picked, what phase the +// send is in, and the rules that keep a room to one send at a time. ShareSet.tsx draws it. +import { ShareResult, remainingAfter, resultNote } from './shareSet'; + +export type Picked = { name: string; type: string; size?: number }; + +export type SharePhase = + | { kind: 'idle' } + | { kind: 'sending'; done: number } + | { kind: 'done'; text: string }; + +export type ShareState = { + files: F[]; + title: string; + phase: SharePhase; + /** Bumps whenever the pick is emptied, so the file input can be remounted and re-pick the same files. */ + epoch: number; +}; + +export const ENCRYPTED_NOTE = 'Not shared: this room is encrypted.'; + +const MIB = 1024 * 1024; + +/** + * Files the homeserver would refuse for size (its `m.upload.size`, which Synapse enforces as a + * limit, so a file of exactly that size goes), split from the rest before anything is sent. A + * missing cap or size refuses nothing. + */ +export const splitBySize = (files: F[], cap: number | undefined) => { + const over = (f: F) => cap !== undefined && f.size !== undefined && f.size > cap; + return { sendable: files.filter((f) => !over(f)), tooLarge: files.filter(over) }; +}; + +const tooLargeNote = (names: string[], cap: number): string => + `Too large for this server (limit ${Math.round((cap / MIB) * 10) / 10} MB): ${names.join(', ')}`; + +export type ShareDeps = { + roomId: string; + isEncrypted: () => boolean; + /** Sends the files as one album; reports each settled file through onFile. */ + run: (files: F[], title: string, onFile: () => void, signal: AbortSignal) => Promise; + /** The homeserver's upload cap in bytes (`m.upload.size`), when it states one. */ + maxBytes?: () => number | undefined; + /** Called after a send that reached the room, whatever it left unsent. */ + onSent?: () => void; +}; + +/** Rooms with a share in flight. Module-level: leaving the page unmounts the panel, not the send. */ +const sending = new Set(); + +export const createShareController = (deps: ShareDeps) => { + let state: ShareState = { files: [], title: '', phase: { kind: 'idle' }, epoch: 0 }; + const listeners = new Set<() => void>(); + let running: AbortController | undefined; + const set = (patch: Partial>) => { + state = { ...state, ...patch }; + listeners.forEach((l) => l()); + }; + + const clear = () => set({ files: [], title: '', epoch: state.epoch + 1 }); + + const send = async () => { + if (sending.has(deps.roomId) || state.files.length === 0) return; + if (deps.isEncrypted()) { + set({ phase: { kind: 'done', text: ENCRYPTED_NOTE } }); + return; + } + // Files over the cap are named and dropped from the pick before any upload or album root: a + // retry cannot help them, and a root with nothing under it is a lone message nobody lists. + const cap = deps.maxBytes?.(); + const { sendable, tooLarge } = splitBySize(state.files, cap); + const sizeNote = tooLarge.length + ? tooLargeNote( + tooLarge.map((f) => f.name), + cap as number + ) + : ''; + if (sendable.length === 0) { + const phase: SharePhase = { kind: 'done', text: `Nothing was shared. ${sizeNote}` }; + set({ files: [], title: '', epoch: state.epoch + 1, phase }); + return; + } + sending.add(deps.roomId); + const abort = new AbortController(); + running = abort; + const { title } = state; + const files = sendable; + set({ files, phase: { kind: 'sending', done: 0 } }); + let settled = 0; + try { + const res = await deps.run( + files, + title, + () => { + settled += 1; + set({ phase: { kind: 'sending', done: settled } }); + }, + abort.signal + ); + deps.onSent?.(); + const left = remainingAfter(files, res); + const phase: SharePhase = { + kind: 'done', + text: sizeNote ? `${resultNote(res)} ${sizeNote}` : resultNote(res), + }; + // One notification: no state is ever drawn with the pick emptied and the send still running. + if (left.length === 0) set({ files: [], title: '', epoch: state.epoch + 1, phase }); + else set({ files: left, phase }); + } catch (e: any) { + const failure = `Could not share: ${e?.message ?? 'send failed'}`; + set({ phase: { kind: 'done', text: sizeNote ? `${failure}. ${sizeNote}` : failure } }); + } finally { + running = undefined; + sending.delete(deps.roomId); + } + }; + + return { + getState: () => state, + subscribe: (l: () => void) => { + listeners.add(l); + return () => { + listeners.delete(l); + }; + }, + pick: (files: F[]) => set({ files, phase: { kind: 'idle' } }), + setTitle: (title: string) => set({ title }), + cancel: clear, + /** Stops a send in flight: the running upload is aborted and the rest are left picked. */ + stop: () => running?.abort(), + send, + }; +}; + +export type ShareController = ReturnType>; diff --git a/src/app/features/albums/shareSet.test.ts b/src/app/features/albums/shareSet.test.ts new file mode 100644 index 00000000..8fc4a8b8 --- /dev/null +++ b/src/app/features/albums/shareSet.test.ts @@ -0,0 +1,328 @@ +import { describe, expect, it } from 'vitest'; +import config from '../../../../config.json'; +import { ZoneEvent, buildAlbums } from './buildAlbums'; +import { + DEFAULT_TITLE, + ShareFile, + SharePort, + CANCELLED, + freshest, + refusalOf, + remainingAfter, + resultNote, + sendShareSet, + threadRelation, +} from './shareSet'; + +const kindOf = (f: ShareFile) => (f.mimeType.startsWith('audio') ? 'm.audio' : 'm.file'); + +/** A fake room: records what is sent, as the events Synapse would return from /relations. */ +const room = (failOn: string[] = []) => { + const events: ZoneEvent[] = []; + const port: SharePort = { + send: async (content) => { + const id = `$e${events.length + 1}`; + events.push({ + event_id: id, + type: 'm.room.message', + sender: '@aqua:chat.gamecult.org', + origin_server_ts: 1000 + events.length, + content, + }); + return id; + }, + contentOf: async (f) => { + if (failOn.includes(f.name)) throw new Error('upload failed'); + return { + msgtype: kindOf(f), + body: f.name, + filename: f.name, + url: `mxc://x/${f.name}`, + info: { mimetype: f.mimeType }, + }; + }, + }; + const album = () => { + const [root, ...replies] = events; + return buildAlbums([{ root, replies }], 'chat.gamecult.org')[0]; + }; + return { events, port, album }; +}; + +const clips: ShareFile[] = [ + { name: 'a.ogg', mimeType: 'audio/ogg' }, + { name: 'b.ogg', mimeType: 'audio/ogg' }, + { name: 'c.txt', mimeType: 'text/plain' }, +]; + +describe('sendShareSet', () => { + it('reads back as one album of the files in pick order', async () => { + const r = room(); + const res = await sendShareSet(r.port, 'Take 4', clips); + expect(res).toEqual({ albumId: '$e1', sent: 3, failed: [], failedAt: [], reasons: [] }); + const album = r.album(); + expect(album.title).toBe('Take 4'); + expect(album.files.map((f) => [f.name, f.kind])).toEqual([ + ['a.ogg', 'audio'], + ['b.ogg', 'audio'], + ['c.txt', 'file'], + ]); + }); + + it('threads every file under the root, each falling back to the previous event', async () => { + const r = room(); + await sendShareSet(r.port, 't', clips); + const rels = r.events.slice(1).map((e) => e.content?.['m.relates_to']); + expect(rels).toEqual([ + threadRelation('$e1', '$e1'), + threadRelation('$e1', '$e2'), + threadRelation('$e1', '$e3'), + ]); + expect(r.events[0].content?.['m.relates_to']).toBeUndefined(); + }); + + it('titles an untitled share', async () => { + const r = room(); + await sendShareSet(r.port, ' ', clips.slice(0, 1)); + expect(r.album().title).toBe(DEFAULT_TITLE); + }); + + it('names a failed file and still sends the rest', async () => { + const r = room(['b.ogg']); + const res = await sendShareSet(r.port, 't', clips); + expect(res.failed).toEqual(['b.ogg']); + expect(res.sent).toBe(2); + expect(r.album().files.map((f) => f.name)).toEqual(['a.ogg', 'c.txt']); + // the next file falls back to the last event that exists, not to the failed one + expect(r.events[2].content?.['m.relates_to']).toEqual(threadRelation('$e1', '$e2')); + }); + + it('throws when the root cannot be sent, uploading nothing', async () => { + let uploads = 0; + const port: SharePort = { + send: async () => { + throw new Error('M_FORBIDDEN'); + }, + contentOf: async () => { + uploads += 1; + return {}; + }, + }; + await expect(sendShareSet(port, 't', clips)).rejects.toThrow('M_FORBIDDEN'); + expect(uploads).toBe(0); + }); +}); + +describe('the share flag', () => { + it('ships off', () => { + expect(config.fileZoneShare).toEqual({ enabled: false }); + }); +}); + +describe('after a send', () => { + it('keeps the failed one of two same-named files, not both', async () => { + const twins: ShareFile[] = [ + { name: 'a.ogg', mimeType: 'audio/ogg' }, + { name: 'a.ogg', mimeType: 'audio/ogg' }, + ]; + let n = 0; + const r = room(); + const port: SharePort = { + ...r.port, + contentOf: async (f) => { + n += 1; + if (n === 2) throw new Error('second upload failed'); + return r.port.contentOf(f); + }, + }; + const res = await sendShareSet(port, 't', twins); + expect(res.failedAt).toEqual([1]); + expect(remainingAfter(twins, res)).toEqual([twins[1]]); + }); + + it('keeps only the failed files picked, so a retry is one tap', async () => { + const r = room(['b.ogg']); + const res = await sendShareSet(r.port, 't', clips); + expect(remainingAfter(clips, res).map((f) => f.name)).toEqual(['b.ogg']); + expect(resultNote(res)).toBe('Shared 2. Not sent: b.ogg'); + }); + + it('keeps everything and says nothing was shared when every upload failed', async () => { + const r = room(clips.map((c) => c.name)); + const res = await sendShareSet(r.port, 't', clips); + expect(remainingAfter(clips, res)).toEqual(clips); + expect(resultNote(res)).toBe('Nothing was shared. Not sent: a.ogg, b.ogg, c.txt'); + }); + + it('clears the pick on full success', async () => { + const r = room(); + const res = await sendShareSet(r.port, 't', clips); + expect(remainingAfter(clips, res)).toEqual([]); + expect(resultNote(res)).toBe('Shared 3 files.'); + }); +}); + +describe('adding to an existing album', () => { + it('sends no root; each file threads under the album, the first after `lastId`', async () => { + const r = room(); + const sent: Record[] = []; + const port = { + ...r.port, + send: async (c: Record) => { + sent.push(c); + return `$n${sent.length}`; + }, + }; + const res = await sendShareSet( + port, + { albumId: '$root', lastId: '$last', lastTs: 1 }, + clips.slice(0, 2) + ); + expect(res.albumId).toBe('$root'); + expect(res.sent).toBe(2); + expect(sent.map((c) => c.msgtype)).toEqual(['m.audio', 'm.audio']); + expect(sent.map((c) => c['m.relates_to'])).toEqual([ + threadRelation('$root', '$last'), + threadRelation('$root', '$n1'), + ]); + }); +}); + +describe('refusals', () => { + const refuse = (errcode: string): SharePort => ({ + send: async () => '$e', + contentOf: async () => { + throw Object.assign(new Error('raw server text'), { errcode }); + }, + }); + + it('names the three upload refusals and nothing else', () => { + expect(refusalOf({ errcode: 'M_TOO_LARGE' })).toBe('too large for this server'); + expect(refusalOf({ errcode: 'M_FORBIDDEN' })).toBe('not allowed to upload here'); + expect(refusalOf({ errcode: 'M_LIMIT_EXCEEDED' })).toBe( + 'uploading too fast, try again shortly' + ); + expect(refusalOf({ errcode: 'M_UNKNOWN' })).toBeUndefined(); + expect(refusalOf({ errcode: 'constructor' })).toBeUndefined(); + expect(refusalOf(new Error('x'))).toBeUndefined(); + expect(refusalOf(null)).toBeUndefined(); + }); + + it('the note carries the reason beside each refused file', async () => { + const res = await sendShareSet(refuse('M_TOO_LARGE'), 't', clips.slice(0, 2)); + expect(resultNote(res)).toBe( + 'Nothing was shared. Not sent: a.ogg (too large for this server), b.ogg (too large for this server)' + ); + }); + + it('a failure the client saw, not the server, is named too', async () => { + const dropped: SharePort = { + send: async () => '$e', + contentOf: async () => { + throw Object.assign(new Error('x'), { + errcode: 'AbortError', + info: { aborted: true, progressed: true }, + }); + }, + }; + const res = await sendShareSet(dropped, 't', clips.slice(0, 1)); + expect(resultNote(res)).toBe( + 'Nothing was shared. Not sent: a.ogg (the connection dropped partway through)' + ); + }); + + it('an unnamed failure lists the bare name', async () => { + const res = await sendShareSet(refuse('M_UNKNOWN'), 't', clips.slice(0, 1)); + expect(resultNote(res)).toBe('Nothing was shared. Not sent: a.ogg'); + }); +}); + +describe('stopping a send', () => { + /** A port whose upload of `stopAt` aborts the signal as it runs, as the Stop button does mid-upload. */ + const stopping = (stopAt: string, abortAfterUpload = false) => { + const ac = new AbortController(); + const r = room(); + const port: SharePort = { + ...r.port, + signal: ac.signal, + contentOf: async (f) => { + if (f.name !== stopAt) return r.port.contentOf(f); + ac.abort(); + if (abortAfterUpload) return r.port.contentOf(f); + throw Object.assign(new Error('aborted'), { name: 'AbortError' }); + }, + }; + return { port, r }; + }; + + it('an upload aborted mid-file leaves that file and the rest unsent, named as stopped', async () => { + const { port, r } = stopping('b.ogg'); + const res = await sendShareSet(port, 't', clips); + expect(res.sent).toBe(1); + expect(res.failed).toEqual(['b.ogg', 'c.txt']); + expect(res.failedAt).toEqual([1, 2]); + expect(res.reasons).toEqual([CANCELLED, CANCELLED]); + expect(r.album().files.map((f) => f.name)).toEqual(['a.ogg']); + expect(remainingAfter(clips, res).map((f) => f.name)).toEqual(['b.ogg', 'c.txt']); + expect(resultNote(res)).toBe('Shared 1. Not sent: b.ogg (stopped), c.txt (stopped)'); + }); + + it('a file whose upload finished after the stop is not sent', async () => { + const { port, r } = stopping('b.ogg', true); + const res = await sendShareSet(port, 't', clips); + expect(res.sent).toBe(1); + expect(res.failedAt).toEqual([1, 2]); + expect(r.album().files.map((f) => f.name)).toEqual(['a.ogg']); + }); + + it('a signal already aborted starts nothing and sends everything back as unsent', async () => { + const r = room(); + const ac = new AbortController(); + ac.abort(); + let uploads = 0; + const res = await sendShareSet( + { + ...r.port, + signal: ac.signal, + contentOf: async (f) => { + uploads += 1; + return r.port.contentOf(f); + }, + }, + { albumId: '$a', lastId: '$l', lastTs: 1 }, + clips + ); + expect(uploads).toBe(0); + expect(res.sent).toBe(0); + expect(res.failedAt).toEqual([0, 1, 2]); + expect(r.events).toEqual([]); + }); + + it('an abort that is not a stop is an ordinary failure', async () => { + const r = room(['b.ogg']); + const res = await sendShareSet({ ...r.port, signal: new AbortController().signal }, 't', clips); + expect(res.failedAt).toEqual([1]); + expect(res.reasons).toEqual([undefined]); + }); +}); + +describe('freshest', () => { + const album = { albumId: '$alb', lastId: '$old', lastTs: 100 }; + it('moves lastId to a newer event of the same thread', () => { + expect( + freshest(album, [ + { id: '$mid', ts: 150, threadRoot: '$alb' }, + { id: '$new', ts: 200, threadRoot: '$alb' }, + ]) + ).toEqual({ albumId: '$alb', lastId: '$new', lastTs: 200 }); + }); + it('ignores older events and events of other threads or none', () => { + expect( + freshest(album, [ + { id: '$older', ts: 50, threadRoot: '$alb' }, + { id: '$other', ts: 900, threadRoot: '$else' }, + { id: '$loose', ts: 900 }, + ]) + ).toEqual(album); + }); +}); diff --git a/src/app/features/albums/shareSet.ts b/src/app/features/albums/shareSet.ts new file mode 100644 index 00000000..007d7e91 --- /dev/null +++ b/src/app/features/albums/shareSet.ts @@ -0,0 +1,138 @@ +// Share a set of files at once: one album root (a text message) and one thread reply per file. +// That is exactly the shape buildAlbums reads, so a set shared here and a set a Mind's mouth posts +// are the same thing to every viewer. Ports are injected so the order and the failure rules are +// testable without a homeserver. See docs/file-zone.md, "Share a set". + +import { uploadReason } from '../../utils/uploadReason'; + +export type ShareFile = { name: string; mimeType: string }; + +/** What sendShareSet needs from the outside world. */ +export type SharePort = { + /** Send an event and return its id. */ + send: (content: Record) => Promise; + /** Upload one file and build its message content (msgtype, url, info incl. sha256). */ + contentOf: (file: F) => Promise>; + /** Called after each file settles, for progress. */ + onFile?: (index: number, result: 'sent' | 'failed') => void; + /** Aborted to stop the send: the running upload is the port's to cancel, the rest are not started. */ + signal?: AbortSignal; +}; + +export type ShareResult = { + /** The album root's event id; present as soon as the root is sent. */ + albumId: string; + sent: number; + failed: string[]; + /** Positions in the files array of those that failed; names can repeat, positions cannot. */ + failedAt: number[]; + /** Why each failed file failed, parallel to `failed`, when the homeserver's refusal is one we name. */ + reasons?: (string | undefined)[]; +}; + +/** An album that already exists: new files join its thread after `lastId` (sent at `lastTs`), with no new root. */ +export type ExistingAlbum = { albumId: string; lastId: string; lastTs: number }; + +/** An event as the room's live timeline holds it: its id, time, and the thread root it belongs to. */ +export type ThreadEvent = { id: string; ts: number; threadRoot?: string }; + +/** + * `album` with `lastId` moved to the newest event the room's timeline holds in that thread, when it + * is newer than the one the album list knew. The list refreshes every 30 s; the timeline does not. + */ +export const freshest = (album: ExistingAlbum, events: ThreadEvent[]): ExistingAlbum => + events + .filter((e) => e.threadRoot === album.albumId) + .reduce((a, e) => (e.ts > a.lastTs ? { ...a, lastId: e.id, lastTs: e.ts } : a), album); + +export const CANCELLED = 'stopped'; + +/** The short reason for a failure we can name (the homeserver's refusal or what the client saw), else undefined. */ +export const refusalOf = (e: unknown): string | undefined => uploadReason(e)?.cause; + +/** The reply relation Matrix clients expect for a thread message: root, with the last event as fallback reply. */ +export const threadRelation = (rootId: string, lastId: string) => ({ + rel_type: 'm.thread', + event_id: rootId, + is_falling_back: true, + 'm.in_reply_to': { event_id: lastId }, +}); + +export const DEFAULT_TITLE = 'Shared files'; + +export const titleOrDefault = (title: string): string => title.trim() || DEFAULT_TITLE; + +/** + * Files go one at a time, in the order given, so thread order is pick order. A file that fails + * to upload is reported by name and the rest still go; the root is already out, so stopping would + * leave an empty album and the sender nothing to retry from. A root that fails to send throws: + * nothing exists yet. + */ +export const sendShareSet = async ( + port: SharePort, + into: string | ExistingAlbum, + files: F[] +): Promise => { + const albumId = + typeof into === 'string' + ? await port.send({ msgtype: 'm.text', body: titleOrDefault(into) }) + : into.albumId; + const result: ShareResult = { albumId, sent: 0, failed: [], failedAt: [], reasons: [] }; + let lastId = typeof into === 'string' ? albumId : into.lastId; + // A stopped send leaves its file, and every file after it, unsent and picked, so one tap resumes. + const stopFrom = (from: number) => { + for (let j = from; j < files.length; j += 1) { + result.failed.push(files[j].name); + result.reasons?.push(CANCELLED); + result.failedAt.push(j); + } + }; + for (let i = 0; i < files.length; i += 1) { + if (port.signal?.aborted) { + stopFrom(i); + break; + } + try { + // eslint-disable-next-line no-await-in-loop + const content = await port.contentOf(files[i]); + if (port.signal?.aborted) { + stopFrom(i); + break; + } + // eslint-disable-next-line no-await-in-loop + lastId = await port.send({ ...content, 'm.relates_to': threadRelation(albumId, lastId) }); + result.sent += 1; + port.onFile?.(i, 'sent'); + } catch (e) { + if (port.signal?.aborted) { + stopFrom(i); + break; + } + result.failed.push(files[i].name); + result.reasons?.push(refusalOf(e)); + result.failedAt.push(i); + port.onFile?.(i, 'failed'); + } + } + return result; +}; + +/** + * What stays picked after a send: only the files that did not go, so a retry is one tap. A retry + * of a new album makes a second album, and a share where nothing went + * leaves its root as a lone message the album list does not show (it lists threads with replies). + */ +export const remainingAfter = (files: T[], result: ShareResult): T[] => + files.filter((_, i) => result.failedAt.includes(i)); + +const failedList = (result: ShareResult): string => + result.failed + .map((name, i) => (result.reasons?.[i] ? `${name} (${result.reasons[i]})` : name)) + .join(', '); + +export const resultNote = (result: ShareResult): string => { + if (result.failed.length === 0) + return `Shared ${result.sent} ${result.sent === 1 ? 'file' : 'files'}.`; + if (result.sent === 0) return `Nothing was shared. Not sent: ${failedList(result)}`; + return `Shared ${result.sent}. Not sent: ${failedList(result)}`; +}; diff --git a/src/app/features/albums/useAlbums.ts b/src/app/features/albums/useAlbums.ts new file mode 100644 index 00000000..13c199ec --- /dev/null +++ b/src/app/features/albums/useAlbums.ts @@ -0,0 +1,85 @@ +import { useQuery } from '@tanstack/react-query'; +import { ClientPrefix, Method, Room } from 'matrix-js-sdk'; +import { StateEvent } from '../../../types/matrix/room'; +import { useStateEvent } from '../../hooks/useStateEvent'; +import { useMatrixClient } from '../../hooks/useMatrixClient'; +import { useClientConfig } from '../../hooks/useClientConfig'; +import { Album, ZoneEvent, buildAlbums } from './buildAlbums'; +import { isFileZone } from './isFileZone'; +import { mapLimit } from './mapLimit'; +import { Page, readPages } from './readPages'; + +const REPLY_FETCHES_IN_FLIGHT = 6; +const REFRESH_MS = 30_000; + +/** True when the room is the file zone: by its create type, or listed in the client config. */ +export const useIsFileZone = (room: Room): boolean => { + const config = useClientConfig(); + // Subscribes to alias changes (alt aliases live in the same event). + useStateEvent(room, StateEvent.RoomCanonicalAlias); + const createType = room.currentState.getStateEvents('m.room.create', '')?.getContent().type; + return isFileZone( + { + roomId: room.roomId, + aliases: [room.getCanonicalAlias(), ...room.getAltAliases()].filter((a): a is string => !!a), + createType, + }, + config + ); +}; + +export type AlbumsState = { + loading: boolean; + error: Error | null; + albums: Album[]; + /** A read hit the page cap (readPages), so older albums or files are not in the list. */ + truncated: boolean; +}; + +const PAGE_LIMIT = '100'; + +/** + * Reads every page of the zone's threads, then every page of each thread's replies, each capped at + * MAX_PAGES (readPages). Reads are made with the logged-in client, so the room must be + * unencrypted: encrypted events carry no msgtype and are skipped. + */ +export const useAlbums = (room: Room): AlbumsState => { + const mx = useMatrixClient(); + const { roomId } = room; + const query = useQuery({ + queryKey: ['albums', roomId], + queryFn: async (): Promise<{ albums: Album[]; truncated: boolean }> => { + const get = (path: string, params: Record) => + mx.http.authedRequest>(Method.Get, path, params, undefined, { + prefix: ClientPrefix.V1, + }); + const paged = (path: string, params: Record) => + readPages((from) => get(path, from ? { ...params, from } : params)); + const room_ = encodeURIComponent(roomId); + const roots = await paged(`/rooms/${room_}/threads`, { limit: PAGE_LIMIT }); + let { truncated } = roots; + const inputs = await mapLimit( + roots.items, + REPLY_FETCHES_IN_FLIGHT, + async (root: ZoneEvent) => { + const replies = await paged( + `/rooms/${room_}/relations/${encodeURIComponent(root.event_id ?? '')}/m.thread`, + { limit: PAGE_LIMIT, dir: 'f' } + ); + truncated = truncated || replies.truncated; + return { root, replies: replies.items }; + } + ); + return { albums: buildAlbums(inputs, mx.getDomain() ?? ''), truncated }; + }, + retry: 1, + refetchInterval: REFRESH_MS, + }); + return { + loading: query.isLoading, + // A failed refetch keeps the albums already loaded; the error shows only when there are none. + error: query.data ? null : (query.error as Error | null), + albums: query.data?.albums ?? [], + truncated: query.data?.truncated ?? false, + }; +}; diff --git a/src/app/features/albums/useFileReaders.ts b/src/app/features/albums/useFileReaders.ts new file mode 100644 index 00000000..5ade3827 --- /dev/null +++ b/src/app/features/albums/useFileReaders.ts @@ -0,0 +1,25 @@ +import { useMemo, useSyncExternalStore } from 'react'; +import { Room } from 'matrix-js-sdk'; +import { useMatrixClient } from '../../hooks/useMatrixClient'; +import { FileReader, readersOf } from './fileReceipt'; +import { receiptStoreOf } from './receiptStore'; + +/** + * Who has read a file, from the receipts in the room's loaded timeline: a plain room event or a thread reply, both + * count (docs/file-zone-mind-contract.md). `content` is the file event's content, which carries its `info.sha256`. + * The room's one shared subscription (receiptStore.ts) feeds every file row. + */ +export const useFileReaders = ( + room: Room, + fileId: string, + content: Record +): FileReader[] => { + const mx = useMatrixClient(); + const server = mx.getDomain() ?? ''; + const store = receiptStoreOf(room); + const receipts = useSyncExternalStore(store.subscribe, store.getSnapshot); + return useMemo( + () => readersOf(receipts, fileId, content, server), + [receipts, fileId, content, server] + ); +}; diff --git a/src/app/features/albums/versions.test.ts b/src/app/features/albums/versions.test.ts new file mode 100644 index 00000000..5179e945 --- /dev/null +++ b/src/app/features/albums/versions.test.ts @@ -0,0 +1,83 @@ +import { describe, expect, it } from 'vitest'; +import { PUBLISH_KEY, foldVersions, replacesOf } from './versions'; + +type F = { id: string; sender: string; content: Record; earlier: F[] }; +const f = (id: string, replaces?: string, sender = '@m:x'): F => ({ + id, + sender, + content: replaces ? { [PUBLISH_KEY]: { replaces } } : {}, + earlier: [], +}); +const shape = (files: F[]): unknown => files.map((x) => [x.id, x.earlier.map((e) => e.id)]); + +describe('replacesOf', () => { + it('reads the id the publisher key names', () => { + expect(replacesOf({ [PUBLISH_KEY]: { replaces: '$a' } })).toBe('$a'); + }); + it('anything else says nothing', () => { + expect(replacesOf({})).toBeUndefined(); + expect(replacesOf({ [PUBLISH_KEY]: {} })).toBeUndefined(); + expect(replacesOf({ [PUBLISH_KEY]: { replaces: 3 } })).toBeUndefined(); + expect(replacesOf({ [PUBLISH_KEY]: { replaces: '' } })).toBeUndefined(); + expect(replacesOf({ [PUBLISH_KEY]: 'x' })).toBeUndefined(); + }); +}); + +describe('foldVersions', () => { + it('files that replace nothing pass through in order, with nothing folded', () => { + expect(shape(foldVersions([f('$a'), f('$b')]))).toEqual([ + ['$a', []], + ['$b', []], + ]); + }); + + it('shows the latest of a chain with earlier versions nearest first', () => { + expect(shape(foldVersions([f('$a'), f('$b', '$a'), f('$c', '$b')]))).toEqual([ + ['$c', ['$b', '$a']], + ]); + }); + + it('keeps unrelated files beside a chain, in order', () => { + expect(shape(foldVersions([f('$a'), f('$x'), f('$b', '$a')]))).toEqual([ + ['$x', []], + ['$b', ['$a']], + ]); + }); + + it('a replacement whose target is not in the list stands alone', () => { + expect(shape(foldVersions([f('$b', '$gone')]))).toEqual([['$b', []]]); + }); + + it('a file two others replace sits under both', () => { + expect(shape(foldVersions([f('$a'), f('$b', '$a'), f('$c', '$a')]))).toEqual([ + ['$b', ['$a']], + ['$c', ['$a']], + ]); + }); + + it('files in a loop with no head outside it are all shown, none hidden', () => { + const out = foldVersions([f('$a', '$b'), f('$b', '$a'), f('$s', '$s')]); + expect(shape(out)).toEqual([ + ['$a', []], + ['$b', []], + ['$s', []], + ]); + }); + + it('a loop reached from a head is walked once and ends', () => { + const out = foldVersions([f('$a', '$b'), f('$b', '$a'), f('$h', '$a')]); + expect(shape(out)).toEqual([['$h', ['$a', '$b']]]); + }); + + it('a replacement by another sender folds nothing', () => { + const out = foldVersions([f('$victim', undefined, '@m:x'), f('$evil', '$victim', '@e:x')]); + expect(shape(out)).toEqual([ + ['$victim', []], + ['$evil', []], + ]); + }); + + it('an empty list is empty', () => { + expect(foldVersions([])).toEqual([]); + }); +}); diff --git a/src/app/features/albums/versions.ts b/src/app/features/albums/versions.ts new file mode 100644 index 00000000..e27ff6d0 --- /dev/null +++ b/src/app/features/albums/versions.ts @@ -0,0 +1,56 @@ +// Pure: a file event may name the event it supersedes in `org.gamecult.publish.replaces` (the +// publisher writes it on a later final version; docs/commons-files-desk.md, "replaces, not +// m.replace"). Both events stay ordinary files for every other client; this view shows the latest +// of a chain with the earlier ones folded under it. A chain is read from the events alone. + +/** Key the publisher writes its provenance under. */ +export const PUBLISH_KEY = 'org.gamecult.publish'; + +/** The event id a file says it replaces, if it says one. */ +export const replacesOf = (content: Record): string | undefined => { + const id = (content[PUBLISH_KEY] as { replaces?: unknown } | undefined)?.replaces; + return typeof id === 'string' && id ? id : undefined; +}; + +type Versioned = F & { earlier: F[] }; + +/** + * Files not replaced by another file in the list, oldest first as given, each carrying the files it + * supersedes (nearest first) in `earlier`. A replacement whose target is missing from the list (a + * redacted event, another thread) replaces nothing and stands as a head. A replacement by another sender is ignored. A file two others claim to + * replace sits under both. The walk refuses to revisit a file, so a malformed chain cannot loop (a real event id hashes its content and cannot cycle); files caught in a loop with no head outside it are all shown, none folded. + */ +export const foldVersions = < + F extends { id: string; sender: string; content: Record } +>( + files: Versioned[] +): Versioned[] => { + const byId = new Map(files.map((f) => [f.id, f])); + const target = (f: F): F | undefined => { + const id = replacesOf(f.content); + const t = id && id !== f.id ? byId.get(id) : undefined; + // Only the sender of a file can supersede it, so no one else in the thread can fold it away. + return t && t.sender === f.sender ? t : undefined; + }; + const replaced = new Set(); + files.forEach((f) => { + const t = target(f); + if (t) replaced.add(t.id); + }); + const chainOf = (head: Versioned): Versioned[] => { + const out: Versioned[] = []; + const seen = new Set([head.id]); + for (let t = target(head); t && !seen.has(t.id); t = target(t)) { + seen.add(t.id); + out.push({ ...t, earlier: [] }); + } + return out; + }; + const heads = files.filter((f) => !replaced.has(f.id)); + const covered = new Set(heads.flatMap((h) => [h.id, ...chainOf(h).map((e) => e.id)])); + // Files that replace one another with no head outside the loop are never reached from a head; show + // each of them as it is rather than let the loop hide itself. + return files + .filter((f) => !replaced.has(f.id) || !covered.has(f.id)) + .map((f) => ({ ...f, earlier: replaced.has(f.id) ? [] : chainOf(f) })); +}; diff --git a/src/app/features/albums/zoneView.test.ts b/src/app/features/albums/zoneView.test.ts new file mode 100644 index 00000000..65beb9cb --- /dev/null +++ b/src/app/features/albums/zoneView.test.ts @@ -0,0 +1,16 @@ +import { describe, expect, it } from 'vitest'; +import { zoneView } from './zoneView'; + +describe('zoneView', () => { + it('opens albums by default and the timeline for an event deep link', () => { + expect(zoneView(undefined, undefined)).toBe('albums'); + expect(zoneView(undefined, '$e')).toBe('timeline'); + }); + it('lets an event link win over an earlier choice of albums', () => { + expect(zoneView('albums', '$e')).toBe('timeline'); + }); + it('honours the choice when there is no event link', () => { + expect(zoneView('albums', undefined)).toBe('albums'); + expect(zoneView('timeline', undefined)).toBe('timeline'); + }); +}); diff --git a/src/app/features/albums/zoneView.ts b/src/app/features/albums/zoneView.ts new file mode 100644 index 00000000..1af7f705 --- /dev/null +++ b/src/app/features/albums/zoneView.ts @@ -0,0 +1,5 @@ +export type ZoneView = 'albums' | 'timeline'; + +/** The view a file-zone room shows. A link to an event always wins; else the user's choice; else albums. */ +export const zoneView = (choice: ZoneView | undefined, eventId: string | undefined): ZoneView => + eventId ? 'timeline' : choice ?? 'albums'; diff --git a/src/app/features/call-status/CallControl.tsx b/src/app/features/call-status/CallControl.tsx index 1808be92..d63f8709 100644 --- a/src/app/features/call-status/CallControl.tsx +++ b/src/app/features/call-status/CallControl.tsx @@ -5,6 +5,7 @@ import { StatusDivider } from './components'; import { CallEmbed, useCallControlState } from '../../plugins/call'; import { AsyncStatus, useAsyncCallback } from '../../hooks/useAsyncCallback'; import { callEmbedAtom } from '../../state/callEmbed'; +import { PhoneHitSpread26 } from '../../styles/PhoneHit.css'; type MicrophoneButtonProps = { enabled: boolean; @@ -14,7 +15,7 @@ type MicrophoneButtonProps = { function MicrophoneButton({ enabled, onToggle, disabled }: MicrophoneButtonProps) { const [micState, toggleMic] = useAsyncCallback(onToggle); const loading = micState.status === AsyncStatus.Loading; - + return ( {(anchorRef) => ( {(anchorRef) => ( {(anchorRef) => ( {(anchorRef) => ( callEmbed.control.toggleMicrophone(), [callEmbed]); + const handleMicrophoneToggle = useCallback( + () => callEmbed.control.toggleMicrophone(), + [callEmbed] + ); const handleVideoToggle = useCallback(() => callEmbed.control.toggleVideo(), [callEmbed]); const [hangupState, hangup] = useAsyncCallback( @@ -195,11 +203,7 @@ export function CallControl({ disabled={!callJoined} /> {!compact && } - + {!compact && ( callEmbed.control.toggleMicrophone(), [callEmbed]); + const handleMicrophoneToggle = useCallback( + () => callEmbed.control.toggleMicrophone(), + [callEmbed] + ); const handleVideoToggle = useCallback(() => callEmbed.control.toggleVideo(), [callEmbed]); const [hangupState, hangup] = useAsyncCallback( @@ -97,10 +101,7 @@ export function CallControls({ callEmbed }: CallControlsProps) { > - + callEmbed.control.toggleSound()} /> {!compact && } @@ -169,6 +170,7 @@ export function CallControls({ callEmbed }: CallControlsProps) { } > {(anchorRef) => ( {(anchorRef) => ( {(anchorRef) => ( {(anchorRef) => ( {(anchorRef) => ( toggleMicrophone(), [toggleMicrophone]); const handleVideoToggle = useCallback(async () => toggleVideo(), [toggleVideo]); diff --git a/src/app/features/common-settings/developer-tools/DevelopTools.tsx b/src/app/features/common-settings/developer-tools/DevelopTools.tsx index 29b6aa51..61e05a62 100644 --- a/src/app/features/common-settings/developer-tools/DevelopTools.tsx +++ b/src/app/features/common-settings/developer-tools/DevelopTools.tsx @@ -30,6 +30,7 @@ import { AccountDataSubmitCallback, } from '../../../components/AccountDataEditor'; import { useMatrixClient } from '../../../hooks/useMatrixClient'; +import { PhoneHit } from '../../../styles/PhoneHit.css'; type DeveloperToolsProps = { requestClose: () => void; @@ -92,7 +93,7 @@ export function DeveloperTools({ requestClose }: DeveloperToolsProps) { - + diff --git a/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx b/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx index f25ba7c3..a6e60a7b 100644 --- a/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx +++ b/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx @@ -22,6 +22,7 @@ import { useTextAreaCodeEditor } from '../../../hooks/useTextAreaCodeEditor'; import { AsyncStatus, useAsyncCallback } from '../../../hooks/useAsyncCallback'; import { syntaxErrorPosition } from '../../../utils/dom'; import { Cursor } from '../../../plugins/text-area'; +import { PhoneHit } from '../../../styles/PhoneHit.css'; const EDITOR_INTENT_SPACE_COUNT = 2; @@ -118,7 +119,7 @@ export function SendRoomEvent({ type, stateKey, requestClose }: SendRoomEventPro - + diff --git a/src/app/features/common-settings/developer-tools/StateEventEditor.tsx b/src/app/features/common-settings/developer-tools/StateEventEditor.tsx index 0ea96901..0f9f4034 100644 --- a/src/app/features/common-settings/developer-tools/StateEventEditor.tsx +++ b/src/app/features/common-settings/developer-tools/StateEventEditor.tsx @@ -31,6 +31,7 @@ import { usePowerLevels } from '../../../hooks/usePowerLevels'; import { useTextAreaCodeEditor } from '../../../hooks/useTextAreaCodeEditor'; import { useRoomCreators } from '../../../hooks/useRoomCreators'; import { useRoomPermissions } from '../../../hooks/useRoomPermissions'; +import { PhoneHit } from '../../../styles/PhoneHit.css'; const EDITOR_INTENT_SPACE_COUNT = 2; @@ -275,7 +276,7 @@ export function StateEventEditor({ type, stateKey, requestClose }: StateEventEdi - + diff --git a/src/app/features/common-settings/emojis-stickers/EmojisStickers.tsx b/src/app/features/common-settings/emojis-stickers/EmojisStickers.tsx index ad8ffae6..f7e901d5 100644 --- a/src/app/features/common-settings/emojis-stickers/EmojisStickers.tsx +++ b/src/app/features/common-settings/emojis-stickers/EmojisStickers.tsx @@ -4,6 +4,7 @@ import { Page, PageContent, PageHeader } from '../../../components/page'; import { ImagePack } from '../../../plugins/custom-emoji'; import { ImagePackView } from '../../../components/image-pack-view'; import { RoomPacks } from './RoomPacks'; +import { PhoneHit } from '../../../styles/PhoneHit.css'; type EmojisStickersProps = { requestClose: () => void; @@ -29,7 +30,7 @@ export function EmojisStickers({ requestClose }: EmojisStickersProps) { - + diff --git a/src/app/features/common-settings/emojis-stickers/RoomPacks.tsx b/src/app/features/common-settings/emojis-stickers/RoomPacks.tsx index fdbe546e..7be8de35 100644 --- a/src/app/features/common-settings/emojis-stickers/RoomPacks.tsx +++ b/src/app/features/common-settings/emojis-stickers/RoomPacks.tsx @@ -40,6 +40,7 @@ import { AsyncStatus, useAsyncCallback } from '../../../hooks/useAsyncCallback'; import { useAlive } from '../../../hooks/useAlive'; import { useRoomCreators } from '../../../hooks/useRoomCreators'; import { useRoomPermissions } from '../../../hooks/useRoomPermissions'; +import { PhoneHit } from '../../../styles/PhoneHit.css'; type CreatePackTileProps = { packs: ImagePack[]; @@ -215,6 +216,7 @@ export function RoomPacks({ onViewPack }: RoomPacksProps) { {canEdit && (removed ? ( ) : ( Enable Encryption - setPrompt(false)} radii="300"> + setPrompt(false)} + radii="300" + > diff --git a/src/app/features/common-settings/general/RoomUpgrade.tsx b/src/app/features/common-settings/general/RoomUpgrade.tsx index 45a480aa..2971d565 100644 --- a/src/app/features/common-settings/general/RoomUpgrade.tsx +++ b/src/app/features/common-settings/general/RoomUpgrade.tsx @@ -39,6 +39,7 @@ import { useAlive } from '../../../hooks/useAlive'; import { creatorsSupported } from '../../../utils/matrix'; import { useRoomCreators } from '../../../hooks/useRoomCreators'; import { BreakWord } from '../../../styles/Text.css'; +import { PhoneHit } from '../../../styles/PhoneHit.css'; function RoomUpgradeDialog({ requestClose }: { requestClose: () => void }) { const mx = useMatrixClient(); @@ -105,7 +106,7 @@ function RoomUpgradeDialog({ requestClose }: { requestClose: () => void }) { {room.isSpaceRoom() ? 'Space Upgrade' : 'Room Upgrade'} - + diff --git a/src/app/features/common-settings/members/Members.tsx b/src/app/features/common-settings/members/Members.tsx index 15cd1d08..a1dddb54 100644 --- a/src/app/features/common-settings/members/Members.tsx +++ b/src/app/features/common-settings/members/Members.tsx @@ -56,6 +56,7 @@ import { useSpaceOptionally } from '../../../hooks/useSpace'; import { useFlattenPowerTagMembers, useGetMemberPowerTag } from '../../../hooks/useMemberPowerTag'; import { useRoomCreators } from '../../../hooks/useRoomCreators'; import { getMouseEventCords } from '../../../utils/dom'; +import { PhoneHit } from '../../../styles/PhoneHit.css'; const SEARCH_OPTIONS: UseAsyncSearchOptions = { limit: 1000, @@ -161,7 +162,7 @@ export function Members({ requestClose }: MembersProps) { - + @@ -277,6 +278,7 @@ export function Members({ requestClose }: MembersProps) { anchorRef={scrollTopAnchorRef} > virtualizer.scrollToOffset(0)} variant="Surface" radii="Pill" diff --git a/src/app/features/common-settings/permissions/PowersEditor.tsx b/src/app/features/common-settings/permissions/PowersEditor.tsx index 97305946..0684a48a 100644 --- a/src/app/features/common-settings/permissions/PowersEditor.tsx +++ b/src/app/features/common-settings/permissions/PowersEditor.tsx @@ -49,6 +49,7 @@ import { useAlive } from '../../../hooks/useAlive'; import { BetaNoticeBadge } from '../../../components/BetaNoticeBadge'; import { getPowerTagIconSrc } from '../../../hooks/useMemberPowerTag'; import { creatorsSupported } from '../../../utils/matrix'; +import { PhoneHit } from '../../../styles/PhoneHit.css'; type EditPowerProps = { maxPower: number; @@ -369,7 +370,7 @@ export function PowersEditor({ powerLevels, requestClose }: PowersEditorProps) { - + diff --git a/src/app/features/create-room/CreateRoomModal.tsx b/src/app/features/create-room/CreateRoomModal.tsx index d5d8c92d..9332f35c 100644 --- a/src/app/features/create-room/CreateRoomModal.tsx +++ b/src/app/features/create-room/CreateRoomModal.tsx @@ -24,6 +24,7 @@ import { import { CreateRoomModalState } from '../../state/createRoomModal'; import { stopPropagation } from '../../utils/keyboard'; import { CreateRoomType } from '../../components/create-room/types'; +import { PhoneHit } from '../../styles/PhoneHit.css'; type CreateRoomModalProps = { state: CreateRoomModalState; @@ -63,7 +64,7 @@ function CreateRoomModal({ state }: CreateRoomModalProps) { - + diff --git a/src/app/features/create-space/CreateSpaceModal.tsx b/src/app/features/create-space/CreateSpaceModal.tsx index c1bc6898..faa53b25 100644 --- a/src/app/features/create-space/CreateSpaceModal.tsx +++ b/src/app/features/create-space/CreateSpaceModal.tsx @@ -23,6 +23,7 @@ import { } from '../../state/hooks/createSpaceModal'; import { CreateSpaceModalState } from '../../state/createSpaceModal'; import { stopPropagation } from '../../utils/keyboard'; +import { PhoneHit } from '../../styles/PhoneHit.css'; type CreateSpaceModalProps = { state: CreateSpaceModalState; @@ -61,7 +62,7 @@ function CreateSpaceModal({ state }: CreateSpaceModalProps) { New Space - + diff --git a/src/app/features/desk/Desk.tsx b/src/app/features/desk/Desk.tsx new file mode 100644 index 00000000..d6795ac4 --- /dev/null +++ b/src/app/features/desk/Desk.tsx @@ -0,0 +1,54 @@ +import React, { useMemo } from 'react'; +import { useNavigate, useParams } from 'react-router-dom'; +import { Box, Icon, IconButton, Icons, Scroll, Text } from 'folds'; +import { PhoneHit } from '../../styles/PhoneHit.css'; +import { Page, PageContent, PageContentCenter, PageHeader } from '../../components/page'; +import { ScreenSize, useScreenSizeContext } from '../../hooks/useScreenSize'; +import { getHomePath } from '../../pages/pathUtils'; +import { DeskView } from './DeskView'; +import { useUnverified } from './useUnverified'; +import { deskFor } from './source'; + +const labelOf = (mind: string) => mind.charAt(0).toUpperCase() + mind.slice(1); + +/** The route's page: one Mind's desk under the navigator. */ +export function Desk() { + const { mind = '' } = useParams(); + const navigate = useNavigate(); + const phone = useScreenSizeContext() === ScreenSize.Mobile; + const label = labelOf(mind); + const list = useMemo(() => deskFor(mind), [mind]); + // Until the recompute finishes nothing is flagged; a card that fails is withdrawn when it lands. + const unverified = useUnverified(list); + + return ( + + + + + {phone && ( + navigate(getHomePath())} + > + + + )} + + {`${label}'s desk`} + + + + + + + + + + + + + + ); +} diff --git a/src/app/features/desk/DeskEntry.tsx b/src/app/features/desk/DeskEntry.tsx new file mode 100644 index 00000000..511b0783 --- /dev/null +++ b/src/app/features/desk/DeskEntry.tsx @@ -0,0 +1,46 @@ +import React, { useMemo } from 'react'; +import { Box, Icon, Icons, Text } from 'folds'; +import { NavGutter, NavItem, NavItemContent, NavLink } from '../../components/nav'; +import { NAV_ROOM_ICON_REST_OPACITY, NavLabel } from '../../components/nav/styles.css'; +import { getDeskPath } from '../../pages/pathUtils'; +import { buildDesk } from './buildDesk'; +import { ForkList } from './forkContract'; +import { deskFor } from './source'; +import { useUnverified } from './useUnverified'; + +export function DeskLink({ mind, open }: { mind: string; open: number }) { + return ( + + + + + + + + + {open > 0 ? `Desk · ${open} open` : 'Desk'} + + + + + + ); +} + +/** The navigator's count: the desk page's own, and none until the hash check has landed. */ +export const openCount = ( + list: ForkList | undefined, + unverified: ReadonlySet | undefined +): number => (unverified ? buildDesk(list, unverified).counts.open : 0); + +/** A Mind's desk, pinned at the top of its navigator group: always there, with the open count when there is one. */ +export function DeskEntry({ mind }: { mind: string }) { + const list = useMemo(() => deskFor(mind), [mind]); + const unverified = useUnverified(list); + // The same count the desk page shows; until the hash check lands there is no count to show. + return ; +} diff --git a/src/app/features/desk/DeskView.css.ts b/src/app/features/desk/DeskView.css.ts new file mode 100644 index 00000000..042f0644 --- /dev/null +++ b/src/app/features/desk/DeskView.css.ts @@ -0,0 +1,122 @@ +import { globalStyle, style } from '@vanilla-extract/css'; +import { color, config, toRem } from 'folds'; +import { MOBILE_BREAKPOINT } from '../../hooks/useScreenSize'; + +const PHONE = `screen and (max-width: ${MOBILE_BREAKPOINT}px)`; + +/** Rows and booth side by side on wide screens. */ +export const Layout = style({ + display: 'flex', + gap: config.space.S500, + alignItems: 'flex-start', + '@media': { [PHONE]: { display: 'block', paddingBottom: toRem(120) } }, +}); + +export const Rows = style({ flex: 1, minWidth: 0, margin: 0, padding: 0, listStyle: 'none' }); + +/** A hairline splits rows; it is the only chrome. */ +export const Row = style({ + padding: `${config.space.S300} 0`, + borderTop: `1px solid ${color.Background.ContainerLine}`, +}); + +export const Title = style({ + margin: 0, + font: 'inherit', + fontWeight: 600, +}); + +/** The fold button reads as the title itself, not as a control. */ +export const Fold = style({ + all: 'unset', + cursor: 'pointer', + width: '100%', + minHeight: 44, + boxSizing: 'border-box', + display: 'flex', + alignItems: 'center', + justifyContent: 'space-between', + gap: config.space.S200, + // A folded row says it can be opened: a chevron at the end, turned down while the row is open. + selectors: { + '&::after': { + content: '"›"', + flexShrink: 0, + fontSize: '1.5em', + lineHeight: 1, + transition: 'transform 120ms', + }, + '&[aria-expanded=true]::after': { transform: 'rotate(90deg)' }, + }, +}); + +// Quiet lines (age, who it waits on, helper text) were measured at 4.5 over the day sky and 3.9-4.0 at dusk and night +// with the theme's 0.75 (taps2/desk-REPORT.md); 0.9 clears 4.5 in all three. +export const Quiet = style({ opacity: 0.9, margin: `${config.space.S100} 0` }); +export const Body = style({ whiteSpace: 'pre-wrap', margin: `${config.space.S200} 0` }); +export const Options = style({ margin: 0, padding: 0, listStyle: 'none' }); +export const Option = style({ padding: `${config.space.S100} 0` }); + +export const Note = style({ + display: 'block', + width: '100%', + boxSizing: 'border-box', + minHeight: 44, + margin: `${config.space.S200} 0`, + font: 'inherit', + color: 'inherit', + background: 'none', + // The note is disabled (slice 1). Its border is a UI boundary (3:1 wanted; the faint line under the 0.38 disabled + // opacity measured 2.0), so it is drawn dashed in the full ink and not faded. + border: '1px dashed currentColor', +}); + +/** Sticky beside the rows on wide screens; a small fixed corner image on phones. */ +export const Booth = style({ + position: 'sticky', + top: config.space.S400, + width: toRem(168), + flexShrink: 0, + '@media': { + [PHONE]: { + position: 'fixed', + top: 'auto', + right: config.space.S200, + bottom: config.space.S200, + width: toRem(88), + }, + }, +}); + +// PoseAvatar's button is laid out for message gutters; the booth takes it back into flow. +globalStyle(`${Booth} > [data-pose]`, { + position: 'static', + float: 'none', + display: 'block', + width: '100%', + height: 'auto', + margin: 0, + maskImage: 'none', + WebkitMaskImage: 'none', + cursor: 'default', +}); + +export const BoothLine = style({ + '@media': { + // Still read out by the live region; only the picture shows in the corner. + [PHONE]: { + position: 'absolute', + width: 1, + height: 1, + overflow: 'hidden', + clip: 'rect(0 0 0 0)', + whiteSpace: 'nowrap', + }, + }, +}); + +/** The recorded rulings sit on the dark ridge in every sky; they carry their own ground (scrimStyle). */ +export const Recorded = style({ + marginTop: config.space.S400, + padding: `${config.space.S200} ${config.space.S300}`, +}); diff --git a/src/app/features/desk/DeskView.test.tsx b/src/app/features/desk/DeskView.test.tsx new file mode 100644 index 00000000..9fde039b --- /dev/null +++ b/src/app/features/desk/DeskView.test.tsx @@ -0,0 +1,318 @@ +import React from 'react'; +import { renderToStaticMarkup } from 'react-dom/server'; +import { MemoryRouter } from 'react-router-dom'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { ScreenSize, ScreenSizeProvider } from '../../hooks/useScreenSize'; +import { SkyInkContextProvider } from '../../hooks/useTheme'; +import { SCRIM_GROUND, SCRIM_INK } from '../scene/skyInk'; +import { DeskEntry, DeskLink, openCount } from './DeskEntry'; +import { DeskView, SIGN_IN_NOTE, rowOpen } from './DeskView'; +import { ForkList } from './forkContract'; +import { STATES, entry as forkEntry, list as forkList } from './fixtures'; +import { setDeskSource } from './source'; + +// useTheme reads the stored settings when it loads. +vi.hoisted(() => vi.stubGlobal('localStorage', { getItem: () => null, setItem: () => undefined })); + +const view = ( + state: keyof typeof STATES | 'unpublished', + size: ScreenSize, + mind = 'void', + unverified = new Set() +) => + renderToStaticMarkup( + + + + ); + +describe('DeskView', () => { + it('folds a row behind its title on a phone, with the fold button saying so', () => { + const html = view('noAnswers', ScreenSize.Mobile); + expect(html).toContain('aria-expanded="false"'); + expect(html).toContain('Question plain'); + expect(html).not.toContain('Context for plain'); + expect(html).not.toContain('First way'); + }); + it('shows the row open, with no fold button, on a wide screen', () => { + const html = view('noAnswers', ScreenSize.Desktop); + expect(html).not.toContain('aria-expanded'); + expect(html).toContain('Context for plain'); + expect(html).toContain('First way'); + }); + it('states the recommendation in words, on that option only', () => { + const html = view('noAnswers', ScreenSize.Desktop); + expect(html.match(/\(recommended\)/g)).toHaveLength(1); + expect(html).toContain('B Second way (recommended)'); + }); + it('keeps the note disabled and says why in a sentence the field points at', () => { + const html = view('noAnswers', ScreenSize.Desktop); + expect(html).toMatch(/]* disabled=""/); + expect(html).toContain(SIGN_IN_NOTE); + expect(SIGN_IN_NOTE).toMatch(/sign-in/); + expect(html).toMatch(/aria-describedby="note-[^"]+-why"/); + }); + it('shows the depends line as the text it is', () => { + expect(view('blocked', ScreenSize.Desktop)).toContain( + 'Waits on: "Needs the first one settled"' + ); + }); + it('says No answers yet on a row without answers', () => { + expect(view('noAnswers', ScreenSize.Desktop)).toContain('No answers yet.'); + }); + it('lists settled questions as recorded rulings with the ruling id', () => { + const html = view('settled', ScreenSize.Desktop); + expect(html).toContain('Recorded as rulings'); + expect(html).toContain('Question done (ruling:done-1)'); + expect(html).not.toContain('Question shut'); + }); + it('gives the recorded rulings their own ground and ink while a scene runs, none without one', () => { + const withScene = renderToStaticMarkup( + + + + + + ); + // renderToStaticMarkup writes the inline style as the browser would read it back + expect(withScene).toContain(SCRIM_GROUND.replace(/, /g, ', ')); + expect(withScene).toContain(`color:${SCRIM_INK}`); + expect(view('settled', ScreenSize.Desktop)).not.toContain('background-color'); + }); + it('shows each outcome quietly, marks the counted answer, and renders a note only when sent', () => { + const html = view('answered', ScreenSize.Desktop); + expect(html).toContain( + 'Answer First way "Because it is first." (2026-11-09) (counted)' + ); + expect(html).toContain('Revision of n1 Third way (2026-11-09)'); + expect(html).toContain('Retraction of n2 (2026-11-09)'); + expect(html).toContain('Refused (not_a_decider) Second way "Let me in."'); + expect(html).toContain('Answer "Either, if measured first."'); + expect(html.match(/\(counted\)/g)).toHaveLength(1); + expect(html).not.toContain('"null"'); + }); + it('says nothing is waiting when empty, and that nothing is published when it never arrived', () => { + expect(view('empty', ScreenSize.Desktop)).toContain('Nothing is waiting on you from Void.'); + expect(view('unpublished', ScreenSize.Desktop)).toContain( + 'Void's questions have not been published yet.' + ); + }); + it('seats the Mind in the booth with the pose for the desk mood', () => { + const html = view('noAnswers', ScreenSize.Desktop); + expect(html).toContain('data-pose="thinking"'); + expect(html).toContain('Just one fork on the desk.'); + }); + it('makes the booth portrait a plain image: no button, no tab stop', () => { + const html = view('noAnswers', ScreenSize.Desktop); + const booth = html.slice(html.indexOf('data-pose')); + expect(booth).toContain(']*data-pose/); + expect(html).not.toMatch(/<[a-z]+[^>]*data-pose[^>]*tabindex/); + expect(html).toMatch(/]*data-pose/); + }); + it('withdraws a card whose hash does not match and does not count it open', () => { + const html = view('noAnswers', ScreenSize.Desktop, 'void', new Set(['c:question:plain'])); + expect(html).toContain('does not match the hash it was published with'); + expect(html).not.toContain('First way'); + expect(html).toContain('Nothing is waiting on you from Void.'); + expect(html).not.toContain('1 open.'); + }); + it('never claims an empty desk while the list says forks are open, whatever rows it could show', () => { + setDeskSource(() => undefined); + const html = renderToStaticMarkup( + + + + ); + expect(html).toContain('3 open.'); + expect(html).not.toContain('Nothing is waiting'); + }); + it('says every row is read-only for a signed-out viewer, in every state the fixtures hold', () => { + (['noAnswers', 'blocked', 'answered', 'settled'] as const).forEach((state) => { + const html = view(state, ScreenSize.Desktop); + const rows = html.match(/