three-gamepad-controls 0.22.0 → 0.24.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.
Files changed (4) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +16 -2
  3. package/package.json +11 -11
  4. package/LICENSE +0 -21
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2026 Lucas Alves Costa
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,15 +1,17 @@
1
1
  # Three.js Gamepad Controls
2
2
 
3
+ ![Three.js Gamepad Controls logo featuring a white gamepad with black geometric outlines above the wordmark.](assets/logo.svg "Three.js Gamepad Controls logo")
4
+
3
5
  Gamepad support for [Three.js](https://threejs.org) controls, built on top of [Web Gamepad API](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API).
4
6
 
5
7
  > [!WARNING]
6
8
  > This library has not reached version 1.0.0 and should not yet be considered stable. Until 1.0.0, minor releases may include breaking changes.
7
9
 
8
- ## Architecture
10
+ ## 🏗️ Architecture
9
11
 
10
12
  ![Layered architecture showing the shared gamepad input foundation branching into direct application input and Three.js control integrations.](./assets/architecture-diagram.webp "Three.js Gamepad Controls layered architecture")
11
13
 
12
- The library is organized around a shared input foundation that handles gamepad selection, polling, button states, axes, sticks, haptics, and standard mappings. Applications can consume this input directly for gameplay, menus, and custom interactions, or use `GamepadControls` and its ready-made or custom wrappers to integrate gamepads with Three.js controls.
14
+ The library is organized around `GamepadInput`, which owns the internal gamepad manager for selection and polling, exposes buttons, axes, sticks, haptics, and standard mappings, and processes stick reads through ordered, reusable, stateless pipelines. Applications can consume it directly for gameplay, menus, and custom interactions, or use `GamepadControls` and its ready-made or custom wrappers to integrate with Three.js. Each wrapper action resolves its own axes and pipeline.
13
15
 
14
16
  ## 📦 Installation
15
17
 
@@ -56,6 +58,14 @@ bun add three three-gamepad-controls
56
58
  bun add -d @types/three # optional: for TypeScript projects
57
59
  ```
58
60
 
61
+ ## 🔗 Compatibility
62
+
63
+ | Three.js | Three.js Gamepad Controls |
64
+ | --- | --- |
65
+ | `~0.184.0` | `<=0.22.0` |
66
+ | `~0.185.0` | `0.23.0` |
67
+ | `~0.186.0` | `0.24.0` |
68
+
59
69
  ## 📖 Documentation
60
70
 
61
71
  - [Core](./docs/core.md) — The fundamental building blocks.
@@ -73,3 +83,7 @@ bun add -d @types/three # optional: for TypeScript projects
73
83
  - [GamepadPointerLockControls](./docs/gamepad-pointer-lock-controls.md) — Gamepad support for `PointerLockControls`.
74
84
  - [GamepadTrackballControls](./docs/gamepad-trackball-controls.md) — Gamepad support for `TrackballControls`.
75
85
  - [GamepadTransformControls](./docs/gamepad-transform-controls.md) — Gamepad support for `TransformControls`.
86
+
87
+ ## 📄 License
88
+
89
+ Licensed under the [MIT License](./LICENSE.md).
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "three-gamepad-controls",
3
3
  "description": "Gamepad support for Three.js controls.",
4
- "version": "0.22.0",
4
+ "version": "0.24.0",
5
+ "license": "MIT",
5
6
  "homepage": "https://github.com/luckasnix/three-gamepad-controls#readme",
6
7
  "author": {
7
8
  "name": "Kasnix",
@@ -34,7 +35,6 @@
34
35
  "controls",
35
36
  "gamepad"
36
37
  ],
37
- "license": "MIT",
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
@@ -46,23 +46,23 @@
46
46
  }
47
47
  },
48
48
  "devDependencies": {
49
- "@biomejs/biome": "2.5.6",
50
- "@commitlint/cli": "21.2.1",
51
- "@commitlint/config-conventional": "21.2.0",
49
+ "@biomejs/biome": "2.5.11",
50
+ "@commitlint/cli": "21.2.2",
51
+ "@commitlint/config-conventional": "21.2.2",
52
52
  "@commitlint/types": "21.2.0",
53
53
  "@types/node": "24.13.3",
54
- "@types/three": "0.184.0",
55
- "@vitest/coverage-v8": "4.1.10",
54
+ "@types/three": "0.186.0",
55
+ "@vitest/coverage-v8": "5.0.0",
56
56
  "husky": "9.1.7",
57
57
  "jsdom": "29.1.1",
58
- "three": "0.184.0",
58
+ "three": "0.186.0",
59
59
  "tsdown": "0.22.14",
60
60
  "typescript": "7.0.2",
61
- "vitest": "4.1.10"
61
+ "vitest": "5.0.0"
62
62
  },
63
63
  "peerDependencies": {
64
- "@types/three": ">=0.184.0",
65
- "three": ">=0.184.0"
64
+ "@types/three": "~0.186.0",
65
+ "three": "~0.186.0"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "tsc && tsdown",
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Lucas Alves Costa
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.