mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +00:00
All swapped to using renderer matrices to make pipelines smaller
This commit is contained in:
parent
327b31d561
commit
4ba2b0eb7b
15 changed files with 21 additions and 21 deletions
|
@ -38,7 +38,7 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, src, camera, parentMatr
|
|||
var spriteMatrix = result.sprite;
|
||||
var calcMatrix = result.calc;
|
||||
|
||||
var fontMatrix = pipeline._tempMatrix4;
|
||||
var fontMatrix = renderer._tempMatrix4;
|
||||
|
||||
var crop = (src.cropWidth > 0 || src.cropHeight > 0);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ var BlitterWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
var cameraScrollX = camera.scrollX * src.scrollFactorX;
|
||||
var cameraScrollY = camera.scrollY * src.scrollFactorY;
|
||||
|
||||
var calcMatrix = pipeline._tempMatrix1;
|
||||
var calcMatrix = renderer._tempMatrix1;
|
||||
|
||||
calcMatrix.copyFrom(camera.matrix);
|
||||
|
||||
|
|
|
@ -177,11 +177,11 @@ var PointLight = new Class({
|
|||
|
||||
renderWebGL: function (renderer, src, camera, parentTransformMatrix)
|
||||
{
|
||||
var pipeline = renderer.pipelines.set(this.pipeline);
|
||||
renderer.pipelines.set(src.pipeline);
|
||||
|
||||
var camMatrix = pipeline._tempMatrix1;
|
||||
var lightMatrix = pipeline._tempMatrix2;
|
||||
var calcMatrix = pipeline._tempMatrix3;
|
||||
var camMatrix = renderer._tempMatrix1;
|
||||
var lightMatrix = renderer._tempMatrix2;
|
||||
var calcMatrix = renderer._tempMatrix3;
|
||||
|
||||
var width = src.width;
|
||||
var height = src.height;
|
||||
|
|
|
@ -32,10 +32,10 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, camera, p
|
|||
|
||||
var pipeline = renderer.pipelines.set(this.pipeline);
|
||||
|
||||
var camMatrix = pipeline._tempMatrix1;
|
||||
var calcMatrix = pipeline._tempMatrix2;
|
||||
var particleMatrix = pipeline._tempMatrix3;
|
||||
var managerMatrix = pipeline._tempMatrix4;
|
||||
var camMatrix = renderer._tempMatrix1;
|
||||
var calcMatrix = renderer._tempMatrix2;
|
||||
var particleMatrix = renderer._tempMatrix3;
|
||||
var managerMatrix = renderer._tempMatrix4;
|
||||
|
||||
if (parentMatrix)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ var ArcWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
var calcMatrix = renderer._tempMatrix1.copyFrom(result.calc);
|
||||
|
||||
var dx = src._displayOriginX;
|
||||
var dy = src._displayOriginY;
|
||||
|
|
|
@ -28,7 +28,7 @@ var CurveWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
var calcMatrix = renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
var dx = src._displayOriginX + src._curveBounds.x;
|
||||
var dy = src._displayOriginY + src._curveBounds.y;
|
||||
|
|
|
@ -28,7 +28,7 @@ var EllipseWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
var calcMatrix = renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
var dx = src._displayOriginX;
|
||||
var dy = src._displayOriginY;
|
||||
|
|
|
@ -27,7 +27,7 @@ var GridWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
var calcMatrix = renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
calcMatrix.translate(-src._displayOriginX, -src._displayOriginY);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ var IsoBoxWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
var calcMatrix = renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
var size = src.width;
|
||||
var height = src.height;
|
||||
|
|
|
@ -27,7 +27,7 @@ var IsoTriangleWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
var calcMatrix = renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
var size = src.width;
|
||||
var height = src.height;
|
||||
|
|
|
@ -27,7 +27,7 @@ var LineWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
var dx = src._displayOriginX;
|
||||
var dy = src._displayOriginY;
|
||||
|
|
|
@ -28,7 +28,7 @@ var PolygonWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
var calcMatrix = renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
var dx = src._displayOriginX;
|
||||
var dy = src._displayOriginY;
|
||||
|
|
|
@ -28,7 +28,7 @@ var RectangleWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
var dx = src._displayOriginX;
|
||||
var dy = src._displayOriginY;
|
||||
|
|
|
@ -28,7 +28,7 @@ var StarWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
var calcMatrix = pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
var calcMatrix = renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
var dx = src._displayOriginX;
|
||||
var dy = src._displayOriginY;
|
||||
|
|
|
@ -28,7 +28,7 @@ var TriangleWebGLRenderer = function (renderer, src, camera, parentMatrix)
|
|||
|
||||
var result = GetCalcMatrix(src, camera, parentMatrix);
|
||||
|
||||
pipeline._tempMatrix3.copyFrom(result.calc);
|
||||
renderer._tempMatrix3.copyFrom(result.calc);
|
||||
|
||||
var dx = src._displayOriginX;
|
||||
var dy = src._displayOriginY;
|
||||
|
|
Loading…
Reference in a new issue