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

@pixi/filter-alpha

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/filter-alpha

Filter that applies alpha evenly across the entire display object and any opaque elements it contains

  • 5.3.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
137K
increased by9.06%
Maintainers
1
Weekly downloads
 
Created

What is @pixi/filter-alpha?

@pixi/filter-alpha is a filter for the PixiJS library that allows you to adjust the alpha (transparency) of display objects. This can be useful for creating fade effects, highlighting, or other visual effects that require changing the transparency of elements in a PixiJS application.

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

Adjusting Alpha Transparency

This code sample demonstrates how to apply an alpha filter to a sprite in a PixiJS application. The AlphaFilter is set to 0.5, making the sprite 50% transparent.

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

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

const alphaFilter = new PIXI.filters.AlphaFilter(0.5);
sprite.filters = [alphaFilter];

Other packages similar to @pixi/filter-alpha

FAQs

Package last updated on 17 Dec 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