three-gamepad-controls 0.12.0 → 0.12.1
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 +21 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,48 +4,53 @@ Gamepad support for [Three.js](https://threejs.org) controls, built on top of [W
|
|
|
4
4
|
|
|
5
5
|
## Architecture
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
GamepadInput["GamepadInput<br/>(public low-level input state)"]
|
|
11
|
-
GamepadControls["GamepadControls<br/>(abstract Three.js wrapper base)"]
|
|
12
|
-
Wrappers["Specific wrappers<br/>(Orbit, Map, Fly, Transform, etc.)"]
|
|
13
|
-
|
|
14
|
-
GamepadManager --> GamepadInput
|
|
15
|
-
GamepadInput --> GamepadControls
|
|
16
|
-
GamepadControls --> Wrappers
|
|
17
|
-
```
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="./assets/architecture-diagram.webp" width="800" alt="Architecture diagram" />
|
|
9
|
+
</p>
|
|
18
10
|
|
|
19
11
|
## 📦 Installation
|
|
20
12
|
|
|
21
13
|
npm:
|
|
22
14
|
|
|
23
15
|
```bash
|
|
24
|
-
npm i three-gamepad-controls
|
|
16
|
+
npm i three three-gamepad-controls
|
|
17
|
+
npm i -D @types/three # optional: for TypeScript projects
|
|
25
18
|
```
|
|
26
19
|
|
|
27
20
|
pnpm:
|
|
28
21
|
|
|
29
22
|
```bash
|
|
30
|
-
pnpm add three-gamepad-controls
|
|
23
|
+
pnpm add three three-gamepad-controls
|
|
24
|
+
pnpm add -D @types/three # optional: for TypeScript projects
|
|
31
25
|
```
|
|
32
26
|
|
|
33
27
|
Yarn:
|
|
34
28
|
|
|
35
29
|
```bash
|
|
36
|
-
yarn add three-gamepad-controls
|
|
30
|
+
yarn add three three-gamepad-controls
|
|
31
|
+
yarn add -D @types/three # optional: for TypeScript projects
|
|
37
32
|
```
|
|
38
33
|
|
|
39
34
|
Deno:
|
|
40
35
|
|
|
36
|
+
When using `deno.json`, Deno stores dependencies in `imports` and does not separate `devDependencies`; `-D` only applies when writing to `package.json`.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# deno.json
|
|
40
|
+
deno add three @types/three three-gamepad-controls
|
|
41
|
+
```
|
|
42
|
+
|
|
41
43
|
```bash
|
|
42
|
-
|
|
44
|
+
# package.json
|
|
45
|
+
deno add --package-json three three-gamepad-controls
|
|
46
|
+
deno add --package-json -D @types/three # optional: for TypeScript projects
|
|
43
47
|
```
|
|
44
48
|
|
|
45
49
|
Bun:
|
|
46
50
|
|
|
47
51
|
```bash
|
|
48
|
-
bun add three-gamepad-controls
|
|
52
|
+
bun add three three-gamepad-controls
|
|
53
|
+
bun add -d @types/three # optional: for TypeScript projects
|
|
49
54
|
```
|
|
50
55
|
|
|
51
56
|
## 📖 Documentation
|
package/package.json
CHANGED