# 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. ## Angles (calm pace, period 2.4 s) Angle 0 is the target, at the right of the centre. The rider starts at π. | t (s) | Angle (radians) | | --- | --- | | 0 | 3.14159 | | 0.6 | 4.71239 | | 1.2 | 6.28318, which is 0, the target | | 1.8 | 1.57080 | ## Fake-clock cases (`window` 80 ms, calm) | Case | Release at | Result | Score after | | --- | --- | --- | --- | | good | t = 1.200 | good | 1 | | good-edge | t = 1.280 | good | 1 | | late | t = 1.281 | miss | 0 | | early | t = 1.119 | miss | 0 | | held too long | no release by t = 2.4 | miss | 0 | A second good release, after a first at 1.200, is due at 1.200 + 2.4 * 0.97 = 3.528 s. ## Screenshot tolerance 8 levels, 98% of pixels. ## Inputs | Key | Label | Default | Notes | | --- | --- | --- | --- | | `title` | Title | Stay on the ring | Shown faintly under the ring. | | `window` | Timing window, ms | 80 | How close to the target the release must be, from 40 to 160. | | `pulse` | Pulse the ring | on | The ring's stroke thickens slightly with the beat. | | `sound` | Play a tick | on | A tick on a good release. Tests may mock audio. | | `pace` | Pace | calm | Seconds per revolution at the start: 2.4, 1.6 or 1.0. | ## 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 | | --- | --- | | `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. ## 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/ring.png` | The needle inside the 80 ms window, streak 7. | ## 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. Timing-window tests use a fake clock, never the wall clock. They cover a good release, both edges of the window, early and late misses, and a hold that lasts a full period. The score after each case matches the table. Four golden screenshots are checked, including one at rest. Audio is mocked.