Socket
Socket
Sign inDemoInstall

@luma.gl/constants

Package Overview
Dependencies
0
Maintainers
7
Versions
211
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @luma.gl/constants

WebGL and WebGL2 constants


Version published
Weekly downloads
258K
increased by11.19%
Maintainers
7
Created
Weekly downloads
 

Package description

What is @luma.gl/constants?

@luma.gl/constants is a package that provides a set of constants used in WebGL and WebGL2 for rendering graphics. These constants are essential for setting up and managing various WebGL states and operations, such as defining buffer types, shader types, and texture parameters.

What are @luma.gl/constants's main functionalities?

Buffer Types

This feature provides constants for different types of buffers used in WebGL. ARRAY_BUFFER is used for vertex attributes, and ELEMENT_ARRAY_BUFFER is used for element indices.

const { ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER } = require('@luma.gl/constants');
console.log(ARRAY_BUFFER); // 34962
console.log(ELEMENT_ARRAY_BUFFER); // 34963

Shader Types

This feature provides constants for different types of shaders. VERTEX_SHADER is used for vertex processing, and FRAGMENT_SHADER is used for fragment processing.

const { VERTEX_SHADER, FRAGMENT_SHADER } = require('@luma.gl/constants');
console.log(VERTEX_SHADER); // 35633
console.log(FRAGMENT_SHADER); // 35632

Texture Parameters

This feature provides constants for texture parameters. TEXTURE_2D is used for 2D textures, TEXTURE_WRAP_S and TEXTURE_WRAP_T are used for texture wrapping modes, and REPEAT is a wrapping mode that repeats the texture.

const { TEXTURE_2D, TEXTURE_WRAP_S, TEXTURE_WRAP_T, REPEAT } = require('@luma.gl/constants');
console.log(TEXTURE_2D); // 3553
console.log(TEXTURE_WRAP_S); // 10242
console.log(TEXTURE_WRAP_T); // 10243
console.log(REPEAT); // 10497

Other packages similar to @luma.gl/constants

Changelog

Source

9.0.0-alpha.36

  • fix: Fix picking in instancing showcase example (#1814)
  • chore: UniformStore-related cleanup (#1813)
  • feat(core): UniformStore / uniform buffers (#1812)
  • chore: Update WebGPU examples to latest WGSL (#1808)
  • chore(shadertools): clean up code, types, file and directory structure (#1809)
  • feat(core): Device API exposes a new VertexArray resource type. (#1806)
  • feat(webgl): Rename parameter setters to emphasize they take WebGL paramaters (#1804)

Readme

Source

@luma.gl/constants

Overview

Exports an object with all WebGL1 and WebGL2 constants.

Note: This file is framework independent and can be used by any webgl application.

About luma.gl

luma.gl is the engine that powers applications and frameworks like

  • kepler.gl WebGL based visualization overlays
  • deck.gl WebGL based visualization overlays

Documentation

For details, please refer to the extensive online website.

Keywords

FAQs

Last updated on 23 Sep 2023

Did you know?

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