mirror of
https://git.undefined-dev.fr/Blendman974/faceclaw.git
synced 2026-11-19 21:03:09 +00:00
Speed up the menu animations
<details> <summary>Prompts Used</summary> User: Let's speed up the default speed of the menu animation (ie, what the Normal speed setting corresponds to) by 2x. Opus 5.5: > Menu animations now run twice as fast at Normal speed. The build and typecheck passed; I haven't tried it on the glasses yet. > > I halved the two base durations that every menu animation speed is calculated from: > - **Highlight slide and list scroll:** 240ms → 120ms (`app/ui/menu-highlight-motion.ts:4`) > - **End-of-list bounce:** 320ms → 160ms (`app/ui/menu-scroll-motion.ts:8`) > > This covers menus, lists, and the launcher and Files icon grids. The other speed settings are calculated from these values, so they get twice as fast too: Slow now matches the old Normal, and Very Fast is now 24ms for the slide. The screen fade setting uses the same speed scale but its own duration, so it isn't affected. </details>
This commit is contained in:
1 parent
4234d3e9e9
commit
023d5bf55c
2 files changed
+2
-2
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { menuAnimationDurationMs } from "./menu-animation-pref";
|
||||
|
||||
/** At Normal menu animation speed; menuAnimationDurationMs scales it to the setting. */
|
||||
export const MENU_HIGHLIGHT_DURATION_MS = 240;
|
||||
export const MENU_HIGHLIGHT_DURATION_MS = 120;
|
||||
export type MenuHighlightAnimation = { dx: number; dy: number; startedAt: number; token: number; durationMs: number };
|
||||
|
||||
let nextToken = 1;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { MENU_HIGHLIGHT_DURATION_MS, nextAnimationToken } from "./menu-highlight
|
||||
/** Longest scroll, in pixels, that animates; longer jumps snap. */
|
||||
export const MAX_ANIMATED_SCROLL = 96;
|
||||
/** At Normal menu animation speed, like MENU_HIGHLIGHT_DURATION_MS. */
|
||||
export const MENU_BOUNCE_DURATION_MS = 320;
|
||||
export const MENU_BOUNCE_DURATION_MS = 160;
|
||||
/** Fraction of a bounce spent moving out to the peak; the rest settles back. */
|
||||
const BOUNCE_PEAK = 0.35;
|
||||
|
||||
|
||||
Reference in new issue
Block a user