natiny.input.get_wheel_x

Lua
natiny.input.get_wheel_x() -> notches

Returns the accumulated horizontal wheel movement since the last frame, in notches. Every wheel event reported between frames contributes to the result. The value is independent of the window's scale mode and uses the same unit on the desktop and in a browser. Positive is to the right. Most mice report 0; trackpads can report many small horizontal deltas.

Returns

Type Description
number Notches turned this frame; 0 when it did not

Example

Lua
timeline_x = timeline_x + natiny.input.get_wheel_x() * 24