feat: add Birthday Candle example - #32
Merged
Merged
Conversation
Cake photo with the flame painted out, and a transparent ShaderView that draws the wick, flame, glow, ember and smoke on top. Blow into the mic to bend and snuff the flame, tap to relight, tilt and the flame stays upright. useAudioReactive gains optional onFrame/analyserSmoothing options. Claude-Session: https://claude.ai/code/session_01MYgJDumHFGETXWCh37fS7V
React Native types View as a function component, so useRef<View> and a View-typed parameter have no measureInWindow; use ComponentRef<typeof View>. Unblocks the repo-wide typecheck that has failed on main since #30. Claude-Session: https://claude.ai/code/session_01MYgJDumHFGETXWCh37fS7V
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
First of the issue #31 showcase ideas: a candle you blow out. The example app had a lighter flame and a mic hook, but nothing that drove a physical simulation from breath.
Approach
A cake photo with its flame painted out, plus a transparent ShaderView drawing the wick, lighter-style flame, glow, ember and smoke. Mic RMS feeds a fast-attack gust that bends and shrinks the flame; a held breath snuffs it, a tap relights it, tilt keeps it upright.
Tests
__candleBlowdebug hook: rest flicker, soft puff gutters, hard held puff snuffs, red wick tip, smoke wisp, tap relights, caption swaps.yarn lintandyarn typecheckpass. The typecheck was red on main since feat: Telegram dissolve example #30 (Telegram bubble ref typed asView); fixed here withComponentRef<typeof View>.Screenshots