-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implement occlusion culling #2
Comments
Virtualization would be great. I'll see if I can give this a shot if I have time. An implementation thought I have so far:
Would appreciate any other ideas people have. |
Great, I'm happy to assist you on this! I gave the implementation some thought a while ago, up until a certain point. However, since then I hadn't had the chance to come back to it... So, here's were my thoughts on it:
The current List class should not need much overhauling, and its current structure would be similar. This approach assumes that initially all of the rendered items' height is immutable and will not change. I think it's worth starting off in a sandbox environment, where we can throw in our ideas together. If you prefer to go ahead on your own, that's also fine. |
I didn't know that about I wonder if this should come after the |
I'm glad to hear that. We actually started this project in order to stop using The |
Great, I'll branch off of that PR and I'll try to get a work-in-progress PR sometime within the work week that we can discuss and work off of. Thanks for the clarification! |
@Rendez just an update, currently only had a little time to work on this, but I have a branch on my fork listed here (very much WIP): https://github.com/Setsun/react-intersection-list/tree/feature/virtualization |
Hey, sorry to come late to the party, I was just playing around with the implementation a little bit. |
@MatteoGioioso nice try Matteo, the impl. would be something along the line of what you're presenting here. I don't see however items being removed from the list when I scroll up again, which would be the intent... |
Yea I will try to implement it next time I will put my hands on it, did not have the time 😄
So what would be a good solution? Do you have any suggestions? |
There is no "good" solution because the IntersectionObserver impl. in browsers is too delayed, we must use onscroll. In a way, this library won't play that well with a responsive occlusion culling, though at the beginning I thought it would. I would recommend There is one way though in which the same could be accomplished with the IntersectionObserver API, which would be a combination of |
@Rendez Ok thanks, I will look into it. I just like the concept of using
I should have said: if I scroll too fast downwards the sentinel fails completely to remove rows. |
I agree that the concept is great, I'm looking forward to what you'll come up with @MatteoGioioso! |
Hey @Rendez, check out https://github.com/HenrikBechmann/react-infinite-grid-scroller/blob/master/src/cradle.tsx starting around line 305 for how I use IntersectionObserver to cycle through visible content in a scroller. Seems to work (modern browsers, reasonably fast hardware). All comments welcome! |
He actually implemented a solution, maybe it will help you. |
The initial idea was and continues to be the existence to two render types:
If anyone would like to give the implementation a try, please go ahead
The text was updated successfully, but these errors were encountered: