Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/filter-blur

Package Overview
Dependencies
Maintainers
3
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/filter-blur

Filter that blurs the display object

  • 5.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
134K
increased by11.05%
Maintainers
3
Weekly downloads
 
Created

What is @pixi/filter-blur?

@pixi/filter-blur is a package that provides a blur filter for use with the PixiJS rendering library. It allows developers to apply a blur effect to display objects within a PixiJS application, enhancing visual aesthetics or creating specific visual effects.

What are @pixi/filter-blur's main functionalities?

Basic Blur Application

This code demonstrates how to apply a basic blur filter to a sprite in a PixiJS application. The BlurFilter is created and then applied to the sprite's filters array.

const app = new PIXI.Application();
document.body.appendChild(app.view);

const sprite = PIXI.Sprite.from('path/to/image.png');
app.stage.addChild(sprite);

const blurFilter = new PIXI.filters.BlurFilter();
sprite.filters = [blurFilter];

Adjusting Blur Strength

This example shows how to adjust the strength of the blur effect by setting the 'blur' property of the BlurFilter. A higher value results in a stronger blur effect.

const blurFilter = new PIXI.filters.BlurFilter();
blurFilter.blur = 5;
sprite.filters = [blurFilter];

Directional Blur

This code demonstrates how to apply a directional blur by setting different values for 'blurX' and 'blurY'. This can create effects like motion blur in a specific direction.

const blurFilter = new PIXI.filters.BlurFilter();
blurFilter.blurX = 10;
blurFilter.blurY = 0;
sprite.filters = [blurFilter];

Other packages similar to @pixi/filter-blur

FAQs

Package last updated on 28 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc