Jump to content

how to use pixi filters.


Recommended Posts

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 function

i thinked pixi have implemented pixi


can i apply blur on the whole game?


ty for any advice


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...