adjust smoothing in now playing spectrum

This commit is contained in:
Boof2015
2026-07-15 14:50:56 -04:00
parent b290cfed7a
commit b5f1ca9e99
9 changed files with 55 additions and 19 deletions
@@ -109,6 +109,7 @@ const SUB_ICON_SIZE = 20;
const MENU_ANIMATION_IN_MS = 130;
const MENU_ANIMATION_OUT_MS = 100;
const MENU_ENTER_OFFSET_Y = -8;
const NOW_PLAYING_SPECTRUM_SMOOTHING = 0.85;
interface NowPlayingMenuItem {
key: string;
@@ -983,6 +984,7 @@ export function NowPlayingOverlay() {
size={artBoxSize}
stripWidth={layout.scopeWidth}
artworkUri={backdropArtworkUri}
spectrumSmoothing={NOW_PLAYING_SPECTRUM_SMOOTHING}
paused={!playerOpen || queueOpen || !effectiveScopeStageVisible}
/>
</Animated.View>
@@ -1457,6 +1459,7 @@ function ScopeRail({ width, height, mode, paused, revealed, onSwap }: ScopeRailP
showChrome={false}
mode={mode}
edgeFade
spectrumSmoothing={NOW_PLAYING_SPECTRUM_SMOOTHING}
paused={paused}
/>
<Animated.View pointerEvents="none" style={[styles.scopeSwap, labelStyle]}>
+9 -1
View File
@@ -35,6 +35,7 @@ interface ScopeRackProps {
/** Strip span (the rail's width): wider than the card, overflowing it. */
stripWidth: number;
artworkUri: string | null;
spectrumSmoothing?: number;
/** Freeze the scopes without unmounting (overlay closed / queue open). */
paused?: boolean;
}
@@ -45,7 +46,13 @@ interface ScopeRackProps {
* backdrop dissolves past the former card frame, while the strips span the
* full rail width and independently fade at their ends.
*/
export function ScopeRack({ size, stripWidth, artworkUri, paused = false }: ScopeRackProps) {
export function ScopeRack({
size,
stripWidth,
artworkUri,
spectrumSmoothing,
paused = false,
}: ScopeRackProps) {
const styles = useStyles();
const artwork = useImage(artworkUri);
const active = useScopeActive() && !paused;
@@ -114,6 +121,7 @@ export function ScopeRack({ size, stripWidth, artworkUri, paused = false }: Scop
<SpectrumCurve
active={active}
frameMs={STAGE_FRAME_MS}
smoothing={spectrumSmoothing}
width={width}
height={stripHeight}
glow