# Design This file fixes the parts that are easy to get wrong. The language and tools are up to you, as long as the numbers here hold. ## Fixture drawing `fixtures/fish-amber.json` is a six-stroke fish, all points inside the pad, colour `ink`. Tests must use the file. ## Gait Tank is 1200 by 480 px under a 1600 by 1000 frame. A fish's origin at t seconds, seed 0, start (80, 240): ``` x = (80 + 40 * t) modulo 1200 y = 240 + 16 * sin(2π * t / 2) ``` At t = 0: (80, 240). At t = 1: (120, 240). At t = 0.5: (100, 256). ## Screenshots These pictures are headless-Chrome captures of the working reference in `reference/preview.html`, at the default inputs. They are not drawings of a product that has not been built. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel. | File | What it shows | | --- | --- | | `shots/tank.png` | Four fixture fish swimming in a 24-cap tank. | ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `title` | Title | Draw a swimmer | Shown above the pad. | | `tank_cap` | Fish in the tank | 24 | From 4 to 64. The oldest is retired when the cap is passed. | | `bubbles` | Bubbles | on | A few rising circles in the tank. | | `names` | Ask for a name | on | A short name is stored with the drawing. | | `paper` | Paper | plain | The drawing pad's background. | ## Acceptance at the defaults The numbers, names and fixture paths already in this file are the authority. Where a later table or a shipped fixture file disagrees with prose, the table or the fixture wins. | Fixture | Role | | --- | --- | | `fixtures/fish-amber.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | | `spekkr.inputs.json` | A shipped fixture. The build may move it, but then `design.md` must name the new path. | Golden frames are compared at 1400 by 1000 CSS pixels unless a requirement names another size. Tolerance, unless a tighter figure is given above: 8 levels, 98% of pixels, with motion, cursors and clocks frozen as this file says. A build's goldens are of that build; they do not have to match a shipped reference preview pixel-for-pixel if the tool or the type is different, but they do have to match this file's layout, counts and copy. ## How to verify 1. Run the checks at the default inputs, without a network. 2. Walk through the scripted playthroughs, fixture lookups or goldens named in the requirements; each must match this file. 3. Repeat once at the person's inputs when they differ from the defaults. 4. A fixture drawing is accepted and appears in the tank API. Multi-client and cap tests use an in-memory fake store, not a public server. The fish swims on a documented gait, and a mid-swim frame is checked. No network is required in the checks.