[GH-ISSUE #4631] [Feature]: "Reduce ambient animations & effects" toggle (consolidated switch for decorative animation/effect work) #2532

Closed
opened 2026-10-21 05:49:41 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @kolacheee on GitHub (Aug 5, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4631

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Two mobile users reported battery drain / phone heat while using Marinara. An investigation found the biggest causes are fixable bugs (filed separately: #4628, #4629, #4630) — but beyond those, the client has accumulated a large set of always-on ambient visual effects that each cost a little continuous rendering work while the screen is on, and collectively add up on phones:

  • 41 infinite CSS animations in globals.css, several on paint-expensive properties (gradient cyclers: rgb-pulse-border 20s, gradient-rotate 4s, pastel-gradient-cycle 25s; Game Mode ambience: fog shimmer, map marquee, party-pulse, campfire flicker, combat-pulse)
  • Weather effects: full chat-sized canvas redrawn at ~30 fps continuously while a weather scene is active
  • RGB / pulse accent mode: rewrites :root CSS variables from a JS timer every 500 ms → app-wide style recalculation twice per second (already well-gated to visible+focused, but still a continuous cost when on)
  • Professor Mari pixel scene: 5 infinite animations running whenever the Home screen is idle; a looping animated GIF while agents run
  • Home ambience: 653 KB looping GIF logo, JS starfield spawner, gradient title animation
  • JS-driven UI carousels: RoleplayHUD tracker/inventory 3 s cycles, party-bar 2.5 s avatar cycle, merged-narrator avatar 2 s crossfade (some of these tick in hidden tabs, since JS timers don't pause like CSS animations do)
  • Streaming typewriter: a requestAnimationFrame loop at display refresh rate (60–120 fps) for the entire generation — the dominant screen-on cost during long streams on slow models
  • Pervasive backdrop-filter blur (168 occurrences across 79 files) — GPU-expensive on mobile

Some of these already have individual switches (gameTextEffectsEnabled from #3801, streaming speed 100 = instant reveal, partial prefers-reduced-motion coverage), but they're scattered, incomplete, and hard for a battery-conscious user to discover.

Proposed solution

A single "Reduce ambient animations & effects" toggle (Settings → Appearance or Accessibility) that turns off the catalog above in one go:

  • stop/hide the infinite CSS animations (Mari pixel scene, gradient cyclers, Game ambience, text effects, glows/halos)
  • pause the weather canvas (render one static frame)
  • force the accent to a static color (no RGB/pulse timer)
  • stop the JS carousels/crossfades (show first item / static avatar)
  • force instant streaming reveal (the existing streamingSpeed = 100 code path — text still streams in per network chunk, just without the per-frame typewriter)
  • optionally reduce/disable backdrop blur on mobile widths
  • auto-enable when the OS reports prefers-reduced-motion (superset of today's partial coverage)

On naming (deliberate): this should be advertised as exactly what it is — a reduced-animations/effects mode — not a "Low Battery Mode". Most of these effects already pause in background tabs, and the truly large battery items are the bugs filed separately. This toggle is a real but moderate screen-on reduction (plus an accessibility win); the label shouldn't promise a battery transformation it can't deliver on its own. A short settings description like "Turns off decorative animations and ambient effects. Reduces rendering work and can modestly extend battery life on phones." keeps it honest.

Alternatives considered

  • Keep adding per-feature toggles (status quo): scattered, undiscoverable, and every new animated feature ships default-on with no battery review.
  • Rely on OS prefers-reduced-motion only: coverage today is partial, users don't always want system-wide reduced motion, and it doesn't reach non-motion costs (blur, canvas, JS timers).
  • A true "Low Battery Mode" that also relaxes poll cadences and degrades functionality: bigger scope; the polling problems are better fixed as bugs for everyone rather than hidden behind a mode.

Additional context

From the same investigation as #4628 / #4629 / #4630 (two mobile users: browser-client heat, Termux baseline drain). Prior related work: #3567/#3574 (PWA battery: weather + accent contention), #4198/#4199 (mobile input heat), #3801 (gameTextEffectsEnabled). Roughly 2,160 commits landed since the #3574 battery pass, adding several new animated surfaces (dice, RPS clash, comic playback, Game ambience) that have never had a battery review — a single consolidated toggle also gives future animated features an obvious place to hook into.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Aug 5, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4631 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? Two mobile users reported battery drain / phone heat while using Marinara. An investigation found the biggest causes are fixable bugs (filed separately: #4628, #4629, #4630) — but beyond those, the client has accumulated a large set of **always-on ambient visual effects** that each cost a little continuous rendering work while the screen is on, and collectively add up on phones: - **41 `infinite` CSS animations** in `globals.css`, several on paint-expensive properties (gradient cyclers: `rgb-pulse-border` 20s, `gradient-rotate` 4s, `pastel-gradient-cycle` 25s; Game Mode ambience: fog shimmer, map marquee, party-pulse, campfire flicker, combat-pulse) - **Weather effects**: full chat-sized canvas redrawn at ~30 fps continuously while a weather scene is active - **RGB / pulse accent mode**: rewrites `:root` CSS variables from a JS timer every 500 ms → app-wide style recalculation twice per second (already well-gated to visible+focused, but still a continuous cost when on) - **Professor Mari pixel scene**: 5 infinite animations running whenever the Home screen is idle; a looping animated GIF while agents run - **Home ambience**: 653 KB looping GIF logo, JS starfield spawner, gradient title animation - **JS-driven UI carousels**: RoleplayHUD tracker/inventory 3 s cycles, party-bar 2.5 s avatar cycle, merged-narrator avatar 2 s crossfade (some of these tick in hidden tabs, since JS timers don't pause like CSS animations do) - **Streaming typewriter**: a requestAnimationFrame loop at display refresh rate (60–120 fps) for the entire generation — the dominant *screen-on* cost during long streams on slow models - **Pervasive `backdrop-filter` blur** (168 occurrences across 79 files) — GPU-expensive on mobile Some of these already have individual switches (`gameTextEffectsEnabled` from #3801, streaming speed 100 = instant reveal, partial `prefers-reduced-motion` coverage), but they're scattered, incomplete, and hard for a battery-conscious user to discover. ## Proposed solution A single **"Reduce ambient animations & effects"** toggle (Settings → Appearance or Accessibility) that turns off the catalog above in one go: - stop/hide the infinite CSS animations (Mari pixel scene, gradient cyclers, Game ambience, text effects, glows/halos) - pause the weather canvas (render one static frame) - force the accent to a static color (no RGB/pulse timer) - stop the JS carousels/crossfades (show first item / static avatar) - force instant streaming reveal (the existing `streamingSpeed = 100` code path — text still streams in per network chunk, just without the per-frame typewriter) - optionally reduce/disable backdrop blur on mobile widths - auto-enable when the OS reports `prefers-reduced-motion` (superset of today's partial coverage) **On naming (deliberate):** this should be advertised as exactly what it is — a reduced-animations/effects mode — **not** a "Low Battery Mode". Most of these effects already pause in background tabs, and the truly large battery items are the bugs filed separately. This toggle is a real but *moderate* screen-on reduction (plus an accessibility win); the label shouldn't promise a battery transformation it can't deliver on its own. A short settings description like "Turns off decorative animations and ambient effects. Reduces rendering work and can modestly extend battery life on phones." keeps it honest. ## Alternatives considered - **Keep adding per-feature toggles** (status quo): scattered, undiscoverable, and every new animated feature ships default-on with no battery review. - **Rely on OS `prefers-reduced-motion` only**: coverage today is partial, users don't always want system-wide reduced motion, and it doesn't reach non-motion costs (blur, canvas, JS timers). - **A true "Low Battery Mode"** that also relaxes poll cadences and degrades functionality: bigger scope; the polling problems are better fixed as bugs for everyone rather than hidden behind a mode. ## Additional context From the same investigation as #4628 / #4629 / #4630 (two mobile users: browser-client heat, Termux baseline drain). Prior related work: #3567/#3574 (PWA battery: weather + accent contention), #4198/#4199 (mobile input heat), #3801 (`gameTextEffectsEnabled`). Roughly 2,160 commits landed since the #3574 battery pass, adding several new animated surfaces (dice, RPS clash, comic playback, Game ambience) that have never had a battery review — a single consolidated toggle also gives future animated features an obvious place to hook into. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2532
No description provided.