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

@pixi/constants

Package Overview
Dependencies
Maintainers
1
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

  • 6.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
47K
decreased by-61.06%
Maintainers
1
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 02 Mar 2021

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