Merged itrs to single call

This commit is contained in:
Richard Davey 2019-01-22 14:46:17 +00:00
parent ebb926bdaf
commit 5ef7d18ead
2 changed files with 7 additions and 12 deletions

View file

@ -150,11 +150,14 @@ var BaseCamera = new Class({
this.name = '';
/**
* This property is un-used in v3.16.
*
* The resolution of the Game, used in most Camera calculations.
*
* @name Phaser.Cameras.Scene2D.BaseCamera#resolution
* @type {number}
* @readonly
* @deprecated
* @since 3.12.0
*/
this.resolution = 1;
@ -952,12 +955,8 @@ var BaseCamera = new Class({
displayHeight
);
matrix.loadIdentity();
matrix.scale(resolution, resolution);
matrix.translate(this.x + originX, this.y + originY);
matrix.rotate(this.rotation);
matrix.scale(zoom, zoom);
matrix.translate(-(originX / resolution), -(originY / resolution));
matrix.applyITRS(this.x + originX, this.y + originY, this.rotation, zoom, zoom);
matrix.translate(-originX, -originY);
},
/**

View file

@ -772,12 +772,8 @@ var Camera = new Class({
displayHeight
);
matrix.loadIdentity();
matrix.scale(resolution, resolution);
matrix.translate(this.x + originX, this.y + originY);
matrix.rotate(this.rotation);
matrix.scale(zoom, zoom);
matrix.translate(-(originX / resolution), -(originY / resolution));
matrix.applyITRS(this.x + originX, this.y + originY, this.rotation, zoom, zoom);
matrix.translate(-originX, -originY);
this.shakeEffect.preRender();
},