Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shohan4556/fec5e2c3b9e43cdf1cabe4bccd1c5043 to your computer and use it in GitHub Desktop.
Save shohan4556/fec5e2c3b9e43cdf1cabe4bccd1c5043 to your computer and use it in GitHub Desktop.
(this.mouseUpCallback = null),
(this.mouseOutCallback = null),
(this.mouseOverCallback = null),
(this.touchStartCallback = null),
(this.touchMoveCallback = null),
(this.touchEndCallback = null),
(this.capture = !1),
(this.active = !1),
(this.enabled = !0),
@@ -10805,9 +10802,6 @@ var momentData = JSON.parse(onmoHtmlGame.momentDatas);
(this._onMouseDown = null),
(this._onMouseMove = null),
(this._onMouseUp = null),
(this._onTouchStart = null),
(this._onTouchMove = null),
(this._onTouchEnd = null),
(this._onMouseOut = null),
(this._onMouseOver = null);
}),
@@ -10825,15 +10819,6 @@ var momentData = JSON.parse(onmoHtmlGame.momentDatas);
var e = this;
(this._onMouseDown = function (t) {
return e.onMouseDown(t);
}),
(this._onTouchStart = function (t) {
return e.onTouchStart(t);
}),
(this._onTouchMove = function (t) {
return e.onTouchMove(t);
}),
(this._onTouchEnd = function (t) {
return e.onTouchEnd(t);
}),
(this._onMouseMove = function (t) {
return e.onMouseMove(t);
@@ -10858,11 +10843,6 @@ var momentData = JSON.parse(onmoHtmlGame.momentDatas);
i.addEventListener('mousedown', this._onMouseDown, !0),
i.addEventListener('mousemove', this._onMouseMove, !0),
i.addEventListener('mouseup', this._onMouseUp, !0),
i.addEventListener('touchstart', this._onTouchStart, !0),
i.addEventListener('touchmove', this._onTouchMove, !0),
i.addEventListener('touchend', this._onTouchEnd, !0),
t.cocoonJS ||
(window.addEventListener('mouseup', this._onMouseUpGlobal, !0),
window.addEventListener('mouseout', this._onMouseOutGlobal, !0),
@@ -10881,20 +10861,6 @@ var momentData = JSON.parse(onmoHtmlGame.momentDatas);
onMouseUp: function (t) {
(this.event = t), this.capture && t.preventDefault(), this.mouseUpCallback && this.mouseUpCallback.call(this.callbackContext, t), this.input.enabled && this.enabled && ((t.identifier = 0), this.input.mousePointer.stop(t));
},
onTouchStart: function (t) {
if ((this.game.input.executeTouchLockCallbacks(!1, t), (this.event = t), this.game.input.enabled && this.enabled)) {
this.touchStartCallback && this.touchStartCallback.call(this.callbackContext, t), this.preventDefault && t.preventDefault();
for (var e = 0; e < t.changedTouches.length; e++) this.game.input.startPointer(t.changedTouches[e]);
}
},
onTouchMove: function (t) {
(this.event = t), this.touchMoveCallback && this.touchMoveCallback.call(this.callbackContext, t), this.preventDefault && t.preventDefault();
for (var e = 0; e < t.changedTouches.length; e++) this.game.input.updatePointer(t.changedTouches[e]);
},
onTouchEnd: function (t) {
this.game.input.executeTouchLockCallbacks(!0, t), (this.event = t), this.touchEndCallback && this.touchEndCallback.call(this.callbackContext, t), this.preventDefault && t.preventDefault();
for (var e = 0; e < t.changedTouches.length; e++) this.game.input.stopPointer(t.changedTouches[e]);
},
onMouseUpGlobal: function (t) {
this.input.mousePointer.withinGame || (this.mouseUpCallback && this.mouseUpCallback.call(this.callbackContext, t), (t.identifier = 0), this.input.mousePointer.stop(t));
},
@@ -10922,9 +10888,6 @@ var momentData = JSON.parse(onmoHtmlGame.momentDatas);
t.removeEventListener('mouseup', this._onMouseUp, !0),
t.removeEventListener('mouseover', this._onMouseOver, !0),
t.removeEventListener('mouseout', this._onMouseOut, !0),
t.removeEventListener('touchstart', this._onTouchStart, !0),
t.removeEventListener('touchmove', this._onTouchMove, !0),
t.removeEventListener('touchend', this._onTouchEnd, !0),
window.removeEventListener('mouseup', this._onMouseUpGlobal, !0),
window.removeEventListener('mouseout', this._onMouseOutGlobal, !0),
(this.active = !1);
@@ -35311,7 +35274,7 @@ window.addEventListener(
},
false
);
if (RUNNING_ON_IOS) {
document.addEventListener('touchstart', function (e) {
e.preventDefault();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment