Repository navigation
fix: pause and stabilize particle animation - #164
Open
efegokdemir wants to merge 3 commits into
Open
efegokdemir wants to merge 3 commits into
efegokdemir wants to merge 3 commits into
Conversation
✅ Deploy Preview for stellartickets ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Author
|
Follow-up also addresses #153 because both issues affect the same resize loop: the particle field is now reseeded only when width changes by more than one pixel. Height-only changes, including mobile URL-bar changes, resize the canvas without resetting particle positions. Revalidated after the follow-up:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #154 and #153 by pausing the decorative
ParticleNetworkanimation when the hero is outside the viewport and preserving the particle field across height-only resizes.Changes
IntersectionObserverto start/stop animation based on visibility.prefers-reduced-motionchanges.IntersectionObserveris unavailable.Testing
npm run lint— passed.npx tsc --noEmit— passed.npm test -- --run— 5 files, 20 tests passed.npm run build— passed.git diff --check— passed.Notes
The canvas remains decorative and
aria-hidden; this change only controls when animation work runs and when the particle field is reseeded.