GithubHelp home page GithubHelp logo

mujinyo / hammer.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hammerjs/hammer.js

0.0 2.0 0.0 9.97 MB

A javascript library for multi-touch gestures :// You can touch this

Home Page: http://hammerjs.github.io

License: MIT License

HTML 12.42% JavaScript 87.29% CSS 0.29%

hammer.js's Introduction

Hammer.js 2.0.6

Build Status

Support, Questions, and Collaboration

Slack Status

Documentation

Visit hammerjs.github.io for detailed documentation.

// get a reference to an element
var stage = document.getElementById('stage');

// create a manager for that element
var mc = new Hammer.Manager(stage);

// create a recognizer
var Rotate = new Hammer.Rotate();

// add the recognizer
mc.add(Rotate);

// subscribe to events
mc.on('rotate', function(e) {
    // do something cool
    var rotation = Math.round(e.rotation);    
    stage.style.transform = 'rotate('+rotation+'deg)';
});

An advanced demo is available here: http://codepen.io/runspired/full/ZQBGWd/

Contributing

Read the contributing guidelines.

For PRs.

  • Use Angular Style commit messages
  • Rebase your PR branch when necessary
  • If you add a feature or fix a bug, please add or fix any necessary tests.
  • If a new feature, open a docs PR to go with.

Building

You can get the pre-build versions from the Hammer.js website, or do this by yourself running npm install && npm run build

hammer.js's People

Contributors

jtangelder avatar arjunkathuria avatar arschmitz avatar erwinelling avatar runspired avatar ppcano avatar aratramba avatar michaelpaulson-wf avatar lloiser avatar stereobit avatar danielgruber avatar patrickhlauke avatar phated avatar adamdorwart avatar sithmel avatar annam avatar bumbu avatar sculove avatar visiongeist avatar sedovsek avatar inorganik avatar t1st3 avatar seutje avatar stefhatcher avatar robharper avatar lucasgunn avatar jantimon avatar jaap3 avatar fnd avatar duncaen avatar

Watchers

James Cloos avatar MuJin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.