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

webgl-plot

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webgl-plot - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

package.json
{
"name": "webgl-plot",
"version": "0.2.3",
"version": "0.2.4",
"description": "High-performance 2D plotting framework based on native WebGL",

@@ -5,0 +5,0 @@ "main": "./dist/index",

@@ -21,6 +21,6 @@ /**

public scaleX: number;
public scaleY: number;
public offsetX: number;
public offsetY: number;
public gScaleX: number;
public gScaleY: number;
public gOffsetX: number;
public gOffsetY: number;

@@ -54,6 +54,6 @@ public lines: WebglBaseLine[];

this.scaleX = 1;
this.scaleY = 1;
this.offsetX = 0;
this.offsetY = 0;
this.gScaleX = 1;
this.gScaleY = 1;
this.gOffsetX = 0;
this.gOffsetY = 0;

@@ -87,6 +87,6 @@ this.backgroundColor = backgroundColor;

const uscale = webgl.getUniformLocation(line.prog, "uscale");
webgl.uniformMatrix2fv(uscale, false, new Float32Array([this.scaleX, 0, 0, this.scaleY]));
webgl.uniformMatrix2fv(uscale, false, new Float32Array([line.scaleX * this.gScaleX, 0, 0, line.scaleY * this.gScaleY]));
const uoffset = webgl.getUniformLocation(line.prog, "uoffset");
webgl.uniform2fv(uoffset, new Float32Array([this.offsetX, this.offsetY]));
webgl.uniform2fv(uoffset, new Float32Array([line.offsetX + this.gOffsetX, line.offsetY + this.gOffsetY]));

@@ -93,0 +93,0 @@ const uColor = webgl.getUniformLocation(line.prog, "uColor");

@@ -27,2 +27,7 @@

this.visible = true;
this.scaleX = 1;
this.scaleY = 1;
this.offsetX = 0;
this.offsetY = 0;
}

@@ -29,0 +34,0 @@

@@ -18,2 +18,7 @@ import {ColorRGBA} from "./ColorRGBA";

public scaleX: number;
public scaleY: number;
public offsetX: number;
public offsetY: number;
}
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