Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
glsl-out-of-range
Advanced tools
Readme
Tests if a point is outside ranges. It could be useful in vertex & fragment shaders to support reversed ranges (bounds) in 3D/2D scenes.
Function prototypes:
bool outOfRange(float a, float b, float p);
bool outOfRange(vec2 a, vec2 b, vec2 p);
bool outOfRange(vec3 a, vec3 b, vec3 p);
bool outOfRange(vec4 a, vec4 b, vec4 p);
Please note that in the case of vec4 input arguments, only 3 tests are made i.e. for xyz and not for w.
#pragma glslify: outOfRange = require(glsl-out-of-range)
void main() {
if (outOfRange(bounds[0], bounds[1], position)) discard;
gl_FragColor = vec4(1.0, 0.5, 0.25, 1.0);
}
Install with npm:
npm install glsl-out-of-range
Then use with glslify.
#pragma glslify: outOfRange = require(glsl-out-of-range)
Github | ||
---|---|---|
Alex C. Johnson | @alexcjohnson | |
Étienne Tétreault-Pinard | @etpinard | @etpinard |
Mojtaba Samimi | @archmoj |
Code and documentation copyright 2018 Plotly, Inc.
Code released under the MIT license.
Docs released under the Creative Commons license.
FAQs
Functions to test if a point is outside ranges, namely useful for 3D/2D scenes that may have reversed bounds
The npm package glsl-out-of-range receives a total of 52,414 weekly downloads. As such, glsl-out-of-range popularity was classified as popular.
We found that glsl-out-of-range demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 23 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.