webgl-plot
Advanced tools
Comparing version
@@ -59,2 +59,3 @@ /** | ||
private _lines; | ||
get lines(): WebglBaseLine[]; | ||
private progThinLine; | ||
@@ -74,3 +75,3 @@ /** | ||
* ```typescript | ||
* const canvas = dcoument.getEelementbyId("canvas"); | ||
* const canvas = document.getElementbyId("canvas"); | ||
* | ||
@@ -105,3 +106,2 @@ * const devicePixelRatio = window.devicePixelRatio || 1; | ||
constructor(canvas: HTMLCanvasElement | OffscreenCanvas, options?: WebGLPlotConfig); | ||
get lines(): WebglBaseLine[]; | ||
/** | ||
@@ -108,0 +108,0 @@ * updates and redraws the content of the plot |
@@ -291,3 +291,3 @@ class ColorRGBA { | ||
* ```typescript | ||
* const canvas = dcoument.getEelementbyId("canvas"); | ||
* const canvas = document.getElementbyId("canvas"); | ||
* | ||
@@ -351,6 +351,4 @@ * const devicePixelRatio = window.devicePixelRatio || 1; | ||
this.gOffsetY = 0; | ||
// Enable the depth test | ||
this.webgl.enable(this.webgl.DEPTH_TEST); | ||
// Clear the color and depth buffer | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT); | ||
// Clear the color | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT); | ||
// Set the view port | ||
@@ -391,3 +389,3 @@ this.webgl.viewport(0, 0, canvas.width, canvas.height); | ||
//this.webgl.clearColor(0.1, 0.1, 0.1, 1.0); | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT); | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT); | ||
} | ||
@@ -394,0 +392,0 @@ /** |
@@ -26,3 +26,3 @@ /** | ||
* ```typescript | ||
* const canvas = dcoument.getEelementbyId("canvas"); | ||
* const canvas = document.getElementbyId("canvas"); | ||
* | ||
@@ -86,6 +86,4 @@ * const devicePixelRatio = window.devicePixelRatio || 1; | ||
this.gOffsetY = 0; | ||
// Enable the depth test | ||
this.webgl.enable(this.webgl.DEPTH_TEST); | ||
// Clear the color and depth buffer | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT); | ||
// Clear the color | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT); | ||
// Set the view port | ||
@@ -126,3 +124,3 @@ this.webgl.viewport(0, 0, canvas.width, canvas.height); | ||
//this.webgl.clearColor(0.1, 0.1, 0.1, 1.0); | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT); | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT); | ||
} | ||
@@ -129,0 +127,0 @@ /** |
@@ -297,3 +297,3 @@ (function (global, factory) { | ||
* ```typescript | ||
* const canvas = dcoument.getEelementbyId("canvas"); | ||
* const canvas = document.getElementbyId("canvas"); | ||
* | ||
@@ -357,6 +357,4 @@ * const devicePixelRatio = window.devicePixelRatio || 1; | ||
this.gOffsetY = 0; | ||
// Enable the depth test | ||
this.webgl.enable(this.webgl.DEPTH_TEST); | ||
// Clear the color and depth buffer | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT); | ||
// Clear the color | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT); | ||
// Set the view port | ||
@@ -397,3 +395,3 @@ this.webgl.viewport(0, 0, canvas.width, canvas.height); | ||
//this.webgl.clearColor(0.1, 0.1, 0.1, 1.0); | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT); | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT); | ||
} | ||
@@ -400,0 +398,0 @@ /** |
{ | ||
"name": "webgl-plot", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "High-performance 2D plotting library based on native WebGL", | ||
@@ -9,10 +9,21 @@ "main": "./dist/webglplot.umd.js", | ||
"types": "./dist/webglplot.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./dist/webglplot.umd.js", | ||
"import": "./dist/webglplot.esm.js" | ||
} | ||
}, | ||
"keywords": [ | ||
"webgl", | ||
"plot", | ||
"performance" | ||
], | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^4.0.1", | ||
"@typescript-eslint/parser": "^4.0.1", | ||
"eslint": "^7.8.1", | ||
"rollup": "^2.26.10", | ||
"typedoc": "^0.19.1", | ||
"typedoc-plugin-markdown": "^2.4.2", | ||
"typescript": "^4.0.2" | ||
"@typescript-eslint/eslint-plugin": "^4.3.0", | ||
"@typescript-eslint/parser": "^4.3.0", | ||
"eslint": "^7.10.0", | ||
"rollup": "^2.28.2", | ||
"typedoc": "^0.19.2", | ||
"typedoc-plugin-markdown": "^3.0.5", | ||
"typescript": "^4.0.3" | ||
}, | ||
@@ -19,0 +30,0 @@ "scripts": { |
@@ -70,2 +70,6 @@ /** | ||
get lines(): WebglBaseLine[] { | ||
return this._lines; | ||
} | ||
private progThinLine: WebGLProgram; | ||
@@ -87,3 +91,3 @@ | ||
* ```typescript | ||
* const canvas = dcoument.getEelementbyId("canvas"); | ||
* const canvas = document.getElementbyId("canvas"); | ||
* | ||
@@ -147,8 +151,5 @@ * const devicePixelRatio = window.devicePixelRatio || 1; | ||
// Enable the depth test | ||
this.webgl.enable(this.webgl.DEPTH_TEST); | ||
// Clear the color | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT); | ||
// Clear the color and depth buffer | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT); | ||
// Set the view port | ||
@@ -162,6 +163,2 @@ this.webgl.viewport(0, 0, canvas.width, canvas.height); | ||
get lines(): WebglBaseLine[] { | ||
return this._lines; | ||
} | ||
/** | ||
@@ -208,3 +205,3 @@ * updates and redraws the content of the plot | ||
//this.webgl.clearColor(0.1, 0.1, 0.1, 1.0); | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT || this.webgl.DEPTH_BUFFER_BIT); | ||
this.webgl.clear(this.webgl.COLOR_BUFFER_BIT); | ||
} | ||
@@ -211,0 +208,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
98690
-0.62%2419
-0.33%