Skip to content

feat: add particle dispersion example - #33

Merged
blazejkustra merged 1 commit into
mainfrom
feat/particle-dispersion
Sep 5, 2026
Merged

feat: add particle dispersion example#33
blazejkustra merged 1 commit into
mainfrom
feat/particle-dispersion

Conversation

@blazejkustra

Copy link
Copy Markdown
Owner

Problem

The example app had no "lift subject" style effect: a photo whose background disperses into particles while the subject stays crisp.

Approach

One ShaderView renders a photo+mask+distance atlas; background cells release as dust ordered by distance from the subject, then the cut-out shrinks to the centre under a soft rim shimmer.

Tests

  • Verified on the iPhone 17 Pro simulator via screen recordings: dissolve order, lift timing, shimmer, reset.
  • yarn lint and yarn typecheck pass on this branch.
  • Not verified: Android, real-device frame rate (full-screen 5×5 gather at 3× DPR).

Screenshots

Recreates the iOS "lift subject" moment as a single ShaderView: the
photo's background breaks into fine rising dust that spreads outward from
the subject, leaving a flat colour with a contact shadow; the cut-out then
shrinks and settles in the middle while a soft light traces its silhouette.

The subject mask and a distance-to-subject field are packed next to the
photo in one atlas (ShaderView binds a single texture). Grains use the
same invertible wind-field gather as the Telegram dissolve.

Photo: "Orange tabby cat sitting on fallen leaves" by Hisashi, Wikimedia
Commons, CC BY-SA 2.0.

Claude-Session: https://claude.ai/code/session_018M1xxfxyazPGpU5RxkXyW9
@blazejkustra
blazejkustra merged commit cfd6f3c into main Sep 5, 2026
2 checks passed
@blazejkustra
blazejkustra deleted the feat/particle-dispersion branch September 5, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant