Skip to main content

WheelInput

class WheelInput

A module that passes the amount of change to eg.Axes when the mouse wheel is moved. use one axis.

constructor

new WheelInput(element, options)
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
elementHTMLElement | String | jQueryAn element to use the eg.Axes.WheelInput module
optionsWheelInputOption✔️The option object of the eg.Axes.WheelInput module
const wheel = new eg.Axes.WheelInput("#area", {
scale: 1
});

// Connect only one 'something1' axis to the vertical mouse wheel.
axes.connect(["something1"], wheel); // or axes.connect("something1", wheel);

// Connect only one 'something2' axis to the horizontal mouse wheel.
axes.connect(["", "something2"], wheel); // or axes.connect(" something2", pan);

// Connect the 'something1' axis to the vertical mouse wheel.
// Connect the 'something2' axis to the horizontal mouse wheel.
axes.connect(["something1", "something2"], wheel);

Methods

destroy

Destroys elements, properties, and events used in a module.

enable

Enables input devices

Returns: WheelInput

  • An instance of a module itself

disable

Disables input devices

Returns: WheelInput

  • An instance of a module itself

isEnabled

Returns whether to use an input device

Returns: Boolean

  • Whether to use an input device