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.
glsl-2d-primitives
Advanced tools
SDF functions to draw 2d shapes in glsl. Antialiased using glsl-aastep.
npm i glsl-2d-primitives -S
#pragma glslify: circle = require(glsl-2d-primitives/circle)
#pragma glslify: rectangle = require(glsl-2d-primitives/rectangle)
#pragma glslify: polygon = require(glsl-2d-primitives/polygon)
attribute vec2 vUv;
uniform sampler2D map;
void main() {
gl_FragColor = texture2D(map, vUv);
// Mask the image with a centered rectangle
gl_FragColor.a = rectangle(vUv, vec2(0.4, 0.6));
// Draw a pentagon, without alpha masking
gl.FragColor = vec4(vec3(polygon(vUv, 0.4, 5.0)), 1.0);
// Mask the image with a ring, combining 2 circles
float ring = circle(vUv, 0.5) * (1.0 - circle(vUv, 0.52));
gl_FragColor.a = ring;
}
MIT. See LICENSE for details.
FAQs
SDF functions to draw 2D shapes in glsl.
The npm package glsl-2d-primitives receives a total of 5 weekly downloads. As such, glsl-2d-primitives popularity was classified as not popular.
We found that glsl-2d-primitives 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.