Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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
gets a WebGLRenderingContext
The npm package webgl-context receives a total of 116,704 weekly downloads. As such, webgl-context popularity was classified as popular.
We found that webgl-context demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.