s4m_ur4i Posted January 17, 2016 Share Posted January 17, 2016 Hello everyone, The filter (PIXI JS) does not work correctly. It blures a whole iamge so that only the main color in it is shown code and image : var game = new Phaser.Game(1280, 720, Phaser.WEBGL, this, false, false), init = function(){}; init.prototype = { preload: function(){ game.load.script('grayX', 'filters/tiltshiftfilterx.js'); game.load.script('grayY', 'filters/tiltshiftfiltery.js'); game.load.script('gray', 'filters/tilshiftfilter.js'); game.load.image("test", "assets/test.png"); }, create: function(){ var testSprite = game.add.sprite(0,0,'test'); var tiltShift = new PIXI.TiltShiftFilter(); console.log(tiltShift); tiltShift.blurnumber = 3; tiltShift.gradientBlur = 1500; testSprite.filters = [tiltShift]; } } game.state.add('init', init); game.state.start('init'); Works great in PIXI.JS standalone, ORIGINAL POST IN PIXI.JS FORUM: Link to comment Share on other sites More sharing options...
s4m_ur4i Posted January 20, 2016 Author Share Posted January 20, 2016 closed ** Link to comment Share on other sites More sharing options...
Recommended Posts