Created
April 26, 2011 10:14
-
-
Save benedikt/942074 to your computer and use it in GitHub Desktop.
Both are equivalent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gesticulate.buildGesture('stay-two-up', function(gesture) { | |
gesture.isHorizontal(); | |
gesture.finger(1).stays(); | |
gesture.finger(2).moves().up().and.doesNotRespectScale(); | |
gesture.finger(3).moves().up().and.doesNotRespectScale(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var line = new Gesticulate.Geometry.Line(0, 0, 0, -1); | |
var opts = { scaleInvariant: true }; | |
var gesture = new Gesticulate.Gesture([ | |
new Gesticulate.Recognizer.Stay(), | |
new Gesticulate.Recognizer.Stroke(line, opts), | |
new Gesticulate.Recognizer.Stroke(line, opts) | |
], { mapping: 'horizontal' }); | |
Gesticulate.registerGesture('stay-two-up', gesture); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment