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(