Comparing version 2.1.3 to 2.1.4
/*! | ||
* Contro | ||
* (c) 2019 Niklas Higi | ||
* (c) 2020 Niklas Higi | ||
* Released under the MIT License. | ||
@@ -364,7 +364,8 @@ */ | ||
} | ||
const { gamepad } = this; | ||
return { | ||
label: gpStick.label, | ||
query() { | ||
return new Vector2(gamepad.axes[gpStick.xAxis], gamepad.axes[gpStick.yAxis]); | ||
query: () => { | ||
if (!this.isConnected()) | ||
return new Vector2(0, 0); | ||
return new Vector2(this.gamepad.axes[gpStick.xAxis], this.gamepad.axes[gpStick.yAxis]); | ||
}, | ||
@@ -371,0 +372,0 @@ }; |
/*! | ||
* Contro | ||
* (c) 2019 Niklas Higi | ||
* (c) 2020 Niklas Higi | ||
* Released under the MIT License. | ||
@@ -370,7 +370,8 @@ */ | ||
} | ||
const { gamepad } = this; | ||
return { | ||
label: gpStick.label, | ||
query() { | ||
return new Vector2(gamepad.axes[gpStick.xAxis], gamepad.axes[gpStick.yAxis]); | ||
query: () => { | ||
if (!this.isConnected()) | ||
return new Vector2(0, 0); | ||
return new Vector2(this.gamepad.axes[gpStick.xAxis], this.gamepad.axes[gpStick.yAxis]); | ||
}, | ||
@@ -377,0 +378,0 @@ }; |
{ | ||
"name": "contro", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"description": "Game controls done right.", | ||
@@ -5,0 +5,0 @@ "main": "dist/contro.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38752
962