“A JavaScript Gesture Detecting Library for the modern web” says the official documentation of zingtouch.
Being a Gesture detection library it comes with six standard gestures which are completely customizable.
Here we are just going to give the highlights of the gestures and how to start working with zingtouch. Refer to the official documentation for all the necessary codes and steps.
Gestures
1. Tap: A tap event is a quick start and end of an input. Configuration can be done easily for a tap gesture with the amount of time in between a start and end of an input, and the number of inputs given.
2. Rotate: Rotate gesture is determined when user has given two inputs moving about a circle. The main thing required here is that inputs given should be on the edge of a diameter.
3. Pinch and Expand: When user has two inputs on the screen and he moves one or both close to each other then it detects a pinch. Expand is detected when the two inputs move away from each other.
4. Pan and Swipe: A pan is identified when user makes a touch on the screen and moves about the area. Swipe is related to the user’s touch on the screen and moving with relatively increased velocity.
Including ZingTouchIt is very simple to use ZingTouch in your website. There are two different ways of use zingtouch:
1.Using the import syntax (ES6) : import ZingTouch from './path/to/zingtouch.min.js';
OR
2.Including the script directly :
This was just a glimpse of how to include this powerful javascript library in your website. Getting started Documentation contains a lot of information about this powerful gesture detection library.
Leave a Reply
Your email address will not be published. Required fields are marked *