myungjaeyu / TouchControl.js

Simple touch interaction library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TouchControl.js

Simple touch interaction library

Usage

 
    var desktop = new TouchControl.Desktop(HTMLElement);

    var mobile  = new TouchControl.Mobile(HTMLElement);

    var client_screen  = new TouchControl.Desktop(); // window
    var device_screen  = new TouchControl.Mobile();  // window    
    
    
    var cross_platform          = TouchControl.load(HTMLElement);    
    var cross_platform_screen   = TouchControl.load();

Prop

Desktop

Alt text

        isTouch                 : boolean
        isMove                  : boolean

        touch.move.x            : double
        touch.move.y            : double

        touch.delta.x           : double
        touch.delta.y           : double
 
        touch.pitch             : double
        touch.yaw               : double

        touch.type              : string
        
        touch.direction.north   : boolean
        touch.direction.south   : boolean
        touch.direction.east    : boolean
        touch.direction.west    : boolean
 

Mobile

Alt text

        isTouch                 : boolean
        isMove                  : boolean
        isPinch                 : boolean

        touch.move.x            : double
        touch.move.y            : double

        touch.delta.x           : double
        touch.delta.y           : double
 
        touch.pitch             : double
        touch.yaw               : double

        touch.pinch.start       : boolean
        touch.pinch.end         : boolean
        touch.pinch.zoom        : boolean

        touch.type              : string
        
        touch.direction.north   : boolean
        touch.direction.south   : boolean
        touch.direction.east    : boolean
        touch.direction.west    : boolean

About

Simple touch interaction library


Languages

Language:JavaScript 100.0%