An open API service indexing awesome lists of open source software.

https://github.com/dandre3000/touchpad-web-component


https://github.com/dandre3000/touchpad-web-component

Last synced: 4 months ago
JSON representation

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)