nak3ddogs Posted December 4, 2014 Report Share Posted December 4, 2014 hi! how can i use pixi filter? it wont work for me: this.grayFilter = new PIXI.GrayFilter(); this.aluljaro.filter = [this.grayFilter];i got this in console:Uncaught TypeError: undefined is not a functioni thinked pixi have implemented pixi can i apply blur on the whole game? ty for any advice Quote Link to comment Share on other sites More sharing options...
rich Posted December 4, 2014 Report Share Posted December 4, 2014 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];}You'll find Gray.js in the filters folder in the Phaser repository. nak3ddogs 1 Quote Link to comment Share on other sites More sharing options...
nak3ddogs Posted December 6, 2014 Author Report Share Posted December 6, 2014 i thinked i can use the pixi filters natively Quote Link to comment Share on other sites More sharing options...
rich Posted December 7, 2014 Report Share Posted December 7, 2014 You can - but they need loading first, they're not included with Phaser. nak3ddogs 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.