Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@pixi/constants

Package Overview
Dependencies
Maintainers
2
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/constants

Constants used across PixiJS

latest
latest-7.x
Source
npmnpm
Version
7.4.3
Version published
Maintainers
2
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 06 Mar 2025

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