This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Schnippsi Painter — Streaming Quickstart
## 1) Datei
Öffne `schnippsi_painter_stream.html` im Browser. Zeichne frei oder mit dem Bezier‑Tool.
- `Verbinden` stellt eine WebSocket-Verbindung zu **ws://localhost:9980** her.
- Alle Events werden als JSON gesendet:
- `session` — Sessionstart
- `strokeStart` — neues Stroke (tool, colors, width)
- `point` — Punkte beim Freihandzeichnen (x,y,t,pressure,tilt)
- `anchor` / `anchors` — Bezier-Anker & Griffe (inkl. h1/h2)
- `strokeEnd` — Stroke abgeschlossen
## 2) TouchDesigner (ohne extra Code)
- Füge **WebSocket DAT** hinzu, setze **Mode = Server** und **Port = 9980**.
- Verbinde Browser (Button `Verbinden`).
- Hänge einen **JSON DAT** an den WebSocket-Ausgang (zum Parsen).
- Alternativ direkt WebSocket DAT -> **WebSocket In CHOP** (vereinfachte Skalare), für volle Struktur aber JSON DAT + Python DAT-Execute.
- Beispiel: Aus `point`-Messages `x,y` in einen **Trail CHOP** oder zum Zeichnen in einen **TOP**.
## 3) Test ohne TouchDesigner (Node)
Optionale Mini‑WS:
```bash
npm i ws
node mock_ws_server.js
```
Dann im Painter `ws://localhost:9980` verwenden.
## 4) Export
Buttons: JSON, SVG, PNG — jeweils Download.
A11y: Tastaturbedienung, ARIA‑Status, hoher Kontrast, 200% Zoom stabil.