Pixi GrayFilter ported over (thanks nickryall #404)

Fixed Time.totalElapsedSeconds, which gets the other filters working again too.
This commit is contained in:
photonstorm
2014-02-27 22:35:06 +00:00
parent a8bd5db7ba
commit 3568dc4ff1
5 changed files with 75 additions and 0 deletions
+4
View File
@@ -252,6 +252,10 @@
"file": "fire.js",
"title": "fire"
},
{
"file": "gray.js",
"title": "gray"
},
{
"file": "lightbeams.js",
"title": "lightbeams"
+19
View File
@@ -0,0 +1,19 @@
var game = new Phaser.Game(800, 600, Phaser.WEBGL, 'phaser-example', { preload: preload, create: create });
function preload() {
game.load.image('phaser', 'assets/sprites/phaser2.png');
game.load.script('gray', '../filters/Gray.js');
}
function create() {
var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'phaser');
logo.anchor.setTo(0.5, 0.5);
var gray = game.add.filter('Gray');
logo.filters = [gray];
}