Skip to main content

RotatePanInput

class RotatePanInput extends PanInput

A module that passes the angle moved by touch to Axes and uses one axis of rotation.
Details

constructor

new RotatePanInput(element, options)
PARAMETERTYPEOPTIONALDEFAULTDESCRIPTION
elementHTMLElement | String | jQueryAn element to use the eg.Axes.RotatePanInput module
optionsPanInputOption✔️The option object of the eg.Axes.PanInput module
const input = new eg.Axes.RotatePanInput("#area");

var axes = new eg.Axes({
// property name('angle') could be anything you want (eg. x, y, z...)
angle: {
range: [-180, 180] // from -180deg to 180deg
}
});

axes.connect("angle", input)

Methods

destroy

inherited

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

enable

inherited

Enables input devices

Returns: PanInput

  • An instance of a module itself

disable

inherited

Disables input devices

Returns: PanInput

  • An instance of a module itself

isEnabled

inherited

Returns whether to use an input device

Returns: Boolean

  • Whether to use an input device

release

inherited

Releases current user input.

Returns: PanInput

  • An instance of a module itself