dualsense-ts 2.1.44 → 2.2.0

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/docs/Touch.md CHANGED
@@ -46,6 +46,7 @@ with [0,0] representing the center of the touchpad.
46
46
  - [degrees](../wiki/Touch#degrees)
47
47
  - [direction](../wiki/Touch#direction)
48
48
  - [directionDegrees](../wiki/Touch#directiondegrees)
49
+ - [force](../wiki/Touch#force)
49
50
  - [magnitude](../wiki/Touch#magnitude)
50
51
  - [radians](../wiki/Touch#radians)
51
52
  - [vector](../wiki/Touch#vector)
@@ -103,7 +104,7 @@ with [0,0] representing the center of the touchpad.
103
104
 
104
105
  #### Defined in
105
106
 
106
- [src/elements/analog.ts:28](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L28)
107
+ [src/elements/analog.ts:40](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L40)
107
108
 
108
109
  ## Properties
109
110
 
@@ -132,7 +133,7 @@ with [0,0] representing the center of the touchpad.
132
133
 
133
134
  #### Defined in
134
135
 
135
- [src/input.ts:128](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L128)
136
+ [src/input.ts:128](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L128)
136
137
 
137
138
  ___
138
139
 
@@ -146,7 +147,7 @@ ___
146
147
 
147
148
  #### Defined in
148
149
 
149
- [src/input.ts:162](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L162)
150
+ [src/input.ts:162](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L162)
150
151
 
151
152
  ___
152
153
 
@@ -160,7 +161,7 @@ ___
160
161
 
161
162
  #### Defined in
162
163
 
163
- [src/input.ts:157](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L157)
164
+ [src/input.ts:157](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L157)
164
165
 
165
166
  ___
166
167
 
@@ -174,7 +175,7 @@ ___
174
175
 
175
176
  #### Defined in
176
177
 
177
- [src/input.ts:154](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L154)
178
+ [src/input.ts:154](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L154)
178
179
 
179
180
  ___
180
181
 
@@ -188,7 +189,7 @@ ___
188
189
 
189
190
  #### Defined in
190
191
 
191
- [src/input.ts:160](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L160)
192
+ [src/input.ts:160](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L160)
192
193
 
193
194
  ___
194
195
 
@@ -196,13 +197,15 @@ ___
196
197
 
197
198
  • `Readonly` **button**: [`Momentary`](../wiki/Momentary)
198
199
 
200
+ Button triggered by pressing the stick.
201
+
199
202
  #### Inherited from
200
203
 
201
204
  [Analog](../wiki/Analog).[button](../wiki/Analog#button)
202
205
 
203
206
  #### Defined in
204
207
 
205
- [src/elements/analog.ts:26](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L26)
208
+ [src/elements/analog.ts:38](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L38)
206
209
 
207
210
  ___
208
211
 
@@ -212,7 +215,7 @@ ___
212
215
 
213
216
  #### Defined in
214
217
 
215
- [src/elements/touch.ts:10](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/touch.ts#L10)
218
+ [src/elements/touch.ts:10](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/touch.ts#L10)
216
219
 
217
220
  ___
218
221
 
@@ -226,7 +229,7 @@ ___
226
229
 
227
230
  #### Defined in
228
231
 
229
- [src/input.ts:58](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L58)
232
+ [src/input.ts:58](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L58)
230
233
 
231
234
  ___
232
235
 
@@ -240,7 +243,7 @@ ___
240
243
 
241
244
  #### Defined in
242
245
 
243
- [src/input.ts:61](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L61)
246
+ [src/input.ts:61](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L61)
244
247
 
245
248
  ___
246
249
 
@@ -254,7 +257,7 @@ ___
254
257
 
255
258
  #### Defined in
256
259
 
257
- [src/input.ts:64](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L64)
260
+ [src/input.ts:64](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L64)
258
261
 
259
262
  ___
260
263
 
@@ -268,7 +271,7 @@ ___
268
271
 
269
272
  #### Defined in
270
273
 
271
- [src/elements/touch.ts:9](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/touch.ts#L9)
274
+ [src/elements/touch.ts:9](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/touch.ts#L9)
272
275
 
273
276
  ___
274
277
 
@@ -282,7 +285,7 @@ ___
282
285
 
283
286
  #### Defined in
284
287
 
285
- [src/input.ts:67](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L67)
288
+ [src/input.ts:67](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L67)
286
289
 
287
290
  ___
288
291
 
@@ -292,7 +295,7 @@ ___
292
295
 
293
296
  #### Defined in
294
297
 
295
- [src/elements/touch.ts:11](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/touch.ts#L11)
298
+ [src/elements/touch.ts:11](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/touch.ts#L11)
296
299
 
297
300
  ___
298
301
 
@@ -300,13 +303,15 @@ ___
300
303
 
301
304
  • `Readonly` **x**: [`Axis`](../wiki/Axis)
302
305
 
306
+ The left/right position of the input.
307
+
303
308
  #### Inherited from
304
309
 
305
310
  [Analog](../wiki/Analog).[x](../wiki/Analog#x)
306
311
 
307
312
  #### Defined in
308
313
 
309
- [src/elements/analog.ts:24](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L24)
314
+ [src/elements/analog.ts:30](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L30)
310
315
 
311
316
  ___
312
317
 
@@ -314,13 +319,15 @@ ___
314
319
 
315
320
  • `Readonly` **y**: [`Axis`](../wiki/Axis)
316
321
 
322
+ The up/down position of the input.
323
+
317
324
  #### Inherited from
318
325
 
319
326
  [Analog](../wiki/Analog).[y](../wiki/Analog#y)
320
327
 
321
328
  #### Defined in
322
329
 
323
- [src/elements/analog.ts:25](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L25)
330
+ [src/elements/analog.ts:34](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L34)
324
331
 
325
332
  ___
326
333
 
@@ -404,7 +411,7 @@ Analog.\_\_@toStringTag@66
404
411
 
405
412
  #### Defined in
406
413
 
407
- [src/input.ts:149](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L149)
414
+ [src/input.ts:149](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L149)
408
415
 
409
416
  ___
410
417
 
@@ -422,7 +429,7 @@ Analog.active
422
429
 
423
430
  #### Defined in
424
431
 
425
- [src/elements/touch.ts:13](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/touch.ts#L13)
432
+ [src/elements/touch.ts:13](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/touch.ts#L13)
426
433
 
427
434
  ___
428
435
 
@@ -430,6 +437,8 @@ ___
430
437
 
431
438
  • `get` **angle**(): `number`
432
439
 
440
+ Alias for `.direction`
441
+
433
442
  #### Returns
434
443
 
435
444
  `number`
@@ -440,7 +449,7 @@ Analog.angle
440
449
 
441
450
  #### Defined in
442
451
 
443
- [src/elements/analog.ts:68](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L68)
452
+ [src/elements/analog.ts:100](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L100)
444
453
 
445
454
  ___
446
455
 
@@ -448,6 +457,8 @@ ___
448
457
 
449
458
  • `get` **angleDegrees**(): `number`
450
459
 
460
+ Alias for `.directionDegrees`.
461
+
451
462
  #### Returns
452
463
 
453
464
  `number`
@@ -458,7 +469,7 @@ Analog.angleDegrees
458
469
 
459
470
  #### Defined in
460
471
 
461
- [src/elements/analog.ts:83](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L83)
472
+ [src/elements/analog.ts:121](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L121)
462
473
 
463
474
  ___
464
475
 
@@ -466,6 +477,8 @@ ___
466
477
 
467
478
  • `get` **degrees**(): `number`
468
479
 
480
+ Alias for `.directionDegrees`.
481
+
469
482
  #### Returns
470
483
 
471
484
  `number`
@@ -476,7 +489,7 @@ Analog.degrees
476
489
 
477
490
  #### Defined in
478
491
 
479
- [src/elements/analog.ts:78](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L78)
492
+ [src/elements/analog.ts:114](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L114)
480
493
 
481
494
  ___
482
495
 
@@ -484,6 +497,8 @@ ___
484
497
 
485
498
  • `get` **direction**(): `number`
486
499
 
500
+ Returns the stick's angle in radians.
501
+
487
502
  #### Returns
488
503
 
489
504
  `number`
@@ -494,7 +509,7 @@ Analog.direction
494
509
 
495
510
  #### Defined in
496
511
 
497
- [src/elements/analog.ts:58](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L58)
512
+ [src/elements/analog.ts:86](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L86)
498
513
 
499
514
  ___
500
515
 
@@ -502,6 +517,8 @@ ___
502
517
 
503
518
  • `get` **directionDegrees**(): `number`
504
519
 
520
+ Alias for `.direction` converted to degrees.
521
+
505
522
  #### Returns
506
523
 
507
524
  `number`
@@ -512,7 +529,27 @@ Analog.directionDegrees
512
529
 
513
530
  #### Defined in
514
531
 
515
- [src/elements/analog.ts:73](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L73)
532
+ [src/elements/analog.ts:107](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L107)
533
+
534
+ ___
535
+
536
+ ### force
537
+
538
+ • `get` **force**(): `number`
539
+
540
+ Returns an force from the stick's position.
541
+
542
+ #### Returns
543
+
544
+ `number`
545
+
546
+ #### Inherited from
547
+
548
+ Analog.force
549
+
550
+ #### Defined in
551
+
552
+ [src/elements/analog.ts:70](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L70)
516
553
 
517
554
  ___
518
555
 
@@ -520,6 +557,8 @@ ___
520
557
 
521
558
  • `get` **magnitude**(): `number`
522
559
 
560
+ Returns a magnitude from the stick's position.
561
+
523
562
  #### Returns
524
563
 
525
564
  `number`
@@ -530,7 +569,7 @@ Analog.magnitude
530
569
 
531
570
  #### Defined in
532
571
 
533
- [src/elements/analog.ts:53](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L53)
572
+ [src/elements/analog.ts:79](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L79)
534
573
 
535
574
  ___
536
575
 
@@ -538,6 +577,8 @@ ___
538
577
 
539
578
  • `get` **radians**(): `number`
540
579
 
580
+ Alias for `.direction`
581
+
541
582
  #### Returns
542
583
 
543
584
  `number`
@@ -548,7 +589,7 @@ Analog.radians
548
589
 
549
590
  #### Defined in
550
591
 
551
- [src/elements/analog.ts:63](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L63)
592
+ [src/elements/analog.ts:93](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L93)
552
593
 
553
594
  ___
554
595
 
@@ -556,6 +597,8 @@ ___
556
597
 
557
598
  • `get` **vector**(): `Object`
558
599
 
600
+ Returns a direction and magnitude representing the stick's position.
601
+
559
602
  #### Returns
560
603
 
561
604
  `Object`
@@ -571,7 +614,7 @@ Analog.vector
571
614
 
572
615
  #### Defined in
573
616
 
574
- [src/elements/analog.ts:48](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/elements/analog.ts#L48)
617
+ [src/elements/analog.ts:63](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/elements/analog.ts#L63)
575
618
 
576
619
  ## Methods
577
620
 
@@ -592,7 +635,7 @@ And decide if this is the root Input.
592
635
 
593
636
  #### Defined in
594
637
 
595
- [src/input.ts:168](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L168)
638
+ [src/input.ts:168](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L168)
596
639
 
597
640
  ___
598
641
 
@@ -617,7 +660,7 @@ ___
617
660
 
618
661
  #### Defined in
619
662
 
620
- [src/input.ts:190](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L190)
663
+ [src/input.ts:190](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L190)
621
664
 
622
665
  ___
623
666
 
@@ -642,7 +685,7 @@ ___
642
685
 
643
686
  #### Defined in
644
687
 
645
- [src/input.ts:194](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L194)
688
+ [src/input.ts:194](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L194)
646
689
 
647
690
  ___
648
691
 
@@ -660,7 +703,7 @@ ___
660
703
 
661
704
  #### Defined in
662
705
 
663
- [src/input.ts:186](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L186)
706
+ [src/input.ts:186](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L186)
664
707
 
665
708
  ___
666
709
 
@@ -691,7 +734,7 @@ ___
691
734
 
692
735
  #### Defined in
693
736
 
694
- [src/input.ts:199](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L199)
737
+ [src/input.ts:199](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L199)
695
738
 
696
739
  ___
697
740
 
@@ -717,7 +760,7 @@ Update the input's state and trigger all necessary callbacks.
717
760
 
718
761
  #### Defined in
719
762
 
720
- [src/input.ts:215](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L215)
763
+ [src/input.ts:215](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L215)
721
764
 
722
765
  ___
723
766
 
@@ -735,7 +778,7 @@ ___
735
778
 
736
779
  #### Defined in
737
780
 
738
- [src/input.ts:139](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L139)
781
+ [src/input.ts:139](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L139)
739
782
 
740
783
  ___
741
784
 
@@ -753,7 +796,7 @@ ___
753
796
 
754
797
  #### Defined in
755
798
 
756
- [src/input.ts:131](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L131)
799
+ [src/input.ts:131](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L131)
757
800
 
758
801
  ___
759
802
 
@@ -777,7 +820,7 @@ ___
777
820
 
778
821
  #### Defined in
779
822
 
780
- [src/input.ts:143](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L143)
823
+ [src/input.ts:143](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L143)
781
824
 
782
825
  ___
783
826
 
@@ -831,7 +874,7 @@ ___
831
874
 
832
875
  #### Defined in
833
876
 
834
- [src/input.ts:44](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L44)
877
+ [src/input.ts:44](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L44)
835
878
 
836
879
  ___
837
880
 
@@ -980,7 +1023,7 @@ Resolves on the next change to this input's state.
980
1023
 
981
1024
  #### Defined in
982
1025
 
983
- [src/input.ts:78](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L78)
1026
+ [src/input.ts:78](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L78)
984
1027
 
985
1028
  ___
986
1029
 
@@ -1034,7 +1077,7 @@ ___
1034
1077
 
1035
1078
  #### Defined in
1036
1079
 
1037
- [src/input.ts:37](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L37)
1080
+ [src/input.ts:37](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L37)
1038
1081
 
1039
1082
  ___
1040
1083
 
@@ -1189,7 +1232,7 @@ Resolves on the next change to this input's state.
1189
1232
 
1190
1233
  #### Defined in
1191
1234
 
1192
- [src/input.ts:91](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L91)
1235
+ [src/input.ts:91](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L91)
1193
1236
 
1194
1237
  ___
1195
1238
 
@@ -1433,7 +1476,7 @@ Render a convenient debugging string.
1433
1476
 
1434
1477
  #### Defined in
1435
1478
 
1436
- [src/input.ts:102](https://github.com/nsfm/dualsense-ts/blob/6f02111/src/input.ts#L102)
1479
+ [src/input.ts:102](https://github.com/nsfm/dualsense-ts/blob/8aeab4d/src/input.ts#L102)
1437
1480
 
1438
1481
  ___
1439
1482