
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
org.webjars.npm:webgl-context
Advanced tools
Grabs a WebGLRenderingContext, returning null if it doesn't exist. Similar to 2d-context.
//get a webgl context, will be null if not found
var gl = require('webgl-context')()
if (gl) {
document.body.appendChild(gl.canvas)
//do something...
}
Or, with options:
//or with optional settings...
var gl = require('webgl-context')({
canvas: canvas, //the canvas DOM element to use
width: 400, //resizes the canvas..
height: 200,
antialias: true //can specify custom attributes here
})
ctx = require('webgl-context')([opt])
Gets a new canvas context with optional parameters:
canvas
a canvas element to use, otherwise creates a new elementwidth
a width to set, otherwise no changeheight
a height to set, otherwise no changealpha
and antialias
You can then get a reference of the canvas element with ctx.canvas
.
MIT, see LICENSE.md for details.
FAQs
WebJar for webgl-context
We found that org.webjars.npm:webgl-context demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.