https://github.com/dandre3000/touchpad-web-component
https://github.com/dandre3000/touchpad-web-component
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dandre3000/touchpad-web-component
- Owner: dandre3000
- License: mit
- Created: 2026-01-25T21:27:51.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2026-02-08T17:26:09.000Z (5 months ago)
- Last Synced: 2026-02-08T23:28:16.616Z (5 months ago)
- Language: TypeScript
- Size: 45.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# touchpad-web-component
Touch input web component for games with virtual analog stick
## Installation
```bash
npm install @dandre3000/touchpad-web-component
```
## Usage
```html
```
## Exports
### Web component: touchpad-component
### Attributes
#### disable
Disable internal eventListeners.
#### analog
Enable the calculation of analog values.
### Class: HTMLTouchpadElement
### Instance properties
#### deadzoneRadius
The boundary where input is not read.
#### controlRadius
The boundary where the analog values are at their maximum.
#### getAnalogData()
Return the values generated by the given pointerId.
## Demo
[Click here](https://dandre3000.github.io/touchpad-web-component)
## License
[MIT](https://github.com/dandre3000/touchpad-web-component/blob/main/LICENSE)