Skip to content
deetanPublic

About

Мой личный репозиторий

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

misc

A grab-bag of standalone single-file web toys, published at https://den.tanaev.su/misc/.

one-off · plain HTML/JS, no build · served as static files by nginx on the reports host

Pages

File Live What it is
finger-frame.html den.tanaev.su/misc/finger-frame.html Webcam toy: frame part of the picture with your fingers and see it through one of 18 filters

Finger Frame

Hold up both hands in an L shape (thumb and index finger), like a director framing a shot. The page tracks the four fingertips and stretches a "screen" between them. Inside it you see yourself with a filter: Thermal, Invert, Noir, Night vision, Edges, Pixel, Pop art, Glitch, Old film, X-ray, Halftone, Matrix, Zoom, Kaleidoscope, Swirl, Psychedelic, Frosted glass or Emboss.

The start screen shows an illustrated how-to (the hand pose and three tips) above the Start camera button.

  • Move / rotate / twist: the screen is pinned to your fingertips. Rotate your hands and the picture rotates. Flip one hand and the screen twists like a ribbon, with its back side darker and mirrored. Cross your hands and it flips over.
  • Next filter by gesture: squash the frame into a line (or pinch thumb to index) while both hands stay in view, then open it again.
  • Keys: 1–9 pick a filter, Space / → next, ← previous, L switches between screen mode and see-through lens mode, M mirror, H hides the filter bar.

Everything runs in the browser. The camera image never leaves the machine. The only network traffic is downloading the MediaPipe library and hand model on first load.

Architecture

 getUserMedia ──► <video> ──┬──► MediaPipe HandLandmarker (WASM/GPU) ──► 21 landmarks × 2 hands
                            │                                                   │
                            │          hand pairing (wrist continuity) + One-Euro smoothing
                            │                                                   │
                            │                          4 corners + open/closed gesture state
                            ▼                                                   ▼
                     WebGL2 texture ───────► one full-screen fragment shader ◄── uniforms
                                             • inverse-bilinear map pixel → (u,v) on the screen
                                             • filter(u,v)  • glow outline
                                             + 2D canvas HUD (fingertip dots, filter label)

External: cdn.jsdelivr.net (@mediapipe/tasks-vision@0.10.14) and storage.googleapis.com (the hand_landmarker.task model).

Getting started

Any static server works. The camera needs localhost or HTTPS, so opening the file via file:// won't work.

python3 -m http.server 8766
# open http://localhost:8766/finger-frame.html

Test without a camera: finger-frame.html?src=some-photo.jpg runs the page on a still image (put local-only images in .local/, which is gitignored).

Configuration

None. No env vars, no secrets.

Project layout

finger-frame.html   the whole Finger Frame app (HTML + CSS + JS + GLSL in one file)
deploy.sh           scp pages to den.tanaev.su/misc/ and print the HTTP status
.local/             gitignored local test assets

Deploy

./deploy.sh finger-frame.html

This copies the page to reports:/opt/den-tanaev/public/misc/ (nginx docroot for den.tanaev.su) and checks the public URL returns 200.

License

Private project, © dt (the repo itself is public).

About

Мой личный репозиторий

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages