All Projects → daybrush → gesto

daybrush / gesto

Licence: MIT license
You can set up drag, pinch events in any browser.

Programming Languages

typescript
32286 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to gesto

Any Touch
👋 手势库, 按需2kb~5kb, 兼容PC / 移动端
Stars: ✭ 567 (+1106.38%)
Mutual labels:  touch, drag, mouse, gesture
React Cursor Position
A React component that decorates its children with mouse and touch coordinates relative to itself.
Stars: ✭ 136 (+189.36%)
Mutual labels:  touch, drag, mouse
Inputsystem
An efficient and versatile input system for Unity.
Stars: ✭ 1,013 (+2055.32%)
Mutual labels:  touch, mouse
Touchkit
基于mtouch封装的,更便于业务使用的贴纸手势库
Stars: ✭ 48 (+2.13%)
Mutual labels:  touch, gesture
React Rotation
React rotation component
Stars: ✭ 102 (+117.02%)
Mutual labels:  touch, mouse
Better Gesture
A gesture library use for pc, mobile, vue, and mini programs
Stars: ✭ 419 (+791.49%)
Mutual labels:  touch, gesture
React Native Swipe Gestures
4-directional swipe gestures for react-native
Stars: ✭ 471 (+902.13%)
Mutual labels:  touch, gesture
React Gesture Responder
a gesture responder system for your react application
Stars: ✭ 99 (+110.64%)
Mutual labels:  touch, gesture
Sortable
Reorderable drag-and-drop lists for modern browsers and touch devices. No jQuery or framework required.
Stars: ✭ 23,641 (+50200%)
Mutual labels:  touch, drag
Hovertouchview
Stimulate Apple's Force Touch or 3D Touch on Android App with Hover Gesture
Stars: ✭ 192 (+308.51%)
Mutual labels:  touch, gesture
Zingtouch
A JavaScript touch gesture detection library for the modern web
Stars: ✭ 2,019 (+4195.74%)
Mutual labels:  touch, gesture
GIMLeT
GIMLeT – Gestural Interaction Machine Learning Toolkit
Stars: ✭ 33 (-29.79%)
Mutual labels:  gesture, gesture-recognition
Creepyface
A JavaScript library that makes your face follow the pointer. 🤪🖱️👆
Stars: ✭ 412 (+776.6%)
Mutual labels:  touch, mouse
Alloyfinger
Super tiny size multi-touch gestures library for the web.    You can touch this →
Stars: ✭ 3,244 (+6802.13%)
Mutual labels:  touch, gesture
React Event Components
🛰 A set of React components designed to handle global events (interval, keyboard, touch, mouse, etc)
Stars: ✭ 271 (+476.6%)
Mutual labels:  touch, mouse
React Easy Swipe
Easy handler for common swipe operations
Stars: ✭ 85 (+80.85%)
Mutual labels:  touch, mouse
Zhpopupcontroller
Help you pop up custom views easily. and support pop-up animation, layout position, mask effect and gesture interaction etc.
Stars: ✭ 1,481 (+3051.06%)
Mutual labels:  drag, gesture
Pancake
Lightweight, Fast, Easy-to-use HTML5 2D game framework!
Stars: ✭ 79 (+68.09%)
Mutual labels:  touch, mouse
Intel-Realsense-Hand-Toolkit-Unity
Intel Realsense Toolkit for Hand tracking and Gestural Recognition on Unity3D
Stars: ✭ 72 (+53.19%)
Mutual labels:  gesture, gesture-recognition
btt
Low level MacOS management in JavaScript via BetterTouchTool
Stars: ✭ 92 (+95.74%)
Mutual labels:  gesture, gesture-recognition

Gesto

npm version

You can set up drag, pinch events in any browser.

⚙️ Installation

$ npm i gesto
<script src="https://daybrush.com/gesto/release/latest/dist/gesto.min.js"></script>

🚀 How to use

import Gesto from "gesto";

let tx = 0;
let ty = 0;
let scale = 1;

const getso = new Gesto(target, {
    container: window,
    pinchOutside: true,
}).on("drag", e => {
    tx += e.deltaX;
    ty += e.deltaY;
    target.style.transform = `translate(${tx}px, ${ty}px) scale(${scale})`;
}).on("pinchStart", e => {
    e.datas.scale = scale;
}).on("pinch", e => {
    scale = e.datas.scale * e.scale;
    target.style.transform = `translate(${tx}px, ${ty}px) scale(${scale})`;
});

// remove event
getso.unset();

👏 Contributing

If you have any questions or requests or want to contribute to gesto, please write the issue or give me a Pull Request freely.

🐞 Bug Report

If you find a bug, please report to us opening a new Issue on GitHub.

📝 License

This project is MIT licensed.

MIT License

Copyright (c) 2019 Daybrush

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].