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.
Added inputButton to PanInputOption which used for PanInput and RotatePanInput.
inputButton option contains the types of mouse buttons PanInput and RotatePanInput will recognize.
inputButton option is ["left"] by default, you can configure like adding/changing it to "middle" and "right" .
Since every touch is recognized as a left click as the PointerEvent, every touch is recognized as a left click.
Added example of newly added option to the existing cube demo.
Example
axes
.connect("rotateX rotateY", new PanInput(area, { inputButton: ["left"] ))
.connect("offsetX offsetY", new PanInput(area, { inputButton: ["right"] }));
Things to be discussed
When naming this name, we used the singular name, just like the inputType option. If the name inputButton isn't appropriate for a list of mouse buttons that accept input, should we switch to the plural?
Current button types are internally implemented with the same string as the type that receives input from the user, such as "left" and "middle". Instead of comparing these buttons as strings, should I create constants like "LEFT_BUTTON" and manage them?
Details
Added inputButton to PanInputOption which used for PanInput and RotatePanInput. inputButton option contains the types of mouse buttons PanInput and RotatePanInput will recognize. inputButton option is ["left"] by default, you can configure like adding/changing it to "middle" and "right" . Since every touch is recognized as a left click as the PointerEvent, every touch is recognized as a left click. Added example of newly added option to the existing cube demo.
Example
Things to be discussed