Reputation: 4202
I need to recreate an iPhone game using html5 and javascript and one of it's features is number recognition but all I'm seeing on the internet is only about detecting simple gestures like swipe to the left right top down circle etc.
But what I need is detecting gesture of numbers, I know it's possible but I really can't find anything in the internet about number recognition, any tutorials that you know of that can help me do this?
Upvotes: 1
Views: 2307
Reputation: 36517
Gesture recognition isn't as complicated as you might think. The basic idea is to split your "writing" into several simple movements (like swipes).
I'd try the following:
Some examples:
Of course you'll need some approximations and tolerance, and you might want to reuse an existing library, but this also depends on the actual task (e.g. you might be forced to write something from scratch).
Upvotes: 4
Reputation:
You can define your own gestures, by providing array of points, that defines shape and provide callback function for each shape.
Javascript gesture recognition:
http://webcodingeasy.com/JS-classes/Javascript-gesture-recognition
Upvotes: 1
Reputation:
Try this http://www.photonstorm.com/phaser
It said:
Talk to a Phaser.Pointer and it doesn’t matter if the input came from a touch-screen or mouse, it can even change mid-game without dropping a beat. Multi-touch, Mouse, Keyboard and lots of useful functions allow you to code custom gesture recognition.
I think you need that custom gesture recognition.
Upvotes: 1