Skip to content

runsascoded/img-voronoi

 
 

Repository files navigation

img-voronoi

Interactive Voronoi diagram visualization from images, with animated site physics and a Rust CLI for video rendering.

Live demo | Originally forked from txstc55/ImageVoronoi

Features

  • Voronoi from images: brightness-weighted site sampling, CPU flood-fill and WebGL cone rendering
  • WASM backend: Rust-compiled Voronoi compute with O-U physics (centroid pull, drift, wander)
  • Animation: play/pause/step with configurable speed, doubling time for gradual site growth
  • Image gallery: always-visible collapsible sidebar, OPFS storage with thumbnails, auto-seeds sample images on first visit, built-in Picsum photo browser
  • Shareable URLs: all settings stored as URL hash params; src param loads any image by URL, embed param hides UI for clean embeds
  • CLI video rendering: Rust CLI with phase specs (grow, hold, fade), ffmpeg encoding, GPU compute shader backend

Quick Start

pnpm install
pnpm dev        # http://localhost:8076

CLI

cd cli
cargo build --release
cargo run --release -- -i image.jpg -o output.mp4 -p n=400,dt=5 -p t=2 -p fade=3

Keyboard Shortcuts

Press ? to open the omnibar (via use-kbd) showing all available shortcuts.

About

Interactive Voronoi diagram visualization from images, with animated site physics and a Rust CLI for video rendering.

Resources

Stars

Watchers

Forks

Contributors

Languages

  • TypeScript 54.7%
  • Rust 35.1%
  • CSS 5.1%
  • HTML 5.0%
  • Shell 0.1%