Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@pixi/filter-blur
Advanced tools
@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.
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];
gl-react-blur is a package for applying blur effects in React applications using WebGL. It is similar to @pixi/filter-blur in that it provides blur functionality, but it is designed specifically for use with React and WebGL, offering a different integration approach compared to PixiJS.
npm install @pixi/filter-blur
import '@pixi/filter-blur';
FAQs
Filter that blurs the display object
We found that @pixi/filter-blur demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.