Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better parallax #2652

Merged
merged 13 commits into from
Nov 28, 2024
Merged

Better parallax #2652

merged 13 commits into from
Nov 28, 2024

Conversation

snqb
Copy link
Collaborator

@snqb snqb commented Nov 26, 2024

Expands on #2619

feel free to tweak things to your liking, but it came out pretty neat

there is one visible side-effect of using "touchmove" -- you can encounter it after scrolling down, then coming back back to the top of the list. But to my liking, it creates a rubberband-like experience, and basically is feature, not a bug 🤓
feel free to criticize this, i surely can find a solution of this, but I like it :D
https://github.com/user-attachments/assets/4ae390f3-f012-45bc-9b45-6ff951895b8e

@raineorshine
Copy link
Contributor

Hi, thanks for this!

So, I'm going to have to ask you to break this down into one PR per issue. It's too hard to keep track of multiple threads of conversation related to multiple issues in a single PR.

That would fail to trigger parallax when a programmatic scroll is triggered (e.g. when the cursor is automatically scrolled into view).

The proper solution will make the parallax based on the autofocus-adjusted scroll position rather than the exact scroll position.

@snqb
Copy link
Collaborator Author

snqb commented Nov 26, 2024

@raineorshine i removed the thing and edited the description

Copy link
Contributor

@raineorshine raineorshine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I like the new image.

After playing around with the transition, I decided I didn't like the delay. It feels better to me if the ScrollZone pans immediately, proportional to the number of pixels scrolled. If it feels choppy, it's probably because the frame rate is dropping.

I'm open to further discussion if it continues to be a problem.

@raineorshine raineorshine merged commit 36edb98 into cybersemics:main Nov 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants