fix values of axes
This commit is contained in:
parent
5973907005
commit
4bb1df140b
@ -225,7 +225,7 @@ function processController(info) {
|
|||||||
const off = ndx * 2;
|
const off = ndx * 2;
|
||||||
axis.setAttributeNS(null, 'cx', gamepad.axes[off ] * fudgeFactor);
|
axis.setAttributeNS(null, 'cx', gamepad.axes[off ] * fudgeFactor);
|
||||||
axis.setAttributeNS(null, 'cy', gamepad.axes[off + 1] * fudgeFactor);
|
axis.setAttributeNS(null, 'cy', gamepad.axes[off + 1] * fudgeFactor);
|
||||||
value.textContent = `${gamepad.axes[off].toFixed(2).padStart(5)},${gamepad.axes[off].toFixed(2).padStart(5)}`;
|
value.textContent = `${gamepad.axes[off].toFixed(2).padStart(5)},${gamepad.axes[off + 1].toFixed(2).padStart(5)}`;
|
||||||
});
|
});
|
||||||
buttons.forEach(({circle, value}, ndx) => {
|
buttons.forEach(({circle, value}, ndx) => {
|
||||||
const button = gamepad.buttons[ndx];
|
const button = gamepad.buttons[ndx];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user