From c195dcf8f4e50e6855065611cafc02072ee2a25f Mon Sep 17 00:00:00 2001 From: thibaultcapelli Date: Tue, 5 Nov 2024 16:00:23 +0100 Subject: [PATCH] fix: parallax layout with new arch enabled --- src/layouts/parallax.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/layouts/parallax.ts b/src/layouts/parallax.ts index 9b802fed..9886c3cf 100644 --- a/src/layouts/parallax.ts +++ b/src/layouts/parallax.ts @@ -52,11 +52,13 @@ export function parallaxLayout( [-size + parallaxScrollingOffset, 0, size - parallaxScrollingOffset], ); - const zIndex = interpolate( - value, - [-1, 0, 1], - [0, size, 0], - Extrapolation.CLAMP, + const zIndex = Math.round( + interpolate( + value, + [-1, 0, 1], + [0, size, 0], + Extrapolation.CLAMP, + ) ); const scale = interpolate(