three-gamepad-controls 0.10.0 → 0.10.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
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
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
4
|
|
|
5
|
-
## Installation
|
|
5
|
+
## 📦 Installation
|
|
6
6
|
|
|
7
7
|
npm:
|
|
8
8
|
|
|
@@ -34,11 +34,11 @@ Bun:
|
|
|
34
34
|
bun add three-gamepad-controls
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
## Documentation
|
|
37
|
+
## 📖 Documentation
|
|
38
38
|
|
|
39
39
|
- [Core](./docs/core.md) — The fundamental building blocks.
|
|
40
|
-
- [GamepadArcballControls](./docs/gamepad-arcball-controls.md) - Gamepad support for `ArcballControls`.
|
|
41
40
|
- [GamepadControls](./docs/gamepad-controls.md) — Abstract base class for custom gamepad controls.
|
|
41
|
+
- [GamepadArcballControls](./docs/gamepad-arcball-controls.md) - Gamepad support for `ArcballControls`.
|
|
42
42
|
- [GamepadDragControls](./docs/gamepad-drag-controls.md) - Gamepad support for `DragControls`.
|
|
43
43
|
- [GamepadFirstPersonControls](./docs/gamepad-first-person-controls.md) — Gamepad support for `FirstPersonControls`.
|
|
44
44
|
- [GamepadFlyControls](./docs/gamepad-fly-controls.md) — Gamepad support for `FlyControls`.
|
|
@@ -55,12 +55,12 @@ type GamepadArcballControlsOptions = {
|
|
|
55
55
|
axisPanY: number;
|
|
56
56
|
/**
|
|
57
57
|
* Button index for zooming **in** (analog trigger value used for proportional zoom).
|
|
58
|
-
* @default
|
|
58
|
+
* @default 7 - Right trigger
|
|
59
59
|
*/
|
|
60
60
|
buttonZoomIn: number;
|
|
61
61
|
/**
|
|
62
62
|
* Button index for zooming **out** (analog trigger value used for proportional zoom).
|
|
63
|
-
* @default
|
|
63
|
+
* @default 6 - Left trigger
|
|
64
64
|
*/
|
|
65
65
|
buttonZoomOut: number;
|
|
66
66
|
/**
|
|
@@ -15,8 +15,8 @@ const DEFAULT_ARCBALL_OPTIONS = {
|
|
|
15
15
|
axisRotateY: GAMEPAD_AXIS.LeftY,
|
|
16
16
|
axisPanX: GAMEPAD_AXIS.RightX,
|
|
17
17
|
axisPanY: GAMEPAD_AXIS.RightY,
|
|
18
|
-
buttonZoomIn: GAMEPAD_BUTTON.
|
|
19
|
-
buttonZoomOut: GAMEPAD_BUTTON.
|
|
18
|
+
buttonZoomIn: GAMEPAD_BUTTON.RightTrigger,
|
|
19
|
+
buttonZoomOut: GAMEPAD_BUTTON.LeftTrigger,
|
|
20
20
|
buttonZRotateLeft: GAMEPAD_BUTTON.LeftShoulder,
|
|
21
21
|
buttonZRotateRight: GAMEPAD_BUTTON.RightShoulder,
|
|
22
22
|
buttonFocus: GAMEPAD_BUTTON.South
|
|
@@ -50,12 +50,12 @@ type GamepadTrackballControlsOptions = {
|
|
|
50
50
|
axisPanY: number;
|
|
51
51
|
/**
|
|
52
52
|
* Button index for zooming **in** (analog trigger value used for proportional zoom).
|
|
53
|
-
* @default
|
|
53
|
+
* @default 7 - Right trigger
|
|
54
54
|
*/
|
|
55
55
|
buttonZoomIn: number;
|
|
56
56
|
/**
|
|
57
57
|
* Button index for zooming **out** (analog trigger value used for proportional zoom).
|
|
58
|
-
* @default
|
|
58
|
+
* @default 6 - Left trigger
|
|
59
59
|
*/
|
|
60
60
|
buttonZoomOut: number;
|
|
61
61
|
};
|
|
@@ -13,8 +13,8 @@ const DEFAULT_TRACKBALL_OPTIONS = {
|
|
|
13
13
|
axisRotateY: GAMEPAD_AXIS.LeftY,
|
|
14
14
|
axisPanX: GAMEPAD_AXIS.RightX,
|
|
15
15
|
axisPanY: GAMEPAD_AXIS.RightY,
|
|
16
|
-
buttonZoomIn: GAMEPAD_BUTTON.
|
|
17
|
-
buttonZoomOut: GAMEPAD_BUTTON.
|
|
16
|
+
buttonZoomIn: GAMEPAD_BUTTON.RightTrigger,
|
|
17
|
+
buttonZoomOut: GAMEPAD_BUTTON.LeftTrigger
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Adds gamepad support to Three.js `TrackballControls`.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "three-gamepad-controls",
|
|
3
3
|
"description": "Gamepad support for Three.js controls.",
|
|
4
4
|
"author": "Kasnix",
|
|
5
|
-
"version": "0.10.
|
|
5
|
+
"version": "0.10.1",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/luckasnix/three-gamepad-controls.git"
|