dualsense-ts 5.1.7 → 5.1.8
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 +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,6 +37,12 @@ controller.connection.on("change", ({ active }) = > {
|
|
|
37
37
|
});
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
### Wired vs Bluetooth
|
|
41
|
+
|
|
42
|
+
In node.js, wired and wireless bluetooth connections are supported.
|
|
43
|
+
|
|
44
|
+
In the browser, only wireless connections are supported.
|
|
45
|
+
|
|
40
46
|
### Input APIs
|
|
41
47
|
|
|
42
48
|
`dualsense-ts` provides several interfaces for reading input:
|
|
@@ -110,7 +116,9 @@ for await (const { pressure } of controller.left.trigger) {
|
|
|
110
116
|
}
|
|
111
117
|
```
|
|
112
118
|
|
|
113
|
-
### Rumble Support
|
|
119
|
+
### Rumble Support
|
|
120
|
+
|
|
121
|
+
Only supported in node.js with a wireless connection.
|
|
114
122
|
|
|
115
123
|
```typescript
|
|
116
124
|
controller.rumble(1.0); // 100% rumble intensity
|
|
@@ -130,7 +138,7 @@ controller.right.trigger.on("change", (trigger) => {
|
|
|
130
138
|
|
|
131
139
|
### With React
|
|
132
140
|
|
|
133
|
-
Creating a controller interface with `new Dualsense()` is
|
|
141
|
+
Creating a controller interface with `new Dualsense()` is too expensive to be done at render time. You can create a [Context](https://reactjs.org/docs/context.html) to share the controller state with your components:
|
|
134
142
|
|
|
135
143
|
```typescript
|
|
136
144
|
// DualsenseContext.tsx
|