mirror of
https://github.com/photonstorm/phaser
synced 2024-12-14 07:13:00 +00:00
Added blitter coordinates to bob output
This commit is contained in:
parent
d220634fb6
commit
a5a112114b
2 changed files with 6 additions and 3 deletions
|
@ -23,7 +23,10 @@ var BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, ca
|
|||
ca = renderer.setAlpha(bob.alpha);
|
||||
}
|
||||
|
||||
renderer.blitImage(bob.x, bob.y, bob.frame, camera);
|
||||
// var x = src.x + bob.x + frame.x - cameraScrollX + ((frame.width) * (bob.flipX ? 1 : 0));
|
||||
// var y = src.y + bob.y + frame.y - cameraScrollY + ((frame.height) * (bob.flipY ? 1 : 0));
|
||||
|
||||
renderer.blitImage(src.x + bob.x, src.y + bob.y, bob.frame, camera);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ var BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, cam
|
|||
var uvs = frame.uvs;
|
||||
var width = frame.width * (bob.flipX ? -1 : 1);
|
||||
var height = frame.height * (bob.flipY ? -1 : 1);
|
||||
var x = bob.x + frame.x - cameraScrollX + ((frame.width) * (bob.flipX ? 1 : 0.0));
|
||||
var y = bob.y + frame.y - cameraScrollY + ((frame.height) * (bob.flipY ? 1 : 0.0));
|
||||
var x = src.x + bob.x + frame.x - cameraScrollX + ((frame.width) * (bob.flipX ? 1 : 0));
|
||||
var y = src.y + bob.y + frame.y - cameraScrollY + ((frame.height) * (bob.flipY ? 1 : 0));
|
||||
var xw = x + width;
|
||||
var yh = y + height;
|
||||
var tx = x * a + y * c + e;
|
||||
|
|
Loading…
Reference in a new issue