Skip to content

Commit 8119ce7

Browse files
committed
Fixed use of old camera private properties
1 parent 76d2630 commit 8119ce7

5 files changed

Lines changed: 24 additions & 24 deletions

File tree

src/cameras/2d/effects/Fade.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ var Fade = new Class({
290290
var camera = this.camera;
291291

292292
ctx.fillStyle = 'rgba(' + this.red + ',' + this.green + ',' + this.blue + ',' + this.alpha + ')';
293-
ctx.fillRect(camera._cx, camera._cy, camera._cw, camera._ch);
293+
ctx.fillRect(camera.x, camera.y, camera.width, camera.height);
294294

295295
return true;
296296
},
@@ -319,7 +319,7 @@ var Fade = new Class({
319319
var green = this.green / 255;
320320

321321
pipeline.drawFillRect(
322-
camera._cx, camera._cy, camera._cw, camera._ch,
322+
camera.x, camera.y, camera.width, camera.height,
323323
getTintFunction(red, green, blue, 1),
324324
this.alpha
325325
);

src/cameras/2d/effects/Flash.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ var Flash = new Class({
258258
var camera = this.camera;
259259

260260
ctx.fillStyle = 'rgba(' + this.red + ',' + this.green + ',' + this.blue + ',' + this.alpha + ')';
261-
ctx.fillRect(camera._cx, camera._cy, camera._cw, camera._ch);
261+
ctx.fillRect(camera.x, camera.y, camera.width, camera.height);
262262

263263
return true;
264264
},
@@ -287,7 +287,7 @@ var Flash = new Class({
287287
var green = this.green / 255;
288288

289289
pipeline.drawFillRect(
290-
camera._cx, camera._cy, camera._cw, camera._ch,
290+
camera.x, camera.y, camera.width, camera.height,
291291
getTintFunction(red, green, blue, 1),
292292
this.alpha
293293
);

src/gameobjects/rendertexture/RenderTexture.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,10 @@ var RenderTexture = new Class({
539539

540540
if (gl)
541541
{
542-
var cx = camera._cx;
543-
var cy = camera._cy;
544-
var cw = camera._cw;
545-
var ch = camera._ch;
542+
var cx = camera.x;
543+
var cy = camera.y;
544+
var cw = camera.width;
545+
var ch = camera.height;
546546

547547
renderer.resetTextures(true);
548548

@@ -778,10 +778,10 @@ var RenderTexture = new Class({
778778

779779
if (gl)
780780
{
781-
var cx = camera._cx;
782-
var cy = camera._cy;
783-
var cw = camera._cw;
784-
var ch = camera._ch;
781+
var cx = camera.x;
782+
var cy = camera.y;
783+
var cw = camera.width;
784+
var ch = camera.height;
785785

786786
renderer.resetTextures(true);
787787

@@ -872,10 +872,10 @@ var RenderTexture = new Class({
872872

873873
if (gl)
874874
{
875-
var cx = camera._cx;
876-
var cy = camera._cy;
877-
var cw = camera._cw;
878-
var ch = camera._ch;
875+
var cx = camera.x;
876+
var cy = camera.y;
877+
var cw = camera.width;
878+
var ch = camera.height;
879879

880880
renderer.resetTextures(true);
881881

src/renderer/canvas/CanvasRenderer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,10 @@ var CanvasRenderer = new Class({
364364
var list = children.list;
365365
var childCount = list.length;
366366

367-
var cx = camera._cx;
368-
var cy = camera._cy;
369-
var cw = camera._cw;
370-
var ch = camera._ch;
367+
var cx = camera.x;
368+
var cy = camera.y;
369+
var cw = camera.width;
370+
var ch = camera.height;
371371

372372
var ctx = (camera.renderToTexture) ? camera.context : scene.sys.context;
373373

src/renderer/webgl/WebGLRenderer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,10 +1998,10 @@ var WebGLRenderer = new Class({
19981998
*/
19991999
preRenderCamera: function (camera)
20002000
{
2001-
var cx = camera._cx;
2002-
var cy = camera._cy;
2003-
var cw = camera._cw;
2004-
var ch = camera._ch;
2001+
var cx = camera.x;
2002+
var cy = camera.y;
2003+
var cw = camera.width;
2004+
var ch = camera.height;
20052005

20062006
var color = camera.backgroundColor;
20072007

0 commit comments

Comments
 (0)