Skip to content

Commit e685524

Browse files
committed
v0.6.0
all named module export
1 parent eb06db0 commit e685524

File tree

14 files changed

+622
-91
lines changed

14 files changed

+622
-91
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Create an HTML canvas with an appropriate width or height:
3939
Import WebGL-Plot library using ES6 modules:
4040

4141
```javascript
42-
import WebGLplot, { WebglLine, ColorRGBA } from "webgl-plot";
42+
import { WebGLplot, WebglLine, ColorRGBA } from "webgl-plot";
4343
```
4444

4545
Prepare the canvas
@@ -57,7 +57,7 @@ Initialization:
5757
const numX = canvas.width;
5858
const color = new ColorRGBA(Math.random(), Math.random(), Math.random(), 1);
5959
const line = new WebglLine(color, numX);
60-
const wglp = new WebGLplot(canvas);
60+
const wglp = new WebglPlot(canvas);
6161
```
6262

6363
Add the line to webgl canvas:
@@ -133,7 +133,8 @@ For ES6 module and direct browser import use:
133133
and in your-code.js:
134134

135135
```javascript
136-
import WebGLplot, {
136+
import {
137+
WebglPlot,
137138
WebglLine,
138139
ColorRGBA,
139140
} from "https://cdn.jsdelivr.net/gh/danchitnis/webgl-plot@master/dist/webglplot.esm.min.js";
@@ -152,6 +153,10 @@ Notice that this method is only recommended for test and small codes.
152153

153154
[Line generation and Frame rate](https://danchitnis.github.io/webgl-plot/benchmark/bench1.html)
154155

156+
## Internal test
157+
158+
[ESM](https://danchitnis.github.io/webgl-plot/test/index-esm.html), [off-screen](https://danchitnis.github.io/webgl-plot/test/index-esm-off.html), [UMD](https://danchitnis.github.io/webgl-plot/test/index-umd.html)
159+
155160
## API Documentation
156161

157162
See [here 📑](https://webgl-plot.now.sh/)

dist/webglplot.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { WebglPolar } from "./WbglPolar";
1212
import { WebglSquare } from "./WbglSquare";
1313
import type { WebglBaseLine } from "./WebglBaseLine";
1414
export { WebglLine, ColorRGBA, WebglStep, WebglPolar, WebglSquare };
15-
declare type WebGLPlotConfig = {
15+
declare type WebglPlotConfig = {
1616
antialias?: boolean;
1717
transparent?: boolean;
1818
powerPerformance?: "default" | "high-performance" | "low-power";
@@ -23,7 +23,7 @@ declare type WebGLPlotConfig = {
2323
/**
2424
* The main class for the webgl-plot library
2525
*/
26-
export default class WebGLPlot {
26+
export declare class WebglPlot {
2727
/**
2828
* @private
2929
*/
@@ -118,7 +118,7 @@ export default class WebGLPlot {
118118
* }
119119
* ```
120120
*/
121-
constructor(canvas: HTMLCanvasElement | OffscreenCanvas, options?: WebGLPlotConfig);
121+
constructor(canvas: HTMLCanvasElement | OffscreenCanvas, options?: WebglPlotConfig);
122122
/**
123123
* updates and redraws the content of the plot
124124
*/

dist/webglplot.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)