# Pointer pointer ## What this builds A full-page toy. Wherever the cursor is, the page shows an original drawing in which a hand or a figure points at that place. The drawings are a fixture set: each image ships with the pixel coordinate of its pointer. The page picks the image whose pointer, after the image is placed, lands closest to the cursor, and must land within `tolerance` pixels. The set is original. There is no live camera, no photograph claim, and no scraped commercial gallery. Read `spekkr.inputs.json` first. `title` is in a corner. `tolerance` is the accept distance. `set` chooses the drawing folder. `credits` shows a caption. `crosshair` is for tests. ## Out of scope - A live webcam, or a scraped set of other people's photos or drawings without licences. - Network, a search engine, or a commercial stock API in the checks. - A face-recognition claim. ## Requirements Each requirement has an id. Checks name the id they cover. ### R1. The set - Each image has a file, a pointer (x, y) in image pixels, and a credit string. - `tiny` has at least 9 images, `studio` at least 36, covering a grid of pointer positions. - A licence file lists every image. A test fails if a file is missing or a pointer coordinate is outside the image. Accept when: both sets validate, and every pointer lies inside its image. ### R2. Picking - The chosen image is drawn so its pointer sits as close as possible to the cursor; the image may be translated but not scaled in this version (it is cropped if needed). - For the sampled cursors in `fixtures/pointer-samples.json`, the chosen id is the one in the file, and the pointer lands within `tolerance` pixels of the cursor. - If no image can land within the tolerance, the nearest is used and a `near` flag is set; for the shipped sets and a 24 px tolerance, this must not happen on the sample grid. Accept when: every sample matches the chosen id and the pixel tolerance, and `near` is false. ### R3. Frames and files - Goldens: cursor at the centre, cursor at a corner, the centre with credit on, and a contact sheet of the tiny set. - One command validates the sets, runs the samples, and writes the frames. No network. Accept when: the command passes for both sets, 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 fixture image set is used, never a live camera or a scraped gallery. For sampled cursor positions, the chosen figure's pointer lands within a documented pixel tolerance, and the chosen id matches a file. Credits and licences are shipped. 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 the set is licensed, how to add a drawing, and how to run the checks.