Skip to content

Add the lynx-pretext Dancer effect as an Easter egg #9

Description

@Huxpro

Summary

Port the Dancer effect from Huxpro/lynx-pretext into BusyWeek as a hidden Easter egg.

The effect combines an animated transparent sprite with per-frame exclusion geometry. Text is laid out line by line into the space around the dancer's changing silhouette, so the content appears to flow around a moving person rather than sitting behind a video rectangle.

Easter-egg behavior

  • Keep the trigger undisclosed in the normal UI.
  • Suggested trigger: long-press the 好忙啊 subtitle for approximately 1.5 seconds, suppressing the normal header tap only after the long press wins.
  • Present one short dancer loop over the timeline.
  • During the loop, nearby Todo/intro text reflows around the dancer profile.
  • A tap outside or a second trigger dismisses it immediately.
  • Finishing or dismissing the effect restores the exact original timeline layout and scroll anchor.
  • The Easter egg must not mutate, complete, move, or persist any Todo data.

Reference technique

The upstream example uses:

  • a transparent PNG sprite sheet
  • 70 sampled frames, typically played at 12 fps
  • a per-frame exclusion profile divided into horizontal bands
  • prepareWithSegments() and layoutNextLine()
  • different available intervals on the left and right of the silhouette for each text line

Reference:

BusyWeek adaptation

  • Render the dancer in a non-interactive overlay inside the timeline viewport.
  • Generate a temporary line/exclusion layout from current visible content without changing stored data.
  • Prefer reflowing a decorative intro/copy layer first; reflow actual Todo rows only if identity, hit targets, and accessibility remain correct.
  • Keep checkbox/delete hit targets outside the animated exclusion layout or disable them for the short duration.
  • Pause frame advancement when the app is backgrounded or the overlay is not visible.
  • Cache prepared text and exclusion data; do not re-prepare text every frame.

Asset and performance constraints

  • Confirm the license and redistribution status of any upstream dancer sprite before copying it.
  • If the existing character assets are unsuitable for redistribution, reproduce the technique with an original BusyWeek mascot/dancer asset.
  • Keep the shipped asset size intentional and documented.
  • Target sprite updates at the source cadence (for example 12 fps); do not force 60 text-layout recomputations per second.
  • Instrument frame time on representative iOS and Web targets before enabling the Easter egg in production.

Acceptance criteria

  • A hidden, deterministic gesture enters and exits the Easter egg without conflicting with the completed-items header toggle.
  • The dancer animates from a sprite sheet on Web and Lynx native.
  • Visible text flows around the per-frame silhouette instead of a fixed rectangle.
  • No Todo state, ordering, completion, or persistence changes.
  • Dismissal restores the previous layout and scroll position without a flash.
  • The overlay does not permanently block Todo gestures or accessibility.
  • Backgrounding/unmounting stops timers and animation work.
  • Reduced-motion mode uses a still silhouette or a simple non-reflowing appearance.
  • Asset licensing/attribution and bundle-size impact are documented.
  • Tests cover trigger arbitration, teardown, frame selection, exclusion intervals, and state preservation.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions