feat: add particle dispersion example - #33
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
yarn lintandyarn typecheckpass on this branch.Screenshots