@dandre3000/touchpad-web-component
v0.3.1
Published
A web component for consistently handling touch input.
Maintainers
Readme
touchpad-web-component
Touch input web component for games with virtual analog stick
Installation
npm install @dandre3000/touchpad-web-componentUsage
<script src='./touchpad.js' type='module'></script>
<touchpad-component id='touchpad' analog></touchpad-component>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.
