junkpile

21 · Tauri v2 Projection Mapper

A standalone two-window projection-mapping foundation built with Tauri v2 and raw WebGL 1.

The controls WebView edits mapping state. A separate output WebView owns the WebGL canvas, camera capture, source decoding, calibration overlays, and physical display output.

Signal path

Image / video / camera / generated pattern
                    ↓
           Source framing + transform
                    ↓
       Editable 2×2 / 3×3 / 5×5 mesh
                    ↓
         Edge feather + black-level trim
                    ↓
         Calibration grid / point overlay
                    ↓
          Dedicated projection window

Included

Run

npm install
npm run dev

The application opens two windows:

  1. Projection Mapper Controls — keep this on the operator display.
  2. Projection Output — move this to the projector or secondary display.

For multi-display use:

  1. Select a display in Output window.
  2. Press Move to display.
  3. Press Fullscreen output.
  4. Enable Output grid while aligning the physical surface.
  5. Disable calibration before presenting content.

Mesh editor

The green dashed rectangle marks the normal output bounds. Nodes may move beyond those bounds when overscan or off-screen cropping is useful.

Native media paths

Images and videos intentionally use different loading routes:

Image → Rust bytes → Blob URL → output WebGL texture
Video → runtime asset authorization → output video element → WebGL texture

This keeps image textures origin-clean while allowing videos to stream instead of being copied through IPC.

Presets

Presets store the mesh, source transform, feathering, color compensation, calibration settings, generated-pattern choice, source speed, and framing mode.

Local media paths are intentionally not stored in presets. A preset saved while media is loaded restores the generated source and all mapping parameters.

Camera permissions

The project includes a macOS camera usage description and camera entitlement. The first camera start may trigger an operating-system permission prompt. Device names often become available only after permission is granted.

Notes