naver / egjs-axes

A module used to change the information of user action entered by various input devices such as touch screen or mouse into the logical virtual coordinates.
https://naver.github.io/egjs-axes/
MIT License
179 stars 31 forks source link

v3: support smooth WheeInput for mouse scrolling #174

Closed malangfox closed 2 years ago

malangfox commented 2 years ago

Details

When using WheelInput with mouse, offset of the virtual coordinate does not update smoothly. This problem can be solved by using animateTo on change, and property named releaseThreshold has been added to WheelInputOption to trigger release event after animation ends. releaseThreshold decides millisecond that trigger release event after last input. Before this property is added, Release event is automatically triggered after 50ms from last input.

Demos using mouse scroll within WheelInput Before.

ezgif com-gif-maker (36) ezgif com-gif-maker (35)

Demos using mouse scroll within WheelInput After.

ezgif com-gif-maker (37) ezgif com-gif-maker (34)