Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@luma.gl/constants
Advanced tools
@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.
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
gl-matrix is a high-performance matrix and vector library for WebGL. While it does not provide WebGL constants, it offers utilities for matrix and vector operations, which are essential for 3D graphics rendering.
twgl.js is a library that simplifies the use of WebGL. It provides functions for creating shaders, buffers, and textures, and includes constants similar to those in @luma.gl/constants. However, twgl.js is more focused on simplifying WebGL programming rather than just providing constants.
Three.js is a popular 3D library that abstracts WebGL complexities and provides a higher-level API for creating 3D graphics. It includes many constants and utilities for 3D rendering, making it a more comprehensive solution compared to @luma.gl/constants.
Exports an object with all WebGL1 and WebGL2 constants.
Note: This file is framework independent and can be used by any webgl application.
luma.gl is the engine that powers applications and frameworks like
For details, please refer to the extensive online website.
9.0.0-alpha.50
FAQs
WebGL2 constants
The npm package @luma.gl/constants receives a total of 100,603 weekly downloads. As such, @luma.gl/constants popularity was classified as popular.
We found that @luma.gl/constants demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.