mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 01:17:43 +00:00
Merged itrs to single call
This commit is contained in:
parent
ebb926bdaf
commit
5ef7d18ead
2 changed files with 7 additions and 12 deletions
|
@ -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);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue