Files
crumbmissions/crumbblocks
Branko May Trinkwald 554b04ee17 schnippsi ui editor v.0.0
2025-12-23 23:11:00 +01:00
..
2025-12-23 22:25:11 +01:00
2025-12-23 23:11:00 +01:00
2025-12-23 22:25:11 +01:00

This file contains ambiguous Unicode characters

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 BezierTool.
- `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 MiniWS: 
```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, ARIAStatus, hoher Kontrast, 200% Zoom stabil.