painter

painter · sources

PAINTER — an MS-Paint-style drawing surface as a video SOURCE. The card is a tiny Windows-95 Paint: a tool grid (PENCIL = hard 1px, BRUSH = round sized stroke, ERASER = paints the background colour, LINE, RECT, ELLIPSE, FILL = flood fill, EYEDROPPER = pick a colour off the canvas, TEXT = stamp a string), the classic 28-colour Win95 palette (left-click a swatch = FOREGROUND, right-click = BACKGROUND), a SIZE slider (brush/line width 1..48), a FILL toggle (outline vs background-filled rect/ellipse), and an engine-resolution drawing canvas. Whatever you paint is the single video OUTPUT in real time: the card binds its live canvas to the module once and the engine uploads that canvas every frame (a 1:1 mapping — the canvas IS the frame). MODEL: the drawing is a Y.Doc-synced ordered op log (node.data.ops) — each committed stroke / shape / fill / text appends one PaintOp; on mount and on any remote edit the card REPLAYS the log onto the canvas (deterministic, pure painter-draw.ts), so every rack-mate paints the same picture. Tool / colour / brush-size are LOCAL per-collaborator (only the drawing syncs). UNDO pops the last op; CLEAR empties the log to a blank white page. IO — Inputs: none (a pure source). Output: out (video) — the painted canvas at the engine output resolution. The OUT port lives in the faceplate's yellow drill-down PATCH PANEL (no raw side jacks, #767 standard). A freshly-spawned node renders a blank WHITE page (MS-Paint's default), so it is never a dead black frame. USAGE: paint a logo / title card / doodle and route OUT into a mixer / keyer / effect / OUTPUT; collaborate on one canvas in a shared rack.

painter is an interactive MS-Paint-style drawing SURFACE that acts as a pure video SOURCE — there is no video input, and no knobs: the pointer IS the instrument. Open its faceplate and you get a tiny Windows-95 Paint: a 9-tool row (pencil, brush, eraser, fill, pick/eyedropper, line, rect, ellipse, text), the classic Win95 swatch grid of 28 colours (2 rows x 14), a SIZE slider, a FILL toggle, a text-stamp field, UNDO/CLEAR, and an engine-resolution drawing canvas. The tools work the MS-Paint way — pencil draws a hard 1px stroke; brush/line/rect/ellipse draw at the SIZE width; FILL toggles a filled vs outlined interior for rect/ellipse; fill flood-fills under the click with the FOREGROUND colour; pick (eyedropper) samples a pixel's colour; and text stamps the typed string. Left-click a swatch sets the FOREGROUND (strokes/text/fill), RIGHT-click sets the BACKGROUND, which is what the eraser paints with and what a filled shape's interior is filled with; tool and colour choices stay LOCAL per collaborator. UNDO removes the last committed op and CLEAR empties the canvas back to a blank white page. Whatever you paint appears in real time on the single video output, 1:1 — the live drawing canvas is bound to the module and the engine uploads + blits it into the output FBO every frame (the drawing buffer is 1024x768, letterboxed by the shader when the engine is running 16:9). Until you draw anything the output is a flat opaque WHITE page (MS-Paint's default blank page), never a dead black frame — the shader returns solid white when no canvas is bound. The drawing is stored as a Y.Doc-synced ordered op log (node.data.ops): each committed stroke/shape/fill/text appends one PaintOp and the log is deterministically replayed on load and on every remote edit, so every collaborator sees the same picture — and the replay is owned by the NODE, not by any surface, so a saved rack shows your drawing on its OUT the moment it loads, with nothing opened. SCREEN ON/OFF puts the whole paint set away and reclaims its space; the module goes on rendering the drawing while it is off, and the switch stays reachable so any collaborator can bring the editor back. Usage: spawn it, pick a tool and colour, draw, and patch OUT (on the yellow drill-down patch panel) into any video destination (mixer, keyer, effect, output) to use your sketch as a live source or hand-drawn matte.

the faceplate

painteroutvideoaudiocvgatepitch
0 inputs · 1 outputs · 0 params

outputs

idcablewhat it does
outvideoVideo output carrying the painted canvas at the engine output resolution, blitted 1:1 from the live drawing surface every frame (a flat opaque white page before you draw anything). This is the module's only port.
RGB video stream

source

painter.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo