1 Reply Latest reply on Jan 14, 2016 12:37 PM by bertjeuh88

    Multiple finger swipe

    bertjeuh88 Level 1

      Hey guys,

       

      I'm using hammer.js in a composition to make a tablet book application. Now I've used the standard swipes provided, with help from tutorial sites.

      Also the standard double tap.

       

      function init (){

       

       

        var element = sym.element[0];

        var hammer = Hammer(element);

       

       

        hammer.on("swipeleft", function(event) {

         sym.playReverse();

       

      Now I was wondering if anyone could help me to do a multiple finger swipe, like with 4 fingers or more.

      I would really love to make it a sort of pan, going from page 1 to page 2 and so on. I also want to make an animation connected to the x-axes so with each px you move, it looks like your looking into a looking box. So when you are in the middle of the pan, it would be in the middle of the pan animation between 2 pages. The looking box animation, I would probably make with after effects, using 3d layers.

       

      Or how to do a event.touch.length where if you press long enough on the screen something happens.

       

      All help much appreciated!

       

      Thanks

        • 1. Re: Multiple finger swipe
          bertjeuh88 Level 1

          Hammer.Press(options)

          Recognized when the pointer is down for x ms without any movement.

          OptionDefaultDescription
          eventpressName of the event.
          pointers1Required pointers.
          threshold5Minimal movement that is allowed while pressing.
          time500Minimal press time in ms.

          Events

          • press
          • pressup

           

          How do I say like hammer.on("press") and then like for 5 seconds (time)

                                           sym.play()

           

          Or hammer.on("swipe") and say with 4 fingers or something (pointers?)

                                           sym.play()

           

          Help would be amazing!