Skip to content

feat: added scrollDelta() function to app state#1079

Open
SobennaStory wants to merge 2 commits intokaplayjs:masterfrom
SobennaStory:onscrolldelta
Open

feat: added scrollDelta() function to app state#1079
SobennaStory wants to merge 2 commits intokaplayjs:masterfrom
SobennaStory:onscrolldelta

Conversation

@SobennaStory
Copy link
Copy Markdown

closes #981

Added scroll delta as a pollable input, consistent with how mouse delta position works. Instead of only being able to react to scroll via the onScroll callback, you can now also read it directly like any other input state.

Copy link
Copy Markdown
Contributor

@dragoncoder047 dragoncoder047 left a comment

Choose a reason for hiding this comment

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

  1. You don't need to create a new Vec2 every time we get a scroll, you can just .set() it to the new values.

2. You need to set scrollDelta to zero on frames where we don't have a wheel event. I don't want another #326. My dumb ass can't read. Never mind.

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.

feat: scrollDelta()

2 participants