fixed ds4 template for es6
This commit is contained in:
parent
ff33f0765a
commit
1cb776d56b
@ -1,5 +1,5 @@
|
|||||||
function updateButton($button) {
|
gamepad.updateButton = function($button) {
|
||||||
value = parseFloat($button.attr('data-value'), 10);
|
const value = parseFloat($button.attr('data-value'), 10);
|
||||||
|
|
||||||
if ($button.is('.trigger')) {
|
if ($button.is('.trigger')) {
|
||||||
$button.css({
|
$button.css({
|
||||||
@ -8,12 +8,10 @@ function updateButton($button) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var axisX, axisY, axisZ;
|
gamepad.updateAxis = function($axis) {
|
||||||
|
const axisX = $axis.attr('data-value-x');
|
||||||
function updateAxis($axis) {
|
const axisY = $axis.attr('data-value-y');
|
||||||
axisX = $axis.attr('data-value-x');
|
const axisZ = $axis.attr('data-value-z');
|
||||||
axisY = $axis.attr('data-value-y');
|
|
||||||
axisZ = $axis.attr('data-value-z');
|
|
||||||
|
|
||||||
if ($axis.is('.stick')) {
|
if ($axis.is('.stick')) {
|
||||||
$axis.css({
|
$axis.css({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user