{"action":"created","issue":{"url":"https://api.github.com/repos/prime31/TouchKit/issues/47","repository_url":"https://api.github.com/repos/prime31/TouchKit","labels_url":"https://api.github.com/repos/prime31/TouchKit/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/prime31/TouchKit/issues/47/comments","events_url":"https://api.github.com/repos/prime31/TouchKit/issues/47/events","html_url":"https://github.com/prime31/TouchKit/pull/47","id":156079745,"number":47,"title":"Update to TKSwipeRecognizer.cs Logic","user":{"login":"LysanderD","id":1045008,"avatar_url":"https://avatars.githubusercontent.com/u/1045008?v=3","gravatar_id":"","url":"https://api.github.com/users/LysanderD","html_url":"https://github.com/LysanderD","followers_url":"https://api.github.com/users/LysanderD/followers","following_url":"https://api.github.com/users/LysanderD/following{/other_user}","gists_url":"https://api.github.com/users/LysanderD/gists{/gist_id}","starred_url":"https://api.github.com/users/LysanderD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LysanderD/subscriptions","organizations_url":"https://api.github.com/users/LysanderD/orgs","repos_url":"https://api.github.com/users/LysanderD/repos","events_url":"https://api.github.com/users/LysanderD/events{/privacy}","received_events_url":"https://api.github.com/users/LysanderD/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-21T02:43:34Z","updated_at":"2016-05-22T22:00:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/prime31/TouchKit/pulls/47","html_url":"https://github.com/prime31/TouchKit/pull/47","diff_url":"https://github.com/prime31/TouchKit/pull/47.diff","patch_url":"https://github.com/prime31/TouchKit/pull/47.patch"},"body":"The old version would detect swipes the moment the criteria for a \"swipe\" was met- this means checking for that criteria every single frame and firing the event mid-swipe before the finger is released, it would only detect swipes in the four cardinal directions, and it stored and checked no information about the intermediary points within the motion- only the first and final touch positions.\r\n\r\nIn this updated version, the criteria for a successful swipe are checked and (if successful) the event fired **only in the frame that the touch ends** (when the finger is picked up from the screen). In addition, four more directions have been added to the possible swipe recognition list for the four diagonal directions, an additional check is performed for \"line straightness\" which takes the total cumulative point-to-point distances for all sampled positions during the swipe motion and compares it to the \"ideal distance\" from the starting to ending points- failing if the cumulative total is more than 10% greater than the ideal (motion not straight enough). This keeps fast \"V\" motions on the screen from registering as directional swipes."},"comment":{"url":"https://api.github.com/repos/prime31/TouchKit/issues/comments/220859125","html_url":"https://github.com/prime31/TouchKit/pull/47#issuecomment-220859125","issue_url":"https://api.github.com/repos/prime31/TouchKit/issues/47","id":220859125,"user":{"login":"prime31","id":60377,"avatar_url":"https://avatars.githubusercontent.com/u/60377?v=3","gravatar_id":"","url":"https://api.github.com/users/prime31","html_url":"https://github.com/prime31","followers_url":"https://api.github.com/users/prime31/followers","following_url":"https://api.github.com/users/prime31/following{/other_user}","gists_url":"https://api.github.com/users/prime31/gists{/gist_id}","starred_url":"https://api.github.com/users/prime31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prime31/subscriptions","organizations_url":"https://api.github.com/users/prime31/orgs","repos_url":"https://api.github.com/users/prime31/repos","events_url":"https://api.github.com/users/prime31/events{/privacy}","received_events_url":"https://api.github.com/users/prime31/received_events","type":"User","site_admin":false},"created_at":"2016-05-22T22:00:16Z","updated_at":"2016-05-22T22:00:16Z","body":"This all looks good with one exception: requiring touchesEnded before firing the event wont work for most games. Any fast-paced game needs to have the event firing as soon as criteria is reached so action can be taken."}}
{"actor":{"display_login":"prime31"}}