Skip to content

Commit e851209

Browse files
committed
Camera effects using the new drawFillRect method.
1 parent 947d301 commit e851209

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,10 @@ var Fade = new Class({
365365
var blue = this.blue / 255;
366366
var green = this.green / 255;
367367

368-
pipeline.batchFillRect(
369-
0, 0, 1, 1, 0,
368+
pipeline.drawFillRect(
370369
camera._cx, camera._cy, camera._cw, camera._ch,
371370
getTintFunction(red, green, blue, 1),
372-
this.alpha,
373-
1, 0, 0, 1, 0, 0,
374-
[ 1, 0, 0, 1, 0, 0 ]
371+
this.alpha
375372
);
376373

377374
return true;

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,13 +312,10 @@ var Flash = new Class({
312312
var blue = this.blue / 255;
313313
var green = this.green / 255;
314314

315-
pipeline.batchFillRect(
316-
0, 0, 1, 1, 0,
315+
pipeline.drawFillRect(
317316
camera._cx, camera._cy, camera._cw, camera._ch,
318317
getTintFunction(red, green, blue, 1),
319-
this.alpha,
320-
1, 0, 0, 1, 0, 0,
321-
[ 1, 0, 0, 1, 0, 0 ]
318+
this.alpha
322319
);
323320

324321
return true;

0 commit comments

Comments
 (0)