Socket
Socket
Sign inDemoInstall

@pixi/constants

Package Overview
Dependencies
0
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/constants


Version published
Maintainers
1
Install size
96.1 kB
Created

Package description

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

Readme

Source

@pixi/constants

Installation

npm install @pixi/constants

Usage

import * as constants from '@pixi/constants';

FAQs

Last updated on 27 Jul 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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc