Add a comet trail animation

The frame glides from waypoint to waypoint and drops a screenshot of
itself every frame-width or so. The stills stay where they were taken
and fade over a few seconds, so the live video reads as the head of a
comet whose tail is its own recent past.

The steering caps how fast the heading may change: an instant turn would
lay the stills out in straight dotted lines, and it is the curve that
makes a tail read as one. Drops are spaced by distance travelled rather
than by a timer, so they stay even however the frame is turning.

Since the capture is a crop of the tab, a still lying under the frame
would be photographed into the next one. A drop waits until the frame is
clear of the tail, keeping the invariant corners already relies on.

Also picks up the FRAME_SCALE, BOUNCE_SPEED and CORNER_INTERVAL_SECONDS
tuning sitting in the tree.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tg15tLAuT6NrCE1ZxKVgDB
This commit is contained in:
simon
2026-08-09 22:58:08 +02:00
co-authored by Claude Opus 5
parent 2066966694
commit 6d306d1b98
5 changed files with 268 additions and 10 deletions
+11 -7
View File
@@ -39,7 +39,7 @@ autoplay, so the first click is what unlocks audio. One click per session.
## Animations
The video frame's movement changes with every track. Three animations ship
The video frame's movement changes with every track. Four animations ship
today:
- **bounce** — diagonal drift, reflecting off the screen edges.
@@ -51,18 +51,22 @@ today:
one corner and pulls the frame to a new size. The aspect ratio stays locked
and the frame stays on screen, so the resize reads as a window resize rather
than a stretch.
- **trail** — the frame glides along a curving path, steering from waypoint to
waypoint, and drops a screenshot of itself every frame-width or so. The stills
stay where they were taken and fade over a few seconds, leaving a comet tail of
frozen video behind the live one.
The queue page's **Animation** buttons pin the player to one of them, which is
how you look at a single animation without waiting for the cycle to reach it.
**Auto** (the default) hands selection back to the shuffle bag. Switching takes
effect immediately; while pinned, track changes leave the animation running.
**The corners animation asks to share your screen.** The decks are cross-origin
YouTube iframes, so nothing on the page can read their pixels — capturing the
tab and cropping out the frame is the only way to photograph what is playing.
The prompt appears once, on the first click of **Start**; choose *this tab*.
Declining is fine: the frame still parks in its corner, just without the
screenshots. The prompt is skipped entirely on a plain-HTTP origin (i.e. when
**The corners and trail animations ask to share your screen.** The decks are
cross-origin YouTube iframes, so nothing on the page can read their pixels —
capturing the tab and cropping out the frame is the only way to photograph what
is playing. The prompt appears once, on the first click of **Start**; choose
*this tab*. Declining is fine: the frame still parks in its corner and still
glides, just without the screenshots. The prompt is skipped entirely on a plain-HTTP origin (i.e. when
you open the player from another machine over the network), for the same reason.
## Adding animations