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

Use double in ScrollContainer for scroll tracking #6467

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

peppy
Copy link
Member

@peppy peppy commented Dec 20, 2024

This is the first step towards supporting scrolling over very large amounts of content. With this along, the animation already becomes somewhat smoother (no longer "locking" into place too early) but scroll content will still look jagged when scrolled too far down.

Fixing actual content requires a small amount of extra implementation on top of this. To keep things simple this would be up to the consumer to implement and maintain.

Intended to help fix osu! song select from becoming weird when hundreds of thousands of beatmaps are loaded.

A sample implementation is provided in TestSceneScrollContainerDoublePrecision.

master with a BasicScrollContainer:

osu.Framework.Tests.2024-12-20.at.09.12.41.mp4

This PR with a BasicScrollContainer:

osu.Framework.Tests.2024-12-20.at.09.09.57.mp4

This PR with the custom double implementation:

osu.Framework.Tests.2024-12-20.at.09.11.43.mp4

This is the first step towards supporting scrolling over very large
amounts of content. With this along, the animation already becomes
somewhat smoother (no longer "locking" into place too early) but scroll
content will still look jagged when scrolled too far down.

Fixing actual content requires a small amount of extra implementation on
top of this. To keep things simple this would be up to the consumer to
implement and maintain.

Intended to help fix osu! song select from becoming weird when hundreds
of thousands of beatmaps are loaded.
… to content

This allows a point of intercept to distribute `double` values to
children and bypass floating point precision issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant