Ambient WebGL petals + cute notification sounds
Add a fixed, GPU-driven petal layer that drifts soft blossoms over the page (sparse, translucent, paused when hidden, skipped under prefers-reduced-motion). Add a synthesized cute sound palette — bubble pop, water droplet, soft bell, sparkle, cheer — generated as embedded WAV assets (scripts/gen_sounds.py) and played through a quiet Web Audio bus with soft-clipping and a persisted mute toggle in the status bar. Sounds fire per suggestion type when fresh advice arrives (staggered, old pending advice stays silent) and on companion bubbles by tone. Claude-Session: https://claude.ai/code/session_016Yr6jELuRc7hyzYLccQKZd
This commit is contained in:
@@ -382,7 +382,31 @@ button, a, input {
|
||||
only the title and the writing itself reach the page. This is Petal's PDF
|
||||
path — it uses the browser's own fonts, so CJK renders correctly with no
|
||||
server-side font embedding. */
|
||||
/* --- Ambient falling petals -------------------------------------------------
|
||||
The WebGL petal layer is a fixed, non-interactive overlay that drifts soft
|
||||
blossoms over the page. Kept gentle (low opacity) so it never competes with
|
||||
the writing. It hides itself in print and is skipped entirely for users who
|
||||
prefer reduced motion (the component renders nothing in that case). */
|
||||
.petal-fall {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
/* Honor reduced-motion globally: still the looping ambient animations and drop
|
||||
the petal layer. One-shot entrance/feedback animations are left intact. */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.petal-fall {
|
||||
display: none !important;
|
||||
}
|
||||
.petal-bob,
|
||||
.petal-bob-slow,
|
||||
.petal-zzz,
|
||||
.petal-checkpoint-dot {
|
||||
animation: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
.petal-fall,
|
||||
.petal-no-print,
|
||||
.petal-sidebar,
|
||||
.petal-suggestion-card,
|
||||
|
||||
Reference in New Issue
Block a user