swipe3d
v1.0.2
Published
Swipe/Slide/Scroll/Screen (touch device widgets like) events handling library. The purpose of the swipe3d is provide an advanced events handling.
Downloads
7
Maintainers
Readme
Swipe/Slide/Scroll events library
The purpose of the swipe3d is provide an advanced events handling. Samples source code.
Swipe3d provides following components:
- Swipable Screen Component
- Swipe events handling
- Swipable Slide Component
- Swipable ScrollComponent
Installation
npm install swipe3d
Screen demo
Live demo
Usage
import {Screen, DIR} from 'swipe3d'
let mainScreen = new Screen(DOMElement, options)
options :
- threshold
int
default120
- restraint
int
default300
- direction
DIR
defaultDIR.HORIZONTAL
- mouse
bool
defaulttrue
- mouseDelta
int
default0
- callback
function
run callback with number of screen asargument
Slide demo
Live demo
Usage
import {Slide, DIR, ACTION} from 'swipe3d'
let notificationArea = new Slide(DOMElement, options)
options :
- threshold
int
default150
- restraint
int
default100
- direction
DIR
defaultDIR.BOTTOM
- callback
function
run callback withACTION
asargument
Scroll demo
Live demo
Usage
import {Screen, DIR} from 'swipe3d'
let mainScreen = new Screen(DOMElement, options)
options :
- threshold
int
default150
- restraint
int
default300
- direction
DIR
defaultDIR.HORIZONTAL
- mouse
bool
defaulttrue
- mouseDelta
int
default50
Swipe
Usage
import {Swipe, DIR} from 'swipe3d'
let swipable = new Swipe(DOMElement, options)
options :
- threshold
int
default80
- restraint
int
default100
- swipeTime
int
default100
- callback
function
run callback withDIR
direction asargument
License
MIT (c) 2016 Svetlana Linuxenko