Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 5bfa7a10d5
Fetching contributors…

Cannot retrieve contributors at this time

88 lines (58 sloc) 2.867 kB

HyperTouch:

HyperTouch is a native extension for Haxe / NME to handle native gestures on your Android & iOS devices.

Gestures Currently supported are:

- Tap
- Double Tap
- Two Fingers Tap
- Pinch
- Rotate ( iOS only for now )
- Swipe
- Pan

Updates

09/01/2012 :

Android overhaul for more performance and readability of the java code.
Add two fingers tap and DoubleTap.
RelaxyGuy Fix ( thanks ) for the Velocity Tracker bug.

09/04/2012 :

ARMV7 support for iOS added

Getting started

First include the path to the HyperTouch folder in your NMML project file.

<include path="extensions/hypertouch" if="mobile"/>

Adding listeners :

var hyp = HyperTouch.getInstance( );
    hyp.addEventListener( GesturePanEvent.PAN , _onPan , false );
    hyp.addEventListener( GesturePinchEvent.PINCH , _onPinch , false );
    hyp.addEventListener( GestureSwipeEvent.SWIPE , _onSwipe , false );
    hyp.addEventListener( GestureTapEvent.DOUBLE_TAP , _onDoubleTap , false );
    hyp.addEventListener( GestureTapEvent.TAP , _onTap , false );
    hyp.addEventListener( GestureTapEvent.TWO_FINGERS_TAP , _onTwoFingers , false );

TODO:

- Long Press
- Velocity
- Maybe pressures… support on Android
- Gestures phases
- Rotation for android
( … )

Misc

I’m not an Objective-C / Java pro-coder, so any suggestion / optimization is welcome.
I need more feedbacks, bugs…

Tested on Devices :

Android:
- Nexus One 2.3.6
- Motorola Xoom 4.1.1
- Galaxy Nexus 4.0

iOS:
- iPad 1 & 2
- iPod 2G
- iPhone 4G

Twitter

http://twitter.com/shoe_box

Made at Hyperfiction

( www.hyperfiction.fr )

License

The MIT License

Copyright © 2012 Hyperfiction / shoebox

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 rightsto 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.

Jump to Line
Something went wrong with that request. Please try again.