mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-08 04:29:52 +02:00
Cleanup variable naming in touch controller config
This commit is contained in:
parent
217d46704d
commit
46d8130782
2 changed files with 9 additions and 9 deletions
|
@ -162,22 +162,22 @@ createControllerDisplay = function(config) {
|
||||||
}(controller, overlayID, part));
|
}(controller, overlayID, part));
|
||||||
} else if (part.type === "touchpad") {
|
} else if (part.type === "touchpad") {
|
||||||
var visibleInput = resolveHardware(part.visibleInput);
|
var visibleInput = resolveHardware(part.visibleInput);
|
||||||
var xinput = resolveHardware(part.xInput);
|
var xInput = resolveHardware(part.xInput);
|
||||||
var yinput = resolveHardware(part.yInput);
|
var yInput = resolveHardware(part.yInput);
|
||||||
|
|
||||||
// TODO: Touchpad inputs are currently only working for half
|
// TODO: Touchpad inputs are currently only working for half
|
||||||
// of the touchpad. When that is fixed, it would be useful
|
// of the touchpad. When that is fixed, it would be useful
|
||||||
// to update these to display the current finger position.
|
// to update these to display the current finger position.
|
||||||
mapping.from([visibleInput]).peek().to(function(value) {
|
mapping.from([visibleInput]).peek().to(function(value) {
|
||||||
});
|
});
|
||||||
mapping.from([xinput]).peek().to(function(value) {
|
mapping.from([xInput]).peek().to(function(value) {
|
||||||
});
|
});
|
||||||
mapping.from([yinput]).peek().invert().to(function(value) {
|
mapping.from([yInput]).peek().invert().to(function(value) {
|
||||||
});
|
});
|
||||||
} else if (part.type === "joystick") {
|
} else if (part.type === "joystick") {
|
||||||
(function(controller, overlayID, part) {
|
(function(controller, overlayID, part) {
|
||||||
const xinput = resolveHardware(part.xInput);
|
const xInput = resolveHardware(part.xInput);
|
||||||
const yinput = resolveHardware(part.yInput);
|
const yInput = resolveHardware(part.yInput);
|
||||||
|
|
||||||
var xvalue = 0;
|
var xvalue = 0;
|
||||||
var yvalue = 0;
|
var yvalue = 0;
|
||||||
|
@ -202,7 +202,7 @@ createControllerDisplay = function(config) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mapping.from([xinput]).peek().to(function(value) {
|
mapping.from([xInput]).peek().to(function(value) {
|
||||||
xvalue = value;
|
xvalue = value;
|
||||||
//print(overlayID, xvalue.toFixed(3), yvalue.toFixed(3));
|
//print(overlayID, xvalue.toFixed(3), yvalue.toFixed(3));
|
||||||
var posRot = calculatePositionAndRotation(xvalue, yvalue);
|
var posRot = calculatePositionAndRotation(xvalue, yvalue);
|
||||||
|
@ -212,7 +212,7 @@ createControllerDisplay = function(config) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
mapping.from([yinput]).peek().to(function(value) {
|
mapping.from([yInput]).peek().to(function(value) {
|
||||||
yvalue = value;
|
yvalue = value;
|
||||||
var posRot = calculatePositionAndRotation(xvalue, yvalue);
|
var posRot = calculatePositionAndRotation(xvalue, yvalue);
|
||||||
Overlays.editOverlay(overlayID, {
|
Overlays.editOverlay(overlayID, {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
//
|
//
|
||||||
// viveControllerConfiguration.js
|
// touchControllerConfiguration.js
|
||||||
//
|
//
|
||||||
// Created by Ryan Huffman on 12/06/16
|
// Created by Ryan Huffman on 12/06/16
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue