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

@pixi/constants

Package Overview
Dependencies
Maintainers
2
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/constants

Constants used across PixiJS

  • 7.2.0-rc.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
127K
increased by6.03%
Maintainers
2
Weekly downloads
 
Created

What is @pixi/constants?

@pixi/constants is a package that provides a set of constants used throughout the PixiJS library. These constants are essential for defining various properties and behaviors in the rendering process, such as blend modes, draw modes, and texture formats.

What are @pixi/constants's main functionalities?

Blend Modes

Blend modes are used to determine how colors are combined when drawing one object over another. The @pixi/constants package provides predefined blend modes like ADD, MULTIPLY, and SCREEN.

const { BLEND_MODES } = require('@pixi/constants');
console.log(BLEND_MODES.ADD); // Output: 1

Draw Modes

Draw modes define how vertices are interpreted when rendering shapes. The package includes constants for different draw modes such as POINTS, LINES, and TRIANGLES.

const { DRAW_MODES } = require('@pixi/constants');
console.log(DRAW_MODES.TRIANGLES); // Output: 4

Texture Formats

Texture formats specify the format of the pixel data in textures. The @pixi/constants package provides constants for various formats like RGBA, RGB, and ALPHA.

const { FORMATS } = require('@pixi/constants');
console.log(FORMATS.RGBA); // Output: 6408

Other packages similar to @pixi/constants

FAQs

Package last updated on 10 Mar 2023

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