Touch Control
for Quatrefoil calcit-js. This lib targets Chrome mobile.
Demo http://r.tiye.me/Quatrefoil-GL/touch-control/ .
Usages
Import via calcit:
; "renders to body"
touch-control.core/render-control!
; "where you can get states"
println touch-control.core/*control-states
; create looper
touch-control.core/start-control-loop! 300 $ fn (elapsed states delta)
; clear loop on reload
touch-control.core/clear-control-loop!
; alias of clearing and createing
touch-control.core/replace-control-loop! 300 $ fn (elapsed states delta)
States:
:left-move $ [] 0 0
:right-move $ [] 0 0
:left-a? false
:left-b? false
:right-a? false
:right-b? false
:shift? false
Delta:
:left-move $ [] 0 0
:right-move $ [] 0 0
To load styles:
npm i @quamolit/touch-control
@import url("@quamolit/touch-control/style/touch-control.css");
Workflow
https://github.com/calcit-lang/respo-calcit-workflow
License
MIT