Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/richarddorian/bun-vigem
A ViGEm client made using Bun's FFI module.
https://github.com/richarddorian/bun-vigem
bun ffi vigem
Last synced: 1 day ago
JSON representation
A ViGEm client made using Bun's FFI module.
- Host: GitHub
- URL: https://github.com/richarddorian/bun-vigem
- Owner: RichardDorian
- Created: 2025-02-08T12:22:45.000Z (3 days ago)
- Default Branch: main
- Last Pushed: 2025-02-09T20:43:07.000Z (1 day ago)
- Last Synced: 2025-02-09T21:20:35.600Z (1 day ago)
- Topics: bun, ffi, vigem
- Language: TypeScript
- Homepage:
- Size: 77.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bun-vigem
A ViGEm client made using Bun's FFI module.
## Getting Started
```bash
bun add https://github.com/RichardDorian/bun-vigem
```## Xbox 360 Controller
### State updates
The library automatically sends a state update to the ViGEm driver at the Xbox 360 controller's update rate (125Hz) (around every 8ms).
### Example
Error handling is omitted for brevity.
```ts
import { ViGEmClient } from 'bun-vigem';const client = new ViGEmClient();
const controller = client.createX360Controller();
controller.connect();controller.state.buttons = 0x1000 | 0x4000;
controller.state.thumbLX = 32766 / 2;
```