# Fluid paint ## What this builds A painting canvas where paint is viscous. A stroke sits, then smudges when you drag it, more like oil than like a thin ink fluid. Colour mixing is tested: two fixture colours, smudged, produce a documented third. A scripted stroke yields a golden frame. This is a different toy from a full-screen ink sandbox, and the two should not share a name or a look. Read `spekkr.inputs.json` first. `title` is in the margin. `thickness` is viscosity. `paper` is the ground. `wet` and `mixing` change drying and mixing. ## Out of scope - A print-ready colour-managed art tool. - Network or a community canvas in the checks. - A real-world pigment model beyond the mix table in design.md. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. A stroke and a smudge - `fixtures/paint-stroke.json` is a list of pointer samples. At thickness 0.7, wet on, the canvas at tick 40 and at tick 160 (after a smudge listed in the file) matches dye checksums in the sibling file. - If `wet` is off, a stroke older than 2 seconds does not move under a later smudge; the dry fixture checks this. Accept when: the wet checksums match, and the dry fixture's second checksum equals its first (no smudge). ### R2. Mixing - When `mixing` is on, a dab of colour A and a dab of colour B, smudged as in `fixtures/paint-mix.json`, produce at a listed pixel a colour within 8 levels of the documented mix. - When `mixing` is off, that pixel stays within 8 levels of A or of B, not the mix. - A and B and the mix are listed as `#rrggbb` in the file. Accept when: the mix pixel matches in both option states. ### R3. Frames and files - Goldens: the first stroke, a smudge, a mixed dab, and a dried stroke that refused to smudge. - One command runs the checksum, dry, and mix tests, and writes the frames. No network. A CPU reference is preferred in CI. Accept when: the command passes at thickness 0.3 and 0.7, and the frames match the goldens. ### R4. Inputs - The build reads `spekkr.inputs.json`. Settings label the UI, options turn features on or off, and a swap must be one of its choices. - A value outside a stated range, or a swap that is not one of its choices, is refused before the app starts its checks, with a message that names the key. Accept when: the default inputs render, an illegal swap is refused by name, and changing a visible setting (for example the title) shows up in a later check. ## Verification A scripted stroke yields checksums and a golden frame. A wet smudge moves paint; a dried stroke does not. Colour mixing is tested at a documented pixel against a mix table, and is skipped when the option is off. A CPU reference is preferred in CI. No network. ## Definition of done - Every acceptance check above runs from one command, and all pass at the person's inputs. - A README says how to paint, how to run the checks, and how this differs from a thin-ink fluid demo.