From d0535a6e9151f47cc89314bb7af0affd8ef90cfe Mon Sep 17 00:00:00 2001 From: fand Date: Wed, 14 Aug 2024 14:58:37 -0700 Subject: [PATCH] fix: use isInLogicalViewport for intersection calculation on init --- packages/vfx-js/src/vfx-player.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vfx-js/src/vfx-player.ts b/packages/vfx-js/src/vfx-player.ts index 56949f4..4e71ff6 100644 --- a/packages/vfx-js/src/vfx-player.ts +++ b/packages/vfx-js/src/vfx-player.ts @@ -296,8 +296,8 @@ export class VFXPlayer { uniforms, uniformGenerators, startTime: now, - enterTime: isInViewport ? now : -Infinity, - leaveTime: isInViewport ? Infinity : -Infinity, + enterTime: isInLogicalViewport ? now : -Infinity, + leaveTime: isInLogicalViewport ? Infinity : -Infinity, release: opts.release ?? Infinity, isGif, isFullScreen,