Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graspologic/renderer-glsl

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graspologic/renderer-glsl - npm Package Compare versions

Comparing version 0.7.0-7 to 0.7.0-8

0

dist/cjs/shaders/node.fs.glsl.js

@@ -0,0 +0,0 @@ module.exports = `#version 300 es

38

dist/cjs/shaders/node.vs.glsl.js

@@ -38,4 +38,2 @@ module.exports = `#version 300 es

varying float vOnScreen;
void main() {

@@ -68,37 +66,11 @@ picking_setPickingColor(aPickingColor);

vColor.a = aSaturation;
// float f = 1.0 - aSaturation;
// float L = (0.3 * vColor.r + 0.6 * vColor.g + 0.1 * vColor.b);
// L += (1.0 - L) * 0.5;
// vColor.r += f * (L - vColor.r);
// vColor.g += f * (L - vColor.g);
// vColor.b += f * (L - vColor.b);
vColor.a = aSaturation * vColor.a;
/* calculate the center of the node with respect to the screen (-1, -1) to (1, 1) */
vec4 center = uProjection * uModelView * vec4(position, 1.0);
vec2 center2D = center.xy / center.w;
#ifdef SHOW_FILTERED_OUT_NODES
/* calculate the current vertex with respect to the screen (-1, -1) to (1, 1) */
vec2 vertex2D = gl_Position.xy / gl_Position.w;
/* half the offset between the center to the vertex */
vec2 offset = (vertex2D - center2D) * 0.5;
/* axis lengths to the center */
vec2 lengths = abs(offset);
/* calculate the center of the quadrant defined by the center and this vertex */
vec2 quadCenter = center2D + offset;
/* check if the quadrant defined by the center and this vertex overlaps with the screen */
vOnScreen =
step(0.0, center.w) * // the center is in front of the screen AND
step(quadCenter.x - lengths.x, 1.0) * // left side of the quad is less than the right side of the screen AND
step(-1.0, quadCenter.x + lengths.x) * // left side of the screen is less than the right side of the quad AND
step(quadCenter.y - lengths.y, 1.0) * // bottom side of the quad is less than the top side of the screen AND
step(-1.0, quadCenter.y + lengths.y); // bottom side of the screen is less than the top side of the quad
#ifdef ALPHA_MODE
// This one hides nodes that are fully saturated
float saturationScale = 1.0 - step(1.0, aSaturation);
#else
// This one hides nodes that aren't fully saturated
float saturationScale = step(1.0, aSaturation);

@@ -105,0 +77,0 @@ #endif

@@ -0,0 +0,0 @@ export default `#version 300 es

@@ -38,4 +38,2 @@ export default `#version 300 es

varying float vOnScreen;
void main() {

@@ -68,37 +66,11 @@ picking_setPickingColor(aPickingColor);

vColor.a = aSaturation;
// float f = 1.0 - aSaturation;
// float L = (0.3 * vColor.r + 0.6 * vColor.g + 0.1 * vColor.b);
// L += (1.0 - L) * 0.5;
// vColor.r += f * (L - vColor.r);
// vColor.g += f * (L - vColor.g);
// vColor.b += f * (L - vColor.b);
vColor.a = aSaturation * vColor.a;
/* calculate the center of the node with respect to the screen (-1, -1) to (1, 1) */
vec4 center = uProjection * uModelView * vec4(position, 1.0);
vec2 center2D = center.xy / center.w;
#ifdef SHOW_FILTERED_OUT_NODES
/* calculate the current vertex with respect to the screen (-1, -1) to (1, 1) */
vec2 vertex2D = gl_Position.xy / gl_Position.w;
/* half the offset between the center to the vertex */
vec2 offset = (vertex2D - center2D) * 0.5;
/* axis lengths to the center */
vec2 lengths = abs(offset);
/* calculate the center of the quadrant defined by the center and this vertex */
vec2 quadCenter = center2D + offset;
/* check if the quadrant defined by the center and this vertex overlaps with the screen */
vOnScreen =
step(0.0, center.w) * // the center is in front of the screen AND
step(quadCenter.x - lengths.x, 1.0) * // left side of the quad is less than the right side of the screen AND
step(-1.0, quadCenter.x + lengths.x) * // left side of the screen is less than the right side of the quad AND
step(quadCenter.y - lengths.y, 1.0) * // bottom side of the quad is less than the top side of the screen AND
step(-1.0, quadCenter.y + lengths.y); // bottom side of the screen is less than the top side of the quad
#ifdef ALPHA_MODE
// This one hides nodes that are fully saturated
float saturationScale = 1.0 - step(1.0, aSaturation);
#else
// This one hides nodes that aren't fully saturated
float saturationScale = step(1.0, aSaturation);

@@ -105,0 +77,0 @@ #endif

2

package.json
{
"name": "@graspologic/renderer-glsl",
"version": "0.7.0-7",
"version": "0.7.0-8",
"description": "Graph data visualization core renderer (GLSL Code)",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc