swipe3d

Swipe/Slide/Scroll/Screen (touch device widgets like) events handling library. The purpose of the swipe3d is provide an advanced events handling.

Usage no npm install needed!

<script type="module">
  import swipe3d from 'https://cdn.skypack.dev/swipe3d';
</script>

README

Swipe/Slide/Scroll events library

The purpose of the swipe3d is provide an advanced events handling. Samples source code.

Swipe3d provides following components:

Installation

npm install swipe3d

Screen demo

Live demo

Usage

import {Screen, DIR} from 'swipe3d'

let mainScreen = new Screen(DOMElement, options)

options :

  • threshold int default 120
  • restraint int default 300
  • direction DIR default DIR.HORIZONTAL
  • mouse bool default true
  • mouseDelta int default 0
  • callback function run callback with number of screen as argument

Slide demo

Live demo

Usage

import {Slide, DIR, ACTION} from 'swipe3d'

let notificationArea = new Slide(DOMElement, options)

options :

  • threshold int default 150
  • restraint int default 100
  • direction DIR default DIR.BOTTOM
  • callback function run callback with ACTION as argument

Scroll demo

Live demo

Usage

import {Screen, DIR} from 'swipe3d'

let mainScreen = new Screen(DOMElement, options)

options :

  • threshold int default 150
  • restraint int default 300
  • direction DIR default DIR.HORIZONTAL
  • mouse bool default true
  • mouseDelta int default 50

Swipe

Usage

import {Swipe, DIR} from 'swipe3d'

let swipable = new Swipe(DOMElement, options)

options :

  • threshold int default 80
  • restraint int default 100
  • swipeTime int default 100
  • callback function run callback with DIR direction as argument

License

MIT (c) 2016 Svetlana Linuxenko