@gjsify/webgl 0.3.13 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/conformance/attribs.spec.js +312 -293
- package/lib/esm/conformance/buffers.spec.js +217 -200
- package/lib/esm/conformance/context.spec.js +295 -295
- package/lib/esm/conformance/programs.spec.js +458 -445
- package/lib/esm/conformance/rendering-basic.spec.js +134 -128
- package/lib/esm/conformance/rendering.spec.js +502 -400
- package/lib/esm/conformance/setup.js +42 -31
- package/lib/esm/conformance/state.spec.js +360 -343
- package/lib/esm/conformance/textures.spec.js +330 -338
- package/lib/esm/conformance/uniforms.spec.js +465 -309
- package/lib/esm/conformance-test.js +24 -22
- package/lib/esm/extensions/ext-blend-minmax.js +16 -16
- package/lib/esm/extensions/ext-color-buffer-float.js +10 -11
- package/lib/esm/extensions/ext-color-buffer-half-float.js +10 -11
- package/lib/esm/extensions/ext-texture-filter-anisotropic.js +16 -16
- package/lib/esm/extensions/oes-element-index-unit.js +11 -12
- package/lib/esm/extensions/oes-standard-derivatives.js +15 -15
- package/lib/esm/extensions/oes-texture-float-linear.js +11 -12
- package/lib/esm/extensions/oes-texture-float.js +11 -12
- package/lib/esm/extensions/oes-texture-half-float.js +17 -17
- package/lib/esm/extensions/stackgl-destroy-context.js +10 -10
- package/lib/esm/extensions/stackgl-resize-drawing-buffer.js +10 -10
- package/lib/esm/html-canvas-element.js +64 -64
- package/lib/esm/index.js +29 -26
- package/lib/esm/linkable.js +49 -49
- package/lib/esm/test-utils.js +158 -107
- package/lib/esm/test.js +8 -4
- package/lib/esm/types/index.js +5 -5
- package/lib/esm/utils.js +164 -187
- package/lib/esm/webgl-active-info.js +10 -9
- package/lib/esm/webgl-bridge.js +162 -147
- package/lib/esm/webgl-buffer.js +17 -15
- package/lib/esm/webgl-context-attributes.js +23 -22
- package/lib/esm/webgl-context-base.js +3039 -3351
- package/lib/esm/webgl-drawing-buffer-wrapper.js +10 -9
- package/lib/esm/webgl-framebuffer.js +108 -106
- package/lib/esm/webgl-program.js +25 -23
- package/lib/esm/webgl-query.js +15 -13
- package/lib/esm/webgl-renderbuffer.js +23 -21
- package/lib/esm/webgl-rendering-context.js +173 -187
- package/lib/esm/webgl-sampler.js +15 -13
- package/lib/esm/webgl-shader-precision-format.js +10 -9
- package/lib/esm/webgl-shader.js +23 -21
- package/lib/esm/webgl-sync.js +15 -13
- package/lib/esm/webgl-texture-unit.js +12 -11
- package/lib/esm/webgl-texture.js +21 -19
- package/lib/esm/webgl-transform-feedback.js +15 -13
- package/lib/esm/webgl-uniform-location.js +14 -13
- package/lib/esm/webgl-vertex-array-object.js +20 -18
- package/lib/esm/webgl-vertex-attribute.js +149 -145
- package/lib/esm/webgl1.spec.js +1039 -650
- package/lib/esm/webgl2-rendering-context.js +1210 -1273
- package/lib/esm/webgl2.spec.js +1284 -1252
- package/package.json +9 -9
- package/lib/esm/@types/glsl-tokenizer/index.d.js +0 -0
package/lib/esm/linkable.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
export {
|
|
49
|
-
Linkable
|
|
1
|
+
//#region src/ts/linkable.ts
|
|
2
|
+
var Linkable = class {
|
|
3
|
+
constructor(_) {
|
|
4
|
+
this._ = 0;
|
|
5
|
+
this._references = [];
|
|
6
|
+
this._refCount = 0;
|
|
7
|
+
this._pendingDelete = false;
|
|
8
|
+
this._binding = 0;
|
|
9
|
+
this._ = _;
|
|
10
|
+
this._references = [];
|
|
11
|
+
this._refCount = 0;
|
|
12
|
+
this._pendingDelete = false;
|
|
13
|
+
this._binding = 0;
|
|
14
|
+
}
|
|
15
|
+
_link(b) {
|
|
16
|
+
this._references.push(b);
|
|
17
|
+
b._refCount += 1;
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
_unlink(b) {
|
|
21
|
+
let idx = this._references.indexOf(b);
|
|
22
|
+
if (idx < 0) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
while (idx >= 0) {
|
|
26
|
+
this._references[idx] = this._references[this._references.length - 1];
|
|
27
|
+
this._references.pop();
|
|
28
|
+
b._refCount -= 1;
|
|
29
|
+
b._checkDelete();
|
|
30
|
+
idx = this._references.indexOf(b);
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
_linked(b) {
|
|
35
|
+
return this._references.indexOf(b) >= 0;
|
|
36
|
+
}
|
|
37
|
+
_checkDelete() {
|
|
38
|
+
if (this._refCount <= 0 && this._pendingDelete && this._ !== 0) {
|
|
39
|
+
while (this._references.length > 0) {
|
|
40
|
+
this._unlink(this._references[0]);
|
|
41
|
+
}
|
|
42
|
+
this._performDelete();
|
|
43
|
+
this._ = 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
_performDelete() {}
|
|
50
47
|
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { Linkable };
|
package/lib/esm/test-utils.js
CHANGED
|
@@ -1,116 +1,179 @@
|
|
|
1
|
+
//#region src/ts/test-utils.ts
|
|
2
|
+
/** Compile a WebGL shader from source. Does not check compile status. */
|
|
1
3
|
function makeShader(gl, type, src) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const shader = gl.createShader(type);
|
|
5
|
+
gl.shaderSource(shader, src);
|
|
6
|
+
gl.compileShader(shader);
|
|
7
|
+
return shader;
|
|
6
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Link a WebGL program from vertex + fragment source strings.
|
|
11
|
+
* Binds attribute "position" to location 0 before linking so that drawTriangle() works
|
|
12
|
+
* without an explicit getAttribLocation() call.
|
|
13
|
+
* Does not check link status — call getProgramParameter(prog, LINK_STATUS) if needed.
|
|
14
|
+
*/
|
|
7
15
|
function makeProgram(gl, vsSrc, fsSrc) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
const frag = makeShader(gl, gl.FRAGMENT_SHADER, fsSrc);
|
|
17
|
+
const vert = makeShader(gl, gl.VERTEX_SHADER, vsSrc);
|
|
18
|
+
const program = gl.createProgram();
|
|
19
|
+
gl.attachShader(program, frag);
|
|
20
|
+
gl.attachShader(program, vert);
|
|
21
|
+
gl.bindAttribLocation(program, 0, "position");
|
|
22
|
+
gl.linkProgram(program);
|
|
23
|
+
return program;
|
|
16
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Draw a fullscreen triangle using attribute location 0.
|
|
27
|
+
* Covers the entire clip space: vertices at (-2,-2), (-2,4), (4,-2).
|
|
28
|
+
* The active program must expose a vec2 attribute named "position" at location 0
|
|
29
|
+
* (ensured by makeProgram's bindAttribLocation call).
|
|
30
|
+
*/
|
|
17
31
|
function drawTriangle(gl) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
const buffer = gl.createBuffer();
|
|
33
|
+
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
|
|
34
|
+
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
|
|
35
|
+
-2,
|
|
36
|
+
-2,
|
|
37
|
+
-2,
|
|
38
|
+
4,
|
|
39
|
+
4,
|
|
40
|
+
-2
|
|
41
|
+
]), gl.STREAM_DRAW);
|
|
42
|
+
gl.enableVertexAttribArray(0);
|
|
43
|
+
gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
|
|
44
|
+
gl.drawArrays(gl.TRIANGLES, 0, 3);
|
|
45
|
+
gl.bindBuffer(gl.ARRAY_BUFFER, null);
|
|
46
|
+
gl.disableVertexAttribArray(0);
|
|
47
|
+
gl.deleteBuffer(buffer);
|
|
27
48
|
}
|
|
49
|
+
/** Read a single RGBA pixel at (x, y). Defaults to (0, 0). */
|
|
28
50
|
function readPixel(gl, x = 0, y = 0) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
51
|
+
const pixel = new Uint8Array(4);
|
|
52
|
+
gl.readPixels(x, y, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel);
|
|
53
|
+
return pixel;
|
|
32
54
|
}
|
|
55
|
+
/** Return true if |a[i] - b[i]| <= tolerance for every RGBA component. */
|
|
33
56
|
function pixelClose(a, b, tolerance = 3) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
57
|
+
for (let i = 0; i < 4; i++) {
|
|
58
|
+
if (Math.abs(a[i] - b[i]) > tolerance) return false;
|
|
59
|
+
}
|
|
60
|
+
return true;
|
|
38
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Create a w×h RGBA8 FBO and bind it as the current framebuffer.
|
|
64
|
+
* Also sets the viewport to (0, 0, w, h).
|
|
65
|
+
* Call destroyTestFBO() when done.
|
|
66
|
+
*/
|
|
39
67
|
function makeTestFBO(gl, width = 4, height = 4) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
68
|
+
const fb = gl.createFramebuffer();
|
|
69
|
+
const colorTex = gl.createTexture();
|
|
70
|
+
gl.bindTexture(gl.TEXTURE_2D, colorTex);
|
|
71
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
|
|
72
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
73
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
74
|
+
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
75
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
|
|
76
|
+
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorTex, 0);
|
|
77
|
+
gl.viewport(0, 0, width, height);
|
|
78
|
+
return {
|
|
79
|
+
fb,
|
|
80
|
+
colorTex,
|
|
81
|
+
width,
|
|
82
|
+
height
|
|
83
|
+
};
|
|
51
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Create a w×h RGBA8 FBO with a DEPTH_COMPONENT16 renderbuffer and bind it.
|
|
87
|
+
* Also sets the viewport to (0, 0, w, h).
|
|
88
|
+
* Call destroyTestFBOWithDepth() when done.
|
|
89
|
+
*/
|
|
52
90
|
function makeTestFBOWithDepth(gl, width = 4, height = 4) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
91
|
+
const base = makeTestFBO(gl, width, height);
|
|
92
|
+
const depthRb = gl.createRenderbuffer();
|
|
93
|
+
gl.bindRenderbuffer(gl.RENDERBUFFER, depthRb);
|
|
94
|
+
gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, width, height);
|
|
95
|
+
gl.bindRenderbuffer(gl.RENDERBUFFER, null);
|
|
96
|
+
gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthRb);
|
|
97
|
+
return {
|
|
98
|
+
...base,
|
|
99
|
+
depthRb
|
|
100
|
+
};
|
|
60
101
|
}
|
|
102
|
+
/** Unbind the FBO and delete the color texture. */
|
|
61
103
|
function destroyTestFBO(gl, fbo) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
104
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, fbo.fb);
|
|
105
|
+
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);
|
|
106
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
107
|
+
gl.deleteTexture(fbo.colorTex);
|
|
108
|
+
gl.deleteFramebuffer(fbo.fb);
|
|
67
109
|
}
|
|
110
|
+
/** Unbind the FBO and delete both the color texture and depth renderbuffer. */
|
|
68
111
|
function destroyTestFBOWithDepth(gl, fbo) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
112
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, fbo.fb);
|
|
113
|
+
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);
|
|
114
|
+
gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, null);
|
|
115
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
|
116
|
+
gl.deleteTexture(fbo.colorTex);
|
|
117
|
+
gl.deleteRenderbuffer(fbo.depthRb);
|
|
118
|
+
gl.deleteFramebuffer(fbo.fb);
|
|
76
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Create a w×h RGBA16F FBO (half-float color texture) and bind it.
|
|
122
|
+
* Used for testing Three.js post-processing render target patterns.
|
|
123
|
+
*/
|
|
77
124
|
function makeTestFBOFloat(gl, width = 4, height = 4) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
125
|
+
const RGBA16F = 34842;
|
|
126
|
+
const HALF_FLOAT = 5131;
|
|
127
|
+
const fb = gl.createFramebuffer();
|
|
128
|
+
const colorTex = gl.createTexture();
|
|
129
|
+
gl.bindTexture(gl.TEXTURE_2D, colorTex);
|
|
130
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, RGBA16F, width, height, 0, gl.RGBA, HALF_FLOAT, null);
|
|
131
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
132
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
133
|
+
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
134
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
|
|
135
|
+
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorTex, 0);
|
|
136
|
+
gl.viewport(0, 0, width, height);
|
|
137
|
+
return {
|
|
138
|
+
fb,
|
|
139
|
+
colorTex,
|
|
140
|
+
width,
|
|
141
|
+
height
|
|
142
|
+
};
|
|
91
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Create a w×h RGBA8 FBO with a DEPTH_COMPONENT24 texture attachment.
|
|
146
|
+
* Three.js uses depth textures (not renderbuffers) for RenderPixelatedPass.
|
|
147
|
+
*/
|
|
92
148
|
function makeTestFBOWithDepthTexture(gl, width = 4, height = 4) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
149
|
+
const DEPTH_COMPONENT24 = 33190;
|
|
150
|
+
const DEPTH_COMPONENT = 6402;
|
|
151
|
+
const UNSIGNED_INT = 5125;
|
|
152
|
+
const fb = gl.createFramebuffer();
|
|
153
|
+
const colorTex = gl.createTexture();
|
|
154
|
+
gl.bindTexture(gl.TEXTURE_2D, colorTex);
|
|
155
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
|
|
156
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
157
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
158
|
+
const depthTex = gl.createTexture();
|
|
159
|
+
gl.bindTexture(gl.TEXTURE_2D, depthTex);
|
|
160
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, DEPTH_COMPONENT24, width, height, 0, DEPTH_COMPONENT, UNSIGNED_INT, null);
|
|
161
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
|
|
162
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
|
|
163
|
+
gl.bindTexture(gl.TEXTURE_2D, null);
|
|
164
|
+
gl.bindFramebuffer(gl.FRAMEBUFFER, fb);
|
|
165
|
+
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, colorTex, 0);
|
|
166
|
+
gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, depthTex, 0);
|
|
167
|
+
gl.viewport(0, 0, width, height);
|
|
168
|
+
return {
|
|
169
|
+
fb,
|
|
170
|
+
colorTex,
|
|
171
|
+
depthTex,
|
|
172
|
+
width,
|
|
173
|
+
height
|
|
174
|
+
};
|
|
113
175
|
}
|
|
176
|
+
/** WebGL2 passthrough texture shader (samples texture at UV and outputs it). */
|
|
114
177
|
const TEXTURE_VS_300 = `#version 300 es
|
|
115
178
|
in vec2 position;
|
|
116
179
|
out vec2 vUv;
|
|
@@ -126,6 +189,7 @@ out vec4 fragColor;
|
|
|
126
189
|
void main() {
|
|
127
190
|
fragColor = texture(uTexture, vUv);
|
|
128
191
|
}`;
|
|
192
|
+
/** WebGL2 cubemap sampling shader. */
|
|
129
193
|
const CUBEMAP_FS_300 = `#version 300 es
|
|
130
194
|
precision mediump float;
|
|
131
195
|
uniform samplerCube uCubemap;
|
|
@@ -134,19 +198,6 @@ out vec4 fragColor;
|
|
|
134
198
|
void main() {
|
|
135
199
|
fragColor = texture(uCubemap, uDirection);
|
|
136
200
|
}`;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
TEXTURE_VS_300,
|
|
141
|
-
destroyTestFBO,
|
|
142
|
-
destroyTestFBOWithDepth,
|
|
143
|
-
drawTriangle,
|
|
144
|
-
makeProgram,
|
|
145
|
-
makeShader,
|
|
146
|
-
makeTestFBO,
|
|
147
|
-
makeTestFBOFloat,
|
|
148
|
-
makeTestFBOWithDepth,
|
|
149
|
-
makeTestFBOWithDepthTexture,
|
|
150
|
-
pixelClose,
|
|
151
|
-
readPixel
|
|
152
|
-
};
|
|
201
|
+
|
|
202
|
+
//#endregion
|
|
203
|
+
export { CUBEMAP_FS_300, TEXTURE_FS_300, TEXTURE_VS_300, destroyTestFBO, destroyTestFBOWithDepth, drawTriangle, makeProgram, makeShader, makeTestFBO, makeTestFBOFloat, makeTestFBOWithDepth, makeTestFBOWithDepthTexture, pixelClose, readPixel };
|
package/lib/esm/test.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import webgl1_spec_default from "./webgl1.spec.js";
|
|
2
|
+
import webgl2_spec_default from "./webgl2.spec.js";
|
|
1
3
|
import { run } from "@gjsify/unit";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
+
|
|
5
|
+
//#region src/ts/test.ts
|
|
4
6
|
run({ testSuite: async () => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
await webgl1_spec_default();
|
|
8
|
+
await webgl2_spec_default();
|
|
7
9
|
} });
|
|
10
|
+
|
|
11
|
+
//#endregion
|
package/lib/esm/types/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import "./constructor.js";
|
|
2
|
+
import "./extension.js";
|
|
3
|
+
import "./typed-array.js";
|
|
4
|
+
import "./webgl-constants.js";
|
|
5
|
+
import "./webgl-context-attribute-options.js";
|