@dandre3000/touchpad-web-component
v0.2.0
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' analogmax='1'></touchpad-component>Exports
Web component: touchpad-component
Attributes
analogmax
Determines the maximum amount of pointers to generate analog values for.
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.
