Jump to content

Blur with Pixi v3


Danetag
 Share

Recommended Posts

Hey folks!

I'm running through an issue with pixi v3. It seems that the blur filter isn't working correctly, or I might have used it in a wrong way, I can't tell. Here's what I'm doing:

this.spriteBG = new PIXI.Sprite(PIXI.utils.TextureCache[this.options.id]);this.spriteBG.cacheAsBitmap = true;this.addChild(this.spriteBG);this.blurFilter = new PIXI.filters.BlurFilter();this.blurFilter.blur  = 50;this.spriteBG.filters = [this.blurFilter];

The result is weird, the texture seems just duplicated and positioned with a different alpha, not blurred at all.

Then, when I try to tween the value, nothing happens.

TweenMax.to({    blur: this.blurFilter.blur}, .3, {    blur: blur,     ease: Cubic.easeOut,     onUpdateParams:["{self}"],     onUpdate:$.proxy(function(tween){        this.blurFilter.blur = tween.target.blur;        this.spriteBG.filters = [this.blurFilter];   },this) });

Did I do something wrong?

 

Thanks!

 

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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