Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andrewisen-tikab/three-gamepad
Gamepad API with three.js
https://github.com/andrewisen-tikab/three-gamepad
gamepad threejs
Last synced: 15 days ago
JSON representation
Gamepad API with three.js
- Host: GitHub
- URL: https://github.com/andrewisen-tikab/three-gamepad
- Owner: andrewisen-tikab
- Created: 2024-10-15T18:31:01.000Z (about 1 month ago)
- Default Branch: dev
- Last Pushed: 2024-10-20T19:24:58.000Z (27 days ago)
- Last Synced: 2024-10-20T23:55:48.120Z (27 days ago)
- Topics: gamepad, threejs
- Language: TypeScript
- Homepage: https://andrewisen-tikab.github.io/three-gamepad/examples/
- Size: 2.18 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# three-gamepad
`three-gamepad` is a simple library that allows you to use a gamepad to control a camera in a [three.js](https://threejs.org/) scene.
It also features a drop-in replacement for the [camera-controls](https://github.com/yomotsu/camera-controls) class that allows you to use a gamepad to control the camera.## Installation
Install it with npm:
```bash
npm install three-gamepad
```or yarn:
```bash
yarn add three-gamepad
```## Usage
```ts
import * as THREE from "three";
import { GamepadCameraControls } from "three-gamepad";
const cameraControls = new GamepadCameraControls(camera, renderer.domElement);GamepadCameraControls.install({ THREE });
```## Demo
A live demo can be found at:
[https://andrewisen-tikab.github.io/three-gamepad/examples/](https://andrewisen-tikab.github.io/three-gamepad/examples/).## Docs
Auto-generated documentation can be found at:
[https://andrewisen-tikab.github.io/three-gamepad/docs/](https://andrewisen-tikab.github.io/three-gamepad/docs/)