Phaser now running on iOS. Also fixed a legacy bug where a pending sound wouldn't play once it was touch unlocked. Also fixed Input not working on WebGL contexts. Added WebGL texture updates to the Group/World swap functions.

This commit is contained in:
Richard Davey
2013-09-10 16:46:39 +01:00
parent 5da0e42be4
commit a486bf6b4a
17 changed files with 338 additions and 201 deletions
+5 -5
View File
@@ -52,12 +52,12 @@ Phaser.MSPointer.prototype = {
return _this.onPointerUp(event);
};
this.game.stage.canvas.addEventListener('MSPointerDown', this._onMSPointerDown, false);
this.game.stage.canvas.addEventListener('MSPointerMove', this._onMSPointerMove, false);
this.game.stage.canvas.addEventListener('MSPointerUp', this._onMSPointerUp, false);
this.game.renderer.view.addEventListener('MSPointerDown', this._onMSPointerDown, false);
this.game.renderer.view.addEventListener('MSPointerMove', this._onMSPointerMove, false);
this.game.renderer.view.addEventListener('MSPointerUp', this._onMSPointerUp, false);
this.game.stage.canvas.style['-ms-content-zooming'] = 'none';
this.game.stage.canvas.style['-ms-touch-action'] = 'none';
this.game.renderer.view.style['-ms-content-zooming'] = 'none';
this.game.renderer.view.style['-ms-touch-action'] = 'none';
}
+4 -3
View File
@@ -55,9 +55,10 @@ Phaser.Mouse.prototype = {
return _this.onMouseUp(event);
};
this.game.stage.canvas.addEventListener('mousedown', this._onMouseDown, true);
this.game.stage.canvas.addEventListener('mousemove', this._onMouseMove, true);
this.game.stage.canvas.addEventListener('mouseup', this._onMouseUp, true);
this.game.renderer.view.addEventListener('mousedown', this._onMouseDown, true);
this.game.renderer.view.addEventListener('mousemove', this._onMouseMove, true);
this.game.renderer.view.addEventListener('mouseup', this._onMouseUp, true);
},
/**
-2
View File
@@ -242,8 +242,6 @@ Phaser.Pointer.prototype = {
{
this.game.input.x = this.x * this.game.input.scale.x;
this.game.input.y = this.y * this.game.input.scale.y;
// this.game.input.x = this.x;
// this.game.input.y = this.y;
this.game.input.position.setTo(this.x, this.y);
this.game.input.onDown.dispatch(this);
this.game.input.resetSpeed(this.x, this.y);
+6 -6
View File
@@ -77,12 +77,12 @@ Phaser.Touch.prototype = {
return _this.consumeTouchMove(event);
};
this.game.stage.canvas.addEventListener('touchstart', this._onTouchStart, false);
this.game.stage.canvas.addEventListener('touchmove', this._onTouchMove, false);
this.game.stage.canvas.addEventListener('touchend', this._onTouchEnd, false);
this.game.stage.canvas.addEventListener('touchenter', this._onTouchEnter, false);
this.game.stage.canvas.addEventListener('touchleave', this._onTouchLeave, false);
this.game.stage.canvas.addEventListener('touchcancel', this._onTouchCancel, false);
this.game.renderer.view.addEventListener('touchstart', this._onTouchStart, false);
this.game.renderer.view.addEventListener('touchmove', this._onTouchMove, false);
this.game.renderer.view.addEventListener('touchend', this._onTouchEnd, false);
this.game.renderer.view.addEventListener('touchenter', this._onTouchEnter, false);
this.game.renderer.view.addEventListener('touchleave', this._onTouchLeave, false);
this.game.renderer.view.addEventListener('touchcancel', this._onTouchCancel, false);
document.addEventListener('touchmove', this._documentTouchMove, false);
}