Name | Type | Default | Description |
---|---|---|---|
shape |
PIXI.Rectangle | PIXI.Circle | PIXI.DisplayObject |
The area where the blur effect should be applied to. Relative to the canvas, NOT relative to the PIXI.DisplayObject where the blur effect is assigned to! |
|
blur |
number | 50 |
optional
The strength of the blur. |
Example
// Create the app
const app = new PIXIApp({
view: canvas,
width: 480,
height: 270,
transparent: false
}).setup().run()
// Add a video sprite
const sprite = new PIXI.Sprite(PIXI.Texture.fromVideo("assets/blurfilter.mp4"))
sprite.width = app.size.width
sprite.height = app.size.height
app.scene.addChild(sprite)
// Create the filter and assign it to the scene
const blurFilter = new BlurFilter(new PIXI.Rectangle(20, 20, 80, 60))
app.scene.filters = [blurFilter]
Extends
- PIXI.Filter
Members
-
The strength of the blur.
-
The blur shape.