Skip to content

Instantly share code, notes, and snippets.

@cacheleocode
Last active December 20, 2015 02:49
Show Gist options
  • Select an option

  • Save cacheleocode/6058881 to your computer and use it in GitHub Desktop.

Select an option

Save cacheleocode/6058881 to your computer and use it in GitHub Desktop.
// extra_finish.touchend
if (e.pageY == undefined)
{
var touch = e.originalEvent.touches [0] || e.originalEvent.changedTouches [0];
this.swipeEndY = touch.pageY;
if(this.swipeEndY < this.swipeStartY - 60) // swipe up
{
if(sym.getPosition() != sym.getDuration())
{
sym.play();
}
}
}
// extra_finish.touchstart
if (e.pageY == undefined)
{
var touch = e.originalEvent.touches [0] || e.originalEvent.changedTouches [0];
this.swipeStartY = touch.pageY;
}
// extra_start.touchend
if (e.pageY == undefined)
{
var touch = e.originalEvent.touches [0] || e.originalEvent.changedTouches [0];
this.swipeEndY = touch.pageY;
if(this.swipeStartY < this.swipeEndY - 60) // swipe down
{
if(sym.getPosition() != sym.getDuration())
{
sym.play();
}
}
}
// extra_start.touchstart
if (e.pageY == undefined)
{
var touch = e.originalEvent.touches [0] || e.originalEvent.changedTouches [0];
this.swipeStartY = touch.pageY;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment