dualsense-ts 1.0.4 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -10
- package/dist/dualsense.js +43 -39
- package/dist/dualsense.js.map +1 -1
- package/dist/elements/accelerometer.js +5 -1
- package/dist/elements/accelerometer.js.map +1 -1
- package/dist/elements/analog.js +11 -7
- package/dist/elements/analog.js.map +1 -1
- package/dist/elements/axis.js +6 -2
- package/dist/elements/axis.js.map +1 -1
- package/dist/elements/dpad.js +11 -7
- package/dist/elements/dpad.js.map +1 -1
- package/dist/elements/gyroscope.js +5 -1
- package/dist/elements/gyroscope.js.map +1 -1
- package/dist/elements/index.js +27 -11
- package/dist/elements/index.js.map +1 -1
- package/dist/elements/momentary.js +6 -2
- package/dist/elements/momentary.js.map +1 -1
- package/dist/elements/motion.js +9 -5
- package/dist/elements/motion.js.map +1 -1
- package/dist/elements/mute.js +8 -4
- package/dist/elements/mute.js.map +1 -1
- package/dist/elements/touchpad.js +13 -9
- package/dist/elements/touchpad.js.map +1 -1
- package/dist/elements/trigger.js +10 -6
- package/dist/elements/trigger.js.map +1 -1
- package/dist/elements/unisense.js +14 -10
- package/dist/elements/unisense.js.map +1 -1
- package/dist/haptics/haptic.js +5 -1
- package/dist/haptics/haptic.js.map +1 -1
- package/dist/haptics/index.js +17 -1
- package/dist/haptics/index.js.map +1 -1
- package/dist/hid/command.js +2 -1
- package/dist/hid/dualsense_hid.js +10 -6
- package/dist/hid/dualsense_hid.js.map +1 -1
- package/dist/hid/ids.js +2 -1
- package/dist/hid/index.js +19 -3
- package/dist/hid/index.js.map +1 -1
- package/dist/index.js +23 -7
- package/dist/index.js.map +1 -1
- package/dist/indicators/index.js +17 -1
- package/dist/indicators/index.js.map +1 -1
- package/dist/indicators/indicator.js +5 -1
- package/dist/indicators/indicator.js.map +1 -1
- package/dist/input.js +22 -18
- package/dist/input.js.map +1 -1
- package/dist/math.js +2 -1
- package/package.json +1 -2
- package/tsconfig.json +1 -1
package/README.md
CHANGED
|
@@ -13,16 +13,6 @@ Install it using your preferred package manager:
|
|
|
13
13
|
- `yarn add dualsense-ts`
|
|
14
14
|
- `npm add dualsense-ts`
|
|
15
15
|
|
|
16
|
-
#### Heads up!
|
|
17
|
-
|
|
18
|
-
`dualsense-ts` is an ES module (esm), and uses ES import resolution. To use this module in Node.js, you'll need to take these steps:
|
|
19
|
-
|
|
20
|
-
1. Use Node.js v16+, or the `--experimental-modules` flag while invoking `node`
|
|
21
|
-
2. Use the `--experimental-specifier-resolution=node` flag while invoking `node`
|
|
22
|
-
3. Set `"type": "module"` in your `package.json`
|
|
23
|
-
|
|
24
|
-
(if you're familiar with a way to make the package more backwards-compatible, please help me out by opening a PR!)
|
|
25
|
-
|
|
26
16
|
### Connecting
|
|
27
17
|
|
|
28
18
|
By default, `dualsense-ts` will try to connect to the first Dualsense controller it finds.
|
package/dist/dualsense.js
CHANGED
|
@@ -1,74 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Dualsense = void 0;
|
|
4
|
+
const elements_1 = require("./elements");
|
|
5
|
+
const input_1 = require("./input");
|
|
6
|
+
const hid_1 = require("./hid");
|
|
7
|
+
class Dualsense extends input_1.Input {
|
|
5
8
|
constructor(params = {}) {
|
|
6
9
|
super(params);
|
|
7
10
|
this.state = this;
|
|
8
11
|
this.hid = null;
|
|
9
|
-
this.ps = new Momentary({
|
|
12
|
+
this.ps = new elements_1.Momentary({
|
|
10
13
|
icon: "㎰",
|
|
11
14
|
name: "Home",
|
|
12
15
|
...(params.ps || {}),
|
|
13
16
|
});
|
|
14
|
-
this.mute = new Mute({
|
|
17
|
+
this.mute = new elements_1.Mute({
|
|
15
18
|
icon: "🕩",
|
|
16
19
|
name: "Mute",
|
|
17
20
|
...(params.mute || {}),
|
|
18
21
|
});
|
|
19
|
-
this.options = new Momentary({
|
|
22
|
+
this.options = new elements_1.Momentary({
|
|
20
23
|
icon: "⋯",
|
|
21
24
|
name: "Options",
|
|
22
25
|
...(params.options || {}),
|
|
23
26
|
});
|
|
24
|
-
this.create = new Momentary({
|
|
27
|
+
this.create = new elements_1.Momentary({
|
|
25
28
|
icon: "🖉",
|
|
26
29
|
name: "Create",
|
|
27
30
|
...(params.create || {}),
|
|
28
31
|
});
|
|
29
|
-
this.triangle = new Momentary({
|
|
32
|
+
this.triangle = new elements_1.Momentary({
|
|
30
33
|
icon: "🟕",
|
|
31
34
|
name: "Triangle",
|
|
32
35
|
...(params.triangle || {}),
|
|
33
36
|
});
|
|
34
|
-
this.circle = new Momentary({
|
|
37
|
+
this.circle = new elements_1.Momentary({
|
|
35
38
|
icon: "⊚",
|
|
36
39
|
name: "Circle",
|
|
37
40
|
...(params.circle || {}),
|
|
38
41
|
});
|
|
39
|
-
this.cross = new Momentary({
|
|
42
|
+
this.cross = new elements_1.Momentary({
|
|
40
43
|
icon: "⮿",
|
|
41
44
|
name: "Cross",
|
|
42
45
|
...(params.cross || {}),
|
|
43
46
|
});
|
|
44
|
-
this.square = new Momentary({
|
|
47
|
+
this.square = new elements_1.Momentary({
|
|
45
48
|
icon: "🟗",
|
|
46
49
|
name: "Square",
|
|
47
50
|
...(params.square || {}),
|
|
48
51
|
});
|
|
49
|
-
this.dpad = new Dpad({
|
|
52
|
+
this.dpad = new elements_1.Dpad({
|
|
50
53
|
icon: "D",
|
|
51
54
|
name: "D-pad",
|
|
52
55
|
...(params.dpad || {}),
|
|
53
56
|
});
|
|
54
|
-
this.left = new Unisense({
|
|
57
|
+
this.left = new elements_1.Unisense({
|
|
55
58
|
icon: "L",
|
|
56
59
|
name: "Left",
|
|
57
60
|
...(params.left || {}),
|
|
58
61
|
});
|
|
59
|
-
this.right = new Unisense({
|
|
62
|
+
this.right = new elements_1.Unisense({
|
|
60
63
|
icon: "R",
|
|
61
64
|
name: "Right",
|
|
62
65
|
...(params.right || {}),
|
|
63
66
|
});
|
|
64
|
-
this.touchpad = new Touchpad({
|
|
67
|
+
this.touchpad = new elements_1.Touchpad({
|
|
65
68
|
icon: "⎚",
|
|
66
69
|
name: "Touchpad",
|
|
67
70
|
...(params.touchpad || {}),
|
|
68
71
|
});
|
|
69
72
|
const { hid } = params;
|
|
70
73
|
if (hid !== null)
|
|
71
|
-
this.hid = hid ? hid : new DualsenseHID();
|
|
74
|
+
this.hid = hid ? hid : new hid_1.DualsenseHID();
|
|
72
75
|
if (this.hid) {
|
|
73
76
|
this.hid.on("input", () => {
|
|
74
77
|
this.processHID();
|
|
@@ -76,32 +79,33 @@ export class Dualsense extends Input {
|
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
81
|
get active() {
|
|
79
|
-
return Object.values(this).some((input) => input instanceof Input && input !== this && input.active);
|
|
82
|
+
return Object.values(this).some((input) => input instanceof input_1.Input && input !== this && input.active);
|
|
80
83
|
}
|
|
81
84
|
processHID() {
|
|
82
85
|
if (!this.hid)
|
|
83
86
|
return;
|
|
84
|
-
this.ps[InputSet](this.hid.state["Playstation" /* Playstation */]);
|
|
85
|
-
this.options[InputSet](this.hid.state["Options" /* Options */]);
|
|
86
|
-
this.mute[InputSet](this.hid.state["Mute" /* Mute */]);
|
|
87
|
-
this.create[InputSet](this.hid.state["Create" /* Create */]);
|
|
88
|
-
this.triangle[InputSet](this.hid.state["Triangle" /* Triangle */]);
|
|
89
|
-
this.circle[InputSet](this.hid.state["Circle" /* Circle */]);
|
|
90
|
-
this.cross[InputSet](this.hid.state["Cross" /* Cross */]);
|
|
91
|
-
this.square[InputSet](this.hid.state["Square" /* Square */]);
|
|
92
|
-
this.dpad.up[InputSet](this.hid.state["Up" /* Up */]);
|
|
93
|
-
this.dpad.down[InputSet](this.hid.state["Down" /* Down */]);
|
|
94
|
-
this.dpad.right[InputSet](this.hid.state["Right" /* Right */]);
|
|
95
|
-
this.dpad.left[InputSet](this.hid.state["Left" /* Left */]);
|
|
96
|
-
this.touchpad.button[InputSet](this.hid.state["TouchpadButton" /* TouchpadButton */]);
|
|
97
|
-
this.left.analog.x[InputSet](this.hid.state["LX" /* LeftAnalogX */]);
|
|
98
|
-
this.left.analog.y[InputSet](this.hid.state["LY" /* LeftAnalogY */]);
|
|
99
|
-
this.right.analog.x[InputSet](this.hid.state["RX" /* RightAnalogX */]);
|
|
100
|
-
this.right.analog.y[InputSet](this.hid.state["RY" /* RightAnalogY */]);
|
|
101
|
-
this.left.trigger[InputSet](this.hid.state["L2" /* LeftTrigger */]);
|
|
102
|
-
this.right.trigger[InputSet](this.hid.state["R2" /* RightTrigger */]);
|
|
103
|
-
this.left.trigger.button[InputSet](this.hid.state["L2Button" /* LeftTriggerButton */]);
|
|
104
|
-
this.right.trigger.button[InputSet](this.hid.state["R2Button" /* RightTriggerButton */]);
|
|
87
|
+
this.ps[input_1.InputSet](this.hid.state["Playstation" /* Playstation */]);
|
|
88
|
+
this.options[input_1.InputSet](this.hid.state["Options" /* Options */]);
|
|
89
|
+
this.mute[input_1.InputSet](this.hid.state["Mute" /* Mute */]);
|
|
90
|
+
this.create[input_1.InputSet](this.hid.state["Create" /* Create */]);
|
|
91
|
+
this.triangle[input_1.InputSet](this.hid.state["Triangle" /* Triangle */]);
|
|
92
|
+
this.circle[input_1.InputSet](this.hid.state["Circle" /* Circle */]);
|
|
93
|
+
this.cross[input_1.InputSet](this.hid.state["Cross" /* Cross */]);
|
|
94
|
+
this.square[input_1.InputSet](this.hid.state["Square" /* Square */]);
|
|
95
|
+
this.dpad.up[input_1.InputSet](this.hid.state["Up" /* Up */]);
|
|
96
|
+
this.dpad.down[input_1.InputSet](this.hid.state["Down" /* Down */]);
|
|
97
|
+
this.dpad.right[input_1.InputSet](this.hid.state["Right" /* Right */]);
|
|
98
|
+
this.dpad.left[input_1.InputSet](this.hid.state["Left" /* Left */]);
|
|
99
|
+
this.touchpad.button[input_1.InputSet](this.hid.state["TouchpadButton" /* TouchpadButton */]);
|
|
100
|
+
this.left.analog.x[input_1.InputSet](this.hid.state["LX" /* LeftAnalogX */]);
|
|
101
|
+
this.left.analog.y[input_1.InputSet](this.hid.state["LY" /* LeftAnalogY */]);
|
|
102
|
+
this.right.analog.x[input_1.InputSet](this.hid.state["RX" /* RightAnalogX */]);
|
|
103
|
+
this.right.analog.y[input_1.InputSet](this.hid.state["RY" /* RightAnalogY */]);
|
|
104
|
+
this.left.trigger[input_1.InputSet](this.hid.state["L2" /* LeftTrigger */]);
|
|
105
|
+
this.right.trigger[input_1.InputSet](this.hid.state["R2" /* RightTrigger */]);
|
|
106
|
+
this.left.trigger.button[input_1.InputSet](this.hid.state["L2Button" /* LeftTriggerButton */]);
|
|
107
|
+
this.right.trigger.button[input_1.InputSet](this.hid.state["R2Button" /* RightTriggerButton */]);
|
|
105
108
|
}
|
|
106
109
|
}
|
|
110
|
+
exports.Dualsense = Dualsense;
|
|
107
111
|
//# sourceMappingURL=dualsense.js.map
|
package/dist/dualsense.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dualsense.js","sourceRoot":"","sources":["../src/dualsense.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"dualsense.js","sourceRoot":"","sources":["../src/dualsense.ts"],"names":[],"mappings":";;;AAAA,yCAQoB;AACpB,mCAAuD;AACvD,+BAA8C;AAoB9C,MAAa,SAAU,SAAQ,aAAgB;IA8B7C,YAAY,SAA0B,EAAE;QACtC,KAAK,CAAC,MAAM,CAAC,CAAC;QA9BA,UAAK,GAAc,IAAI,CAAC;QAoBxB,QAAG,GAAwB,IAAI,CAAC;QAY9C,IAAI,CAAC,EAAE,GAAG,IAAI,oBAAS,CAAC;YACtB,IAAI,EAAE,GAAG;YACT,IAAI,EAAE,MAAM;YACZ,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;SACrB,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,IAAI,eAAI,CAAC;YACnB,IAA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+
{"version":3,"file":"accelerometer.js","sourceRoot":"","sources":["../../src/elements/accelerometer.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAa;CAAG;AAA7B,sCAA6B"}
|
package/dist/elements/analog.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Analog = void 0;
|
|
4
|
+
const axis_1 = require("./axis");
|
|
5
|
+
const momentary_1 = require("./momentary");
|
|
6
|
+
const input_1 = require("../input");
|
|
4
7
|
/**
|
|
5
8
|
* Represents an analog joystick.
|
|
6
9
|
*
|
|
@@ -9,13 +12,13 @@ import { Input } from "../input";
|
|
|
9
12
|
* - Pushed all the way to the right, the stick's coordinates are [1,0]
|
|
10
13
|
* - Pushed all the way down and to the left, the stick's coordinates are [-1, -1]
|
|
11
14
|
*/
|
|
12
|
-
|
|
15
|
+
class Analog extends input_1.Input {
|
|
13
16
|
constructor(params) {
|
|
14
17
|
super(params);
|
|
15
18
|
this.state = this;
|
|
16
|
-
this.button = new Momentary(params?.button || { icon: "3", name: "Button" });
|
|
17
|
-
this.x = new Axis(params?.x || { icon: "↔", name: "X" });
|
|
18
|
-
this.y = new Axis(params?.y || { icon: "↕", name: "Y" });
|
|
19
|
+
this.button = new momentary_1.Momentary(params?.button || { icon: "3", name: "Button" });
|
|
20
|
+
this.x = new axis_1.Axis(params?.x || { icon: "↔", name: "X" });
|
|
21
|
+
this.y = new axis_1.Axis(params?.y || { icon: "↕", name: "Y" });
|
|
19
22
|
}
|
|
20
23
|
// Returns true if the stick is away from the idle position, or the button is pressed.
|
|
21
24
|
get active() {
|
|
@@ -54,4 +57,5 @@ export class Analog extends Input {
|
|
|
54
57
|
return this.directionDegrees;
|
|
55
58
|
}
|
|
56
59
|
}
|
|
60
|
+
exports.Analog = Analog;
|
|
57
61
|
//# sourceMappingURL=analog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analog.js","sourceRoot":"","sources":["../../src/elements/analog.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"analog.js","sourceRoot":"","sources":["../../src/elements/analog.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAC9B,2CAAwC;AACxC,oCAA8C;AAU9C;;;;;;;GAOG;AACH,MAAa,MAAO,SAAQ,aAAa;IAOvC,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;QAPA,UAAK,GAAW,IAAI,CAAC;QASnC,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAS,CACzB,MAAM,EAAE,MAAM,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAChD,CAAC;QACF,IAAI,CAAC,CAAC,GAAG,IAAI,WAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,CAAC,GAAG,IAAI,WAAI,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,sFAAsF;IACtF,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IAC/D,CAAC;IAED,uEAAuE;IACvE,IAAW,MAAM;QACf,OAAO,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC;IAClE,CAAC;IAED,iDAAiD;IACjD,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,gEAAgE;IAChE,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED,yBAAyB;IACzB,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,yBAAyB;IACzB,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,+CAA+C;IAC/C,IAAW,gBAAgB;QACzB,OAAO,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;IAC1C,CAAC;IAED,iCAAiC;IACjC,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED,iCAAiC;IACjC,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CACF;AA7DD,wBA6DC"}
|
package/dist/elements/axis.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Axis = void 0;
|
|
4
|
+
const input_1 = require("../input");
|
|
5
|
+
class Axis extends input_1.Input {
|
|
3
6
|
constructor() {
|
|
4
7
|
super(...arguments);
|
|
5
8
|
this.state = 0;
|
|
@@ -20,4 +23,5 @@ export class Axis extends Input {
|
|
|
20
23
|
return this.state !== state;
|
|
21
24
|
}
|
|
22
25
|
}
|
|
26
|
+
exports.Axis = Axis;
|
|
23
27
|
//# sourceMappingURL=axis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axis.js","sourceRoot":"","sources":["../../src/elements/axis.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"axis.js","sourceRoot":"","sources":["../../src/elements/axis.ts"],"names":[],"mappings":";;;AAAA,oCAAiC;AAGjC,MAAa,IAAK,SAAQ,aAAY;IAAtC;;QACS,UAAK,GAAU,CAAC,CAAC;QAEjB,aAAQ,GAAc,KAAK,CAAC;IAkBrC,CAAC;IAhBC,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC;IACxC,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAEM,OAAO,CAAC,KAAgB;QAC7B,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAClE,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;IAC9B,CAAC;CACF;AArBD,oBAqBC"}
|
package/dist/elements/dpad.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Dpad = void 0;
|
|
4
|
+
const momentary_1 = require("./momentary");
|
|
5
|
+
const input_1 = require("../input");
|
|
6
|
+
class Dpad extends input_1.Input {
|
|
4
7
|
constructor(params) {
|
|
5
8
|
super(params);
|
|
6
9
|
this.state = this;
|
|
7
|
-
this.up = new Momentary(params?.up || { icon: "⮉", name: "Up" });
|
|
8
|
-
this.down = new Momentary(params?.down || { icon: "⮋", name: "Down" });
|
|
9
|
-
this.left = new Momentary(params?.left || { icon: "⮈", name: "Left" });
|
|
10
|
-
this.right = new Momentary(params?.right || { icon: "⮊", name: "Right" });
|
|
10
|
+
this.up = new momentary_1.Momentary(params?.up || { icon: "⮉", name: "Up" });
|
|
11
|
+
this.down = new momentary_1.Momentary(params?.down || { icon: "⮋", name: "Down" });
|
|
12
|
+
this.left = new momentary_1.Momentary(params?.left || { icon: "⮈", name: "Left" });
|
|
13
|
+
this.right = new momentary_1.Momentary(params?.right || { icon: "⮊", name: "Right" });
|
|
11
14
|
}
|
|
12
15
|
get active() {
|
|
13
16
|
return (this.up.active ||
|
|
@@ -16,4 +19,5 @@ export class Dpad extends Input {
|
|
|
16
19
|
this.right.active);
|
|
17
20
|
}
|
|
18
21
|
}
|
|
22
|
+
exports.Dpad = Dpad;
|
|
19
23
|
//# sourceMappingURL=dpad.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dpad.js","sourceRoot":"","sources":["../../src/elements/dpad.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"dpad.js","sourceRoot":"","sources":["../../src/elements/dpad.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,oCAA8C;AAS9C,MAAa,IAAK,SAAQ,aAAW;IAQnC,YAAY,MAAmB;QAC7B,KAAK,CAAC,MAAM,CAAC,CAAC;QARA,UAAK,GAAS,IAAI,CAAC;QAUjC,IAAI,CAAC,EAAE,GAAG,IAAI,qBAAS,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACjE,IAAI,CAAC,IAAI,GAAG,IAAI,qBAAS,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QACvE,IAAI,CAAC,IAAI,GAAG,IAAI,qBAAS,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QACvE,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAS,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,IAAW,MAAM;QACf,OAAO,CACL,IAAI,CAAC,EAAE,CAAC,MAAM;YACd,IAAI,CAAC,IAAI,CAAC,MAAM;YAChB,IAAI,CAAC,IAAI,CAAC,MAAM;YAChB,IAAI,CAAC,KAAK,CAAC,MAAM,CAClB,CAAC;IACJ,CAAC;CACF;AAzBD,oBAyBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gyroscope.js","sourceRoot":"","sources":["../../src/elements/gyroscope.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"gyroscope.js","sourceRoot":"","sources":["../../src/elements/gyroscope.ts"],"names":[],"mappings":";;;AAAA,MAAa,SAAS;CAAG;AAAzB,8BAAyB"}
|
package/dist/elements/index.js
CHANGED
|
@@ -1,15 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* @file Automatically generated by barrelsby.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./accelerometer"), exports);
|
|
21
|
+
__exportStar(require("./analog"), exports);
|
|
22
|
+
__exportStar(require("./axis"), exports);
|
|
23
|
+
__exportStar(require("./dpad"), exports);
|
|
24
|
+
__exportStar(require("./gyroscope"), exports);
|
|
25
|
+
__exportStar(require("./momentary"), exports);
|
|
26
|
+
__exportStar(require("./motion"), exports);
|
|
27
|
+
__exportStar(require("./mute"), exports);
|
|
28
|
+
__exportStar(require("./touchpad"), exports);
|
|
29
|
+
__exportStar(require("./trigger"), exports);
|
|
30
|
+
__exportStar(require("./unisense"), exports);
|
|
15
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/elements/index.ts"],"names":[],"mappings":"AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/elements/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,kDAAgC;AAChC,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,8CAA4B;AAC5B,8CAA4B;AAC5B,2CAAyB;AACzB,yCAAuB;AACvB,6CAA2B;AAC3B,4CAA0B;AAC1B,6CAA2B"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Momentary = void 0;
|
|
4
|
+
const input_1 = require("../input");
|
|
5
|
+
class Momentary extends input_1.Input {
|
|
3
6
|
constructor() {
|
|
4
7
|
super(...arguments);
|
|
5
8
|
this.state = false;
|
|
@@ -8,4 +11,5 @@ export class Momentary extends Input {
|
|
|
8
11
|
return this.state;
|
|
9
12
|
}
|
|
10
13
|
}
|
|
14
|
+
exports.Momentary = Momentary;
|
|
11
15
|
//# sourceMappingURL=momentary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"momentary.js","sourceRoot":"","sources":["../../src/elements/momentary.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"momentary.js","sourceRoot":"","sources":["../../src/elements/momentary.ts"],"names":[],"mappings":";;;AAAA,oCAAiC;AAEjC,MAAa,SAAU,SAAQ,aAAc;IAA7C;;QACS,UAAK,GAAY,KAAK,CAAC;IAKhC,CAAC;IAHC,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAND,8BAMC"}
|
package/dist/elements/motion.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Motion = void 0;
|
|
4
|
+
const gyroscope_1 = require("./gyroscope");
|
|
5
|
+
const accelerometer_1 = require("./accelerometer");
|
|
6
|
+
class Motion {
|
|
4
7
|
constructor() {
|
|
5
|
-
this.gyroscope = new Gyroscope();
|
|
6
|
-
this.accelerometer = new Accelerometer();
|
|
8
|
+
this.gyroscope = new gyroscope_1.Gyroscope();
|
|
9
|
+
this.accelerometer = new accelerometer_1.Accelerometer();
|
|
7
10
|
}
|
|
8
11
|
}
|
|
12
|
+
exports.Motion = Motion;
|
|
9
13
|
//# sourceMappingURL=motion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion.js","sourceRoot":"","sources":["../../src/elements/motion.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"motion.js","sourceRoot":"","sources":["../../src/elements/motion.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,mDAAgD;AAEhD,MAAa,MAAM;IAAnB;QACkB,cAAS,GAAG,IAAI,qBAAS,EAAE,CAAC;QAC5B,kBAAa,GAAG,IAAI,6BAAa,EAAE,CAAC;IACtD,CAAC;CAAA;AAHD,wBAGC"}
|
package/dist/elements/mute.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Mute = void 0;
|
|
4
|
+
const momentary_1 = require("./momentary");
|
|
5
|
+
const indicators_1 = require("../indicators");
|
|
6
|
+
class Mute extends momentary_1.Momentary {
|
|
4
7
|
constructor() {
|
|
5
8
|
super(...arguments);
|
|
6
|
-
this.indicator = new Indicator();
|
|
9
|
+
this.indicator = new indicators_1.Indicator();
|
|
7
10
|
}
|
|
8
11
|
}
|
|
12
|
+
exports.Mute = Mute;
|
|
9
13
|
//# sourceMappingURL=mute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mute.js","sourceRoot":"","sources":["../../src/elements/mute.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"mute.js","sourceRoot":"","sources":["../../src/elements/mute.ts"],"names":[],"mappings":";;;AAAA,2CAAwC;AACxC,8CAA0C;AAE1C,MAAa,IAAK,SAAQ,qBAAS;IAAnC;;QACkB,cAAS,GAAG,IAAI,sBAAS,EAAE,CAAC;IAC9C,CAAC;CAAA;AAFD,oBAEC"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Touchpad = void 0;
|
|
4
|
+
const axis_1 = require("./axis");
|
|
5
|
+
const momentary_1 = require("./momentary");
|
|
6
|
+
const input_1 = require("../input");
|
|
7
|
+
class Touchpad extends input_1.Input {
|
|
5
8
|
constructor(params) {
|
|
6
9
|
super(params);
|
|
7
10
|
this.state = this;
|
|
8
11
|
this.direction = 0;
|
|
9
|
-
this.button = new Momentary({ icon: "[__]" });
|
|
10
|
-
this.x1 = new Axis({ icon: "[X1]" });
|
|
11
|
-
this.y1 = new Axis({ icon: "[Y1]" });
|
|
12
|
-
this.x2 = new Axis({ icon: "[X2]" });
|
|
13
|
-
this.y2 = new Axis({ icon: "[Y2]" });
|
|
12
|
+
this.button = new momentary_1.Momentary({ icon: "[__]" });
|
|
13
|
+
this.x1 = new axis_1.Axis({ icon: "[X1]" });
|
|
14
|
+
this.y1 = new axis_1.Axis({ icon: "[Y1]" });
|
|
15
|
+
this.x2 = new axis_1.Axis({ icon: "[X2]" });
|
|
16
|
+
this.y2 = new axis_1.Axis({ icon: "[Y2]" });
|
|
14
17
|
}
|
|
15
18
|
get active() {
|
|
16
19
|
return (this.x1.active ||
|
|
@@ -20,4 +23,5 @@ export class Touchpad extends Input {
|
|
|
20
23
|
this.button.active);
|
|
21
24
|
}
|
|
22
25
|
}
|
|
26
|
+
exports.Touchpad = Touchpad;
|
|
23
27
|
//# sourceMappingURL=touchpad.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"touchpad.js","sourceRoot":"","sources":["../../src/elements/touchpad.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"touchpad.js","sourceRoot":"","sources":["../../src/elements/touchpad.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAC9B,2CAAwC;AACxC,oCAA8C;AAE9C,MAAa,QAAS,SAAQ,aAAe;IAmB3C,YAAY,MAAmB;QAC7B,KAAK,CAAC,MAAM,CAAC,CAAC;QAnBA,UAAK,GAAa,IAAI,CAAC;QAgCvB,cAAS,GAAW,CAAC,CAAC;QAXpC,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAE9C,IAAI,CAAC,EAAE,GAAG,IAAI,WAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAErC,IAAI,CAAC,EAAE,GAAG,IAAI,WAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAErC,IAAI,CAAC,EAAE,GAAG,IAAI,WAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAErC,IAAI,CAAC,EAAE,GAAG,IAAI,WAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACvC,CAAC;IA5BD,IAAW,MAAM;QACf,OAAO,CACL,IAAI,CAAC,EAAE,CAAC,MAAM;YACd,IAAI,CAAC,EAAE,CAAC,MAAM;YACd,IAAI,CAAC,EAAE,CAAC,MAAM;YACd,IAAI,CAAC,EAAE,CAAC,MAAM;YACd,IAAI,CAAC,MAAM,CAAC,MAAM,CACnB,CAAC;IACJ,CAAC;CAuBF;AAlCD,4BAkCC"}
|
package/dist/elements/trigger.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Trigger = void 0;
|
|
4
|
+
const haptics_1 = require("../haptics");
|
|
5
|
+
const input_1 = require("../input");
|
|
6
|
+
const momentary_1 = require("./momentary");
|
|
7
|
+
class Trigger extends input_1.Input {
|
|
5
8
|
constructor() {
|
|
6
9
|
super(...arguments);
|
|
7
10
|
this.state = 0;
|
|
8
|
-
this.button = new Momentary({});
|
|
9
|
-
this.haptic = new Haptic();
|
|
11
|
+
this.button = new momentary_1.Momentary({});
|
|
12
|
+
this.haptic = new haptics_1.Haptic();
|
|
10
13
|
}
|
|
11
14
|
get active() {
|
|
12
15
|
return this.state > 0;
|
|
@@ -21,4 +24,5 @@ export class Trigger extends Input {
|
|
|
21
24
|
return this.state !== state;
|
|
22
25
|
}
|
|
23
26
|
}
|
|
27
|
+
exports.Trigger = Trigger;
|
|
24
28
|
//# sourceMappingURL=trigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../src/elements/trigger.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"trigger.js","sourceRoot":"","sources":["../../src/elements/trigger.ts"],"names":[],"mappings":";;;AAAA,wCAAoC;AACpC,oCAAiC;AAEjC,2CAAwC;AAExC,MAAa,OAAQ,SAAQ,aAAgB;IAA7C;;QACS,UAAK,GAAc,CAAC,CAAC;QAErB,WAAM,GAAc,IAAI,qBAAS,CAAC,EAAE,CAAC,CAAC;QAkB7B,WAAM,GAAG,IAAI,gBAAM,EAAE,CAAC;IACxC,CAAC;IAjBC,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACxB,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAEM,OAAO,CAAC,KAAgB;QAC7B,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;IAC9B,CAAC;CAGF;AAtBD,0BAsBC"}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Unisense = void 0;
|
|
4
|
+
const trigger_1 = require("./trigger");
|
|
5
|
+
const momentary_1 = require("./momentary");
|
|
6
|
+
const analog_1 = require("./analog");
|
|
7
|
+
const haptics_1 = require("../haptics");
|
|
8
|
+
const input_1 = require("../input");
|
|
6
9
|
// The name "Dualsense" clearly implies a composition of two Unisense elements 🤔
|
|
7
|
-
|
|
10
|
+
class Unisense extends input_1.Input {
|
|
8
11
|
constructor(params) {
|
|
9
12
|
super(params);
|
|
10
13
|
this.state = this;
|
|
11
|
-
this.trigger = new Trigger(params?.trigger || { icon: "2", name: "Trigger" });
|
|
12
|
-
this.bumper = new Momentary(params?.bumper || { icon: "1", name: "Bumper" });
|
|
13
|
-
this.analog = new Analog(params?.analog || { icon: "⨁", name: "Analog" });
|
|
14
|
-
this.haptic = new Haptic();
|
|
14
|
+
this.trigger = new trigger_1.Trigger(params?.trigger || { icon: "2", name: "Trigger" });
|
|
15
|
+
this.bumper = new momentary_1.Momentary(params?.bumper || { icon: "1", name: "Bumper" });
|
|
16
|
+
this.analog = new analog_1.Analog(params?.analog || { icon: "⨁", name: "Analog" });
|
|
17
|
+
this.haptic = new haptics_1.Haptic();
|
|
15
18
|
}
|
|
16
19
|
get active() {
|
|
17
20
|
return this.trigger.active || this.bumper.active || this.analog.active;
|
|
18
21
|
}
|
|
19
22
|
}
|
|
23
|
+
exports.Unisense = Unisense;
|
|
20
24
|
//# sourceMappingURL=unisense.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unisense.js","sourceRoot":"","sources":["../../src/elements/unisense.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"unisense.js","sourceRoot":"","sources":["../../src/elements/unisense.ts"],"names":[],"mappings":";;;AAAA,uCAAoC;AACpC,2CAAwC;AACxC,qCAAkC;AAClC,wCAAoC;AACpC,oCAA8C;AAQ9C,iFAAiF;AACjF,MAAa,QAAS,SAAQ,aAAe;IAQ3C,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,CAAC,CAAC;QARA,UAAK,GAAa,IAAI,CAAC;QAUrC,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,CACxB,MAAM,EAAE,OAAO,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAClD,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAS,CACzB,MAAM,EAAE,MAAM,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAChD,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,MAAM,GAAG,IAAI,gBAAM,EAAE,CAAC;IAC7B,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;IACzE,CAAC;CACF;AAxBD,4BAwBC"}
|
package/dist/haptics/haptic.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Haptic = void 0;
|
|
4
|
+
class Haptic {
|
|
2
5
|
constructor() {
|
|
3
6
|
this.vibration = 0;
|
|
4
7
|
}
|
|
5
8
|
}
|
|
9
|
+
exports.Haptic = Haptic;
|
|
6
10
|
//# sourceMappingURL=haptic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"haptic.js","sourceRoot":"","sources":["../../src/haptics/haptic.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"haptic.js","sourceRoot":"","sources":["../../src/haptics/haptic.ts"],"names":[],"mappings":";;;AAEA,MAAa,MAAM;IAAnB;QACkB,cAAS,GAAc,CAAC,CAAC;IAC3C,CAAC;CAAA;AAFD,wBAEC"}
|
package/dist/haptics/index.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* @file Automatically generated by barrelsby.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./haptic"), exports);
|
|
5
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/haptics/index.ts"],"names":[],"mappings":"AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/haptics/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,2CAAyB"}
|
package/dist/hid/command.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DualsenseHID = void 0;
|
|
4
|
+
const node_hid_1 = require("node-hid");
|
|
5
|
+
const events_1 = require("events");
|
|
6
|
+
class DualsenseHID extends events_1.EventEmitter {
|
|
4
7
|
constructor() {
|
|
5
8
|
super();
|
|
6
9
|
this.state = {
|
|
@@ -89,16 +92,17 @@ export class DualsenseHID extends EventEmitter {
|
|
|
89
92
|
}
|
|
90
93
|
connect() {
|
|
91
94
|
this.disconnect();
|
|
92
|
-
const controllers = devices(DualsenseHID.vendorId, DualsenseHID.productId);
|
|
95
|
+
const controllers = (0, node_hid_1.devices)(DualsenseHID.vendorId, DualsenseHID.productId);
|
|
93
96
|
if (!controllers[0]?.path) {
|
|
94
|
-
throw new Error(`No controllers (${devices().length} other devices)`);
|
|
97
|
+
throw new Error(`No controllers (${(0, node_hid_1.devices)().length} other devices)`);
|
|
95
98
|
}
|
|
96
|
-
const controller = new HID(controllers[0].path);
|
|
99
|
+
const controller = new node_hid_1.HID(controllers[0].path);
|
|
97
100
|
controller.on("data", this.process.bind(this));
|
|
98
101
|
controller.on("error", this.handleError.bind(this));
|
|
99
102
|
return controller;
|
|
100
103
|
}
|
|
101
104
|
}
|
|
105
|
+
exports.DualsenseHID = DualsenseHID;
|
|
102
106
|
DualsenseHID.vendorId = 1356;
|
|
103
107
|
DualsenseHID.productId = 3302;
|
|
104
108
|
//# sourceMappingURL=dualsense_hid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dualsense_hid.js","sourceRoot":"","sources":["../../src/hid/dualsense_hid.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"dualsense_hid.js","sourceRoot":"","sources":["../../src/hid/dualsense_hid.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AACxC,mCAAsC;AAoCtC,MAAa,YAAa,SAAQ,qBAAY;IAsC5C;QACE,KAAK,EAAE,CAAC;QAtCH,UAAK,GAAsB;YAChC,wBAAqB,EAAE,CAAC;YACxB,wBAAqB,EAAE,CAAC;YACxB,yBAAsB,EAAE,CAAC;YACzB,yBAAsB,EAAE,CAAC;YACzB,wBAAqB,EAAE,CAAC;YACxB,yBAAsB,EAAE,CAAC;YACzB,2BAAkB,EAAE,KAAK;YACzB,uBAAgB,EAAE,KAAK;YACvB,qBAAe,EAAE,KAAK;YACtB,uBAAgB,EAAE,KAAK;YACvB,eAAY,EAAE,KAAK;YACnB,mBAAc,EAAE,KA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MAAM,UAAU,GAAG,IAAI,cAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAChD,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/C,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACpD,OAAO,UAAU,CAAC;IACpB,CAAC;;AA9GH,oCA+GC;AA5EiB,qBAAQ,GAAW,IAAI,CAAC;AACxB,sBAAS,GAAW,IAAI,CAAC"}
|
package/dist/hid/ids.js
CHANGED
package/dist/hid/index.js
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* @file Automatically generated by barrelsby.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./command"), exports);
|
|
21
|
+
__exportStar(require("./dualsense_hid"), exports);
|
|
22
|
+
__exportStar(require("./ids"), exports);
|
|
7
23
|
//# sourceMappingURL=index.js.map
|
package/dist/hid/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hid/index.ts"],"names":[],"mappings":"AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hid/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,4CAA0B;AAC1B,kDAAgC;AAChC,wCAAsB"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* @file Automatically generated by barrelsby.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./dualsense"), exports);
|
|
21
|
+
__exportStar(require("./input"), exports);
|
|
22
|
+
__exportStar(require("./math"), exports);
|
|
23
|
+
__exportStar(require("./elements/index"), exports);
|
|
24
|
+
__exportStar(require("./haptics/index"), exports);
|
|
25
|
+
__exportStar(require("./hid/index"), exports);
|
|
26
|
+
__exportStar(require("./indicators/index"), exports);
|
|
11
27
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,mDAAiC;AACjC,kDAAgC;AAChC,8CAA4B;AAC5B,qDAAmC"}
|
package/dist/indicators/index.js
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* @file Automatically generated by barrelsby.
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
__exportStar(require("./indicator"), exports);
|
|
5
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/indicators/index.ts"],"names":[],"mappings":"AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/indicators/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,8CAA4B"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Indicator = void 0;
|
|
4
|
+
class Indicator {
|
|
2
5
|
constructor() {
|
|
3
6
|
this.brightness = 0;
|
|
4
7
|
}
|
|
@@ -15,4 +18,5 @@ export class Indicator {
|
|
|
15
18
|
controller.write(command);
|
|
16
19
|
}
|
|
17
20
|
}
|
|
21
|
+
exports.Indicator = Indicator;
|
|
18
22
|
//# sourceMappingURL=indicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indicator.js","sourceRoot":"","sources":["../../src/indicators/indicator.ts"],"names":[],"mappings":"AAIA,
|
|
1
|
+
{"version":3,"file":"indicator.js","sourceRoot":"","sources":["../../src/indicators/indicator.ts"],"names":[],"mappings":";;;AAIA,MAAa,SAAS;IAAtB;QACkB,eAAU,GAAc,CAAC,CAAC;IAmB5C,CAAC;IAjBQ,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAa,EAAE,UAAe;QACpD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAEpC,MAAM,KAAK,GAAsC;YAC/C,CAAC,GAAG,EAAE,CAAC,CAAC;YACR,CAAC,GAAG,EAAE,CAAC,CAAC;YACR,CAAC,CAAC,EAAE,EAAE,CAAC;YACP,CAAC,CAAC,EAAE,EAAE,CAAC;YACP,CAAC,CAAC,EAAE,EAAE,CAAC;SACR,CAAC;QAEF,KAAK,CAAC,OAAO,CAAC,CAAC,IAAqC,EAAE,EAAE,CACtD,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAC3B,CAAC;QAEF,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC;CACF;AApBD,8BAoBC"}
|
package/dist/input.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var _a;
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Input = exports.InputIcon = exports.InputName = exports.InputSet = exports.InputChanged = void 0;
|
|
5
|
+
const events_1 = require("events");
|
|
6
|
+
const util_1 = require("util");
|
|
4
7
|
const InputDefaults = {
|
|
5
8
|
name: "???",
|
|
6
9
|
icon: "???",
|
|
@@ -15,16 +18,16 @@ const InputChangedPrimitive = Symbol("InputChangedPrimitive");
|
|
|
15
18
|
const InputChangedThreshold = Symbol("InputChangedThreshold");
|
|
16
19
|
const InputChangedVirtual = Symbol("InputChangedVirtual");
|
|
17
20
|
// Optional abstract properties
|
|
18
|
-
|
|
21
|
+
exports.InputChanged = Symbol("InputChanged");
|
|
19
22
|
// Utilities
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
exports.InputSet = Symbol("InputSet");
|
|
24
|
+
exports.InputName = Symbol("InputName");
|
|
25
|
+
exports.InputIcon = Symbol("InputIcon");
|
|
23
26
|
/**
|
|
24
27
|
* Input manages the state of a single device input,
|
|
25
28
|
* a virtual input, or a group of Input children.
|
|
26
29
|
*/
|
|
27
|
-
|
|
30
|
+
class Input extends events_1.EventEmitter {
|
|
28
31
|
constructor(params) {
|
|
29
32
|
super();
|
|
30
33
|
// Timestamp of the last received input that changed the state.
|
|
@@ -38,11 +41,11 @@ export class Input extends EventEmitter {
|
|
|
38
41
|
...InputDefaults,
|
|
39
42
|
...(params || {}),
|
|
40
43
|
};
|
|
41
|
-
this[InputName] = name;
|
|
42
|
-
this[InputIcon] = icon;
|
|
44
|
+
this[exports.InputName] = name;
|
|
45
|
+
this[exports.InputIcon] = icon;
|
|
43
46
|
this[InputParent] = parent;
|
|
44
47
|
this.threshold = threshold;
|
|
45
|
-
this.id = Symbol(this[InputName]);
|
|
48
|
+
this.id = Symbol(this[exports.InputName]);
|
|
46
49
|
this[InputSetComparison]();
|
|
47
50
|
setImmediate(() => {
|
|
48
51
|
this[InputAdopt]();
|
|
@@ -71,11 +74,11 @@ export class Input extends EventEmitter {
|
|
|
71
74
|
* Render a convenient debugging string.
|
|
72
75
|
*/
|
|
73
76
|
toString() {
|
|
74
|
-
return `${this[InputIcon]} [${this.active ? "X" : "_"}]`;
|
|
77
|
+
return `${this[exports.InputIcon]} [${this.active ? "X" : "_"}]`;
|
|
75
78
|
}
|
|
76
79
|
// TODO Support params for nested inputs
|
|
77
|
-
[inspect.custom]() {
|
|
78
|
-
return `${this[InputName]} ${this[InputIcon]}: ${JSON.stringify(this.state instanceof Input && this.state.id === this.id
|
|
80
|
+
[util_1.inspect.custom]() {
|
|
81
|
+
return `${this[exports.InputName]} ${this[exports.InputIcon]}: ${JSON.stringify(this.state instanceof Input && this.state.id === this.id
|
|
79
82
|
? "virtual"
|
|
80
83
|
: this.state)}`;
|
|
81
84
|
}
|
|
@@ -127,21 +130,21 @@ export class Input extends EventEmitter {
|
|
|
127
130
|
// Sets a default comparison type for the Input based on the generic type.
|
|
128
131
|
[InputSetComparison]() {
|
|
129
132
|
if (typeof this.state === "number") {
|
|
130
|
-
this[InputChanged] = this[InputChangedThreshold];
|
|
133
|
+
this[exports.InputChanged] = this[InputChangedThreshold];
|
|
131
134
|
}
|
|
132
135
|
else if (this.state instanceof Input) {
|
|
133
|
-
this[InputChanged] = this[InputChangedVirtual];
|
|
136
|
+
this[exports.InputChanged] = this[InputChangedVirtual];
|
|
134
137
|
}
|
|
135
138
|
else {
|
|
136
|
-
this[InputChanged] = this[InputChangedPrimitive];
|
|
139
|
+
this[exports.InputChanged] = this[InputChangedPrimitive];
|
|
137
140
|
}
|
|
138
141
|
}
|
|
139
142
|
/**
|
|
140
143
|
* Update the input's state and trigger all necessary callbacks.
|
|
141
144
|
*/
|
|
142
|
-
[InputSet](state) {
|
|
145
|
+
[exports.InputSet](state) {
|
|
143
146
|
this.lastInput = Date.now();
|
|
144
|
-
if (this[InputChanged](this.state, state)) {
|
|
147
|
+
if (this[exports.InputChanged](this.state, state)) {
|
|
145
148
|
this.state = state;
|
|
146
149
|
this.lastChange = Date.now();
|
|
147
150
|
this.emit("change", this, this);
|
|
@@ -149,4 +152,5 @@ export class Input extends EventEmitter {
|
|
|
149
152
|
this.emit("input", this, this);
|
|
150
153
|
}
|
|
151
154
|
}
|
|
155
|
+
exports.Input = Input;
|
|
152
156
|
//# sourceMappingURL=input.js.map
|
package/dist/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":";;;;AAAA,mCAAsC;AACtC,+BAA+B;AAS/B,MAAM,aAAa,GAA0C;IAC3D,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,SAAS,EAAE,CAAC;CACb,CAAC;AAEF,qBAAqB;AACrB,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AACxC,MAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAChD,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAC1C,MAAM,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AACxD,MAAM,qBAAqB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC;AAC9D,MAAM,qBAAqB,GAAG,MAAM,CAAC,uBAAuB,CAAC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G,IAAI,CAAC,SAAS,CAAC;IACrD,CAAC;IAED,0EAA0E;IAC1E,CAAC,kBAAkB,CAAC;QAClB,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;YAClC,IAAI,CAAC,oBAAY,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAGnC,CAAC;SACd;aAAM,IAAI,IAAI,CAAC,KAAK,YAAY,KAAK,EAAE;YACtC,IAAI,CAAC,oBAAY,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,CAAC;SAChD;aAAM;YACL,IAAI,CAAC,oBAAY,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,CAAC;SAClD;IACH,CAAC;IAED;;OAEG;IACH,CAAC,gBAAQ,CAAC,CAAC,KAAW;QACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC5B,IAAI,IAAI,CAAC,oBAAY,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;YACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YACnB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAC7B,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;SACjC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;CACF;AAvKD,sBAuKC"}
|
package/dist/math.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dualsense-ts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "A natural interface for your DualSense controller, with Typescript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dualsense",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"nsfm"
|
|
28
28
|
],
|
|
29
29
|
"license": "GPL-3.0",
|
|
30
|
-
"type": "module",
|
|
31
30
|
"private": false,
|
|
32
31
|
"main": "dist/index.js",
|
|
33
32
|
"types": "dist/index.d.ts",
|