Skip to content

feat: add Birthday Candle example - #32

Merged
blazejkustra merged 2 commits into
mainfrom
feat/birthday-candle
Sep 5, 2026
Merged

feat: add Birthday Candle example#32
blazejkustra merged 2 commits into
mainfrom
feat/birthday-candle

Conversation

@blazejkustra

@blazejkustra blazejkustra commented Sep 5, 2026

Copy link
Copy Markdown
Owner

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

  • Verified on the iPhone SE simulator via the __candleBlow debug hook: rest flicker, soft puff gutters, hard held puff snuffs, red wick tip, smoke wisp, tap relights, caption swaps.
  • Repo-wide yarn lint and yarn typecheck pass. The typecheck was red on main since feat: Telegram dissolve example #30 (Telegram bubble ref typed as View); fixed here with ComponentRef<typeof View>.
  • Not verified: real mic gains and snuff threshold on a phone, tilt direction on a device, Android.

Screenshots

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
@blazejkustra
blazejkustra merged commit 62fb6b2 into main Sep 5, 2026
2 checks passed
@blazejkustra
blazejkustra deleted the feat/birthday-candle branch September 5, 2026 17:50
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