In Progress

Interactive Art

Kaleidoscope

2026
JavaScript (ES modules), MediaPipe Pose, Canvas 2D

EngineeringDesignMovement
JavaScriptMediaPipe PoseComputer Vision
Status
In progress
When
Jul 2026 to now
Role
Solo
Context
Independent

Stand in front of the camera and you become the kaleidoscope. MediaPipe Pose tracks twelve joints; everything on screen is driven by how you move. Move faster and the color saturates and the spin picks up. Open your arms and the petals stretch. Crouch and the whole form grows.

The graphics are the easy part. The real problem is that pose tracking and rendering run on different clocks. MediaPipe fires whenever it has a new pose, which is irregular and slower than the display refresh, so anything drawn directly from those callbacks steps at the camera's rate and looks stuttery. The two are decoupled instead: pose results write into a shared state object, and a requestAnimationFrame loop reads from it every frame whether or not new pose data arrived.

The second half is easing. Nothing is ever drawn from a raw pose value. Each frame the pose produces targets (target hue, target radius, target petal stretch) and every drawn value interpolates a fraction of the way toward its target. That is the whole difference between visuals that glide and visuals that snap. The interpolation rate itself scales with velocity, so fast movement both moves the target and speeds up the chase toward it. Velocity is deliberately asymmetric: it rises quickly and decays slowly, which gives the image momentum. A burst of movement spikes immediately and then settles, rather than dropping out the instant you stop.

Four renderers share that same eased state: Prism, Bloom, Ripple, and Stars. A live control panel exposes slice count, hue drift, motion, petal size, smoothing, saturation, and trails, plus per-joint toggles so you can drop the legs out and drive the whole thing from the arms alone. Settings persist between sessions.

Vanilla ES modules, no framework and no build step: roughly 1,200 lines of JavaScript across ten modules, with the leaf module holding pure landmark math and a single shared state object as the only thing both halves touch.

How it came together

Process

  1. Jul 2026

    v1, Dance Pose Kaleidoscope

    Two panels: mirrored webcam with joint overlay, and a kaleidoscope canvas. Joint angles drive shape; joint x/y drives color. Slide-out settings panel with 8 live-tunable parameters.

  2. Aug 2026

    v2, shifting in motion

    Module pipeline config > pose > state > signals > modulation > style renderers. Four styles (mirror, ripples, bloom, constellation), 12 tracked joints, three-screen flow (landing, style chooser, tool behind camera gate).

  3. Sep 2026 to now

    Rebuild from scratch

    v2 as reference, all locked architectural principles carried over.

Iterations

  • v1 two-panel layout to v2 full-bleed instrument with receding UI to rebuild
  • 8-slider settings panel to per-style routing table plus XY pad: from exposing variables to designing an instrument

Key decisions

Chosesignals.js abstraction layer; limb-generic so upper-body and full-body share one code path

OverRenderers reading raw landmarks

Only the array length differs between tracking modes.

Chosemodulation.js with one routing table per style, shared by side panel and XY pad

Single source of truth.

Chosephantom.js synthetic dancer

OverRecorded video loop

Avoids an unnecessary asset and its weight.

ChoseArtistic, immersive, deliberately non-sleek aesthetic

Over19th-century plate-book look

Full-bleed canvas, receding UI, prismatic wedge-mirrored backdrop.

Debugging

SymptomCamera permission failed silently.

CauseMediaPipe's Camera helper swallows errors.

CheckedCalled getUserMedia directly and inspected the rejection.

FixDirect getUserMedia with typed, user-facing error messages.

SymptomCanvas sized wrong on load.

CauseCanvas measured before layout settled.

CheckedCompared measured size at script time vs after load.

FixDefer to window.onload, then switch to ResizeObserver.

SymptomThe kaleidoscope did not look like one.

CauseRotated slices only, no reflection.

CheckedVisual inspection of slice symmetry.

FixReflected scale(1,-1) pass per slice; motion-trail fade; pulsing center orb.

Symptomnpx serve failed.

CauseNo Node on the machine; running inside a Python venv.

CheckedChecked PATH.

Fixpython -m http.server 8080.

Outcome

  • 8Live-tunable parameters in v1's settings panel.
  • 12Body joints tracked in v2.
  • ~1,200 linesVanilla ES modules in v2, no framework and no build step.
Launch the live tool In Progress