@gjsify/webgl 0.1.1 → 0.1.3
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/canvas-webgl-widget.js +12 -0
- package/lib/esm/conformance/attribs.spec.js +296 -0
- package/lib/esm/conformance/buffers.spec.js +203 -0
- package/lib/esm/conformance/context.spec.js +302 -0
- package/lib/esm/conformance/programs.spec.js +468 -0
- package/lib/esm/conformance/rendering-basic.spec.js +136 -0
- package/lib/esm/conformance/rendering.spec.js +424 -0
- package/lib/esm/conformance/setup.js +36 -0
- package/lib/esm/conformance/state.spec.js +348 -0
- package/lib/esm/conformance/textures.spec.js +354 -0
- package/lib/esm/conformance/uniforms.spec.js +305 -0
- package/lib/esm/conformance-test.js +23 -0
- package/lib/esm/extensions/ext-color-buffer-float.js +13 -0
- package/lib/esm/extensions/ext-color-buffer-half-float.js +13 -0
- package/lib/esm/extensions/oes-texture-half-float.js +19 -0
- package/lib/esm/index.js +5 -0
- package/lib/esm/test-utils.js +65 -0
- package/lib/esm/test.js +2 -2
- package/lib/esm/webgl-buffer.js +1 -1
- package/lib/esm/webgl-context-base.js +3371 -0
- package/lib/esm/webgl-framebuffer.js +1 -1
- package/lib/esm/webgl-program.js +1 -1
- package/lib/esm/webgl-renderbuffer.js +1 -1
- package/lib/esm/webgl-rendering-context.js +95 -3253
- package/lib/esm/webgl-shader.js +2 -1
- package/lib/esm/webgl-texture.js +1 -1
- package/lib/esm/{index.spec.js → webgl1.spec.js} +2 -2
- package/lib/esm/webgl2-rendering-context.js +617 -27
- package/lib/esm/webgl2.spec.js +573 -1
- package/lib/types/conformance/setup.d.ts +14 -0
- package/lib/types/extensions/ext-blend-minmax.d.ts +2 -2
- package/lib/types/extensions/ext-color-buffer-float.d.ts +4 -0
- package/lib/types/extensions/ext-color-buffer-half-float.d.ts +4 -0
- package/lib/types/extensions/ext-texture-filter-anisotropic.d.ts +2 -2
- package/lib/types/extensions/oes-element-index-unit.d.ts +2 -2
- package/lib/types/extensions/oes-standard-derivatives.d.ts +2 -2
- package/lib/types/extensions/oes-texture-float-linear.d.ts +2 -2
- package/lib/types/extensions/oes-texture-float.d.ts +2 -2
- package/lib/types/extensions/oes-texture-half-float.d.ts +5 -0
- package/lib/types/extensions/stackgl-destroy-context.d.ts +3 -3
- package/lib/types/extensions/stackgl-resize-drawing-buffer.d.ts +3 -3
- package/lib/types/index.d.ts +1 -0
- package/lib/types/test-utils.d.ts +24 -0
- package/lib/types/types/extension.d.ts +2 -2
- package/lib/types/utils.d.ts +9 -10
- package/lib/types/webgl-buffer.d.ts +3 -3
- package/lib/types/webgl-context-base.d.ts +267 -0
- package/lib/types/webgl-framebuffer.d.ts +3 -3
- package/lib/types/webgl-program.d.ts +3 -3
- package/lib/types/webgl-renderbuffer.d.ts +3 -3
- package/lib/types/webgl-rendering-context.d.ts +5 -250
- package/lib/types/webgl-shader.d.ts +4 -3
- package/lib/types/webgl-texture-unit.d.ts +3 -3
- package/lib/types/webgl-texture.d.ts +3 -3
- package/lib/types/webgl-vertex-attribute.d.ts +5 -5
- package/lib/types/webgl2-rendering-context.d.ts +95 -6
- package/package.json +13 -11
- package/prebuilds/linux-x86_64/Gwebgl-0.1.typelib +0 -0
- package/prebuilds/linux-x86_64/libgwebgl.so +0 -0
|
@@ -1,263 +1,18 @@
|
|
|
1
|
-
import '@girs/gdkpixbuf-2.0';
|
|
2
1
|
import Gwebgl from '@girs/gwebgl-0.1';
|
|
3
|
-
import
|
|
4
|
-
import { WebGLContextAttributes } from './webgl-context-attributes.js';
|
|
2
|
+
import { WebGLContextBase } from './webgl-context-base.js';
|
|
5
3
|
import { HTMLCanvasElement } from './html-canvas-element.js';
|
|
6
|
-
import { WebGLActiveInfo } from './webgl-active-info.js';
|
|
7
|
-
import { WebGLFramebuffer } from './webgl-framebuffer.js';
|
|
8
4
|
import { WebGLBuffer } from './webgl-buffer.js';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
import { WebGLRenderbuffer } from './webgl-renderbuffer.js';
|
|
12
|
-
import { WebGLShader } from './webgl-shader.js';
|
|
13
|
-
import { WebGLShaderPrecisionFormat } from './webgl-shader-precision-format.js';
|
|
14
|
-
import { WebGLTextureUnit } from './webgl-texture-unit.js';
|
|
15
|
-
import { WebGLTexture } from './webgl-texture.js';
|
|
16
|
-
import { WebGLUniformLocation } from './webgl-uniform-location.js';
|
|
17
|
-
import { WebGLVertexArrayObjectState, WebGLVertexArrayGlobalState } from './webgl-vertex-attribute.js';
|
|
18
|
-
import type { TypedArray, WebGLConstants } from './types/index.js';
|
|
5
|
+
import type { WebGLConstants } from './types/index.js';
|
|
6
|
+
export { WebGLContextBase } from './webgl-context-base.js';
|
|
19
7
|
export interface WebGLRenderingContext extends WebGLConstants {
|
|
20
8
|
}
|
|
21
|
-
export declare class WebGLRenderingContext implements WebGLRenderingContext {
|
|
22
|
-
canvas: HTMLCanvasElement;
|
|
23
|
-
/** TODO implement this: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawingBufferColorSpace */
|
|
24
|
-
drawingBufferColorSpace: PredefinedColorSpace;
|
|
25
|
-
unpackColorSpace: PredefinedColorSpace;
|
|
26
|
-
readonly RGBA8: 32856;
|
|
27
|
-
get drawingBufferHeight(): number;
|
|
28
|
-
get drawingBufferWidth(): number;
|
|
29
|
-
DEFAULT_ATTACHMENTS: number[];
|
|
30
|
-
DEFAULT_COLOR_ATTACHMENTS: number[];
|
|
31
|
-
/** context counter */
|
|
32
|
-
_: number;
|
|
9
|
+
export declare class WebGLRenderingContext extends WebGLContextBase implements WebGLRenderingContext {
|
|
33
10
|
_native: Gwebgl.WebGLRenderingContext;
|
|
34
|
-
_contextAttributes: WebGLContextAttributes;
|
|
35
|
-
_extensions: Record<string, any>;
|
|
36
|
-
_programs: Record<number, WebGLProgram>;
|
|
37
|
-
_shaders: Record<number, WebGLShader>;
|
|
38
|
-
_textures: Record<number, WebGLTexture>;
|
|
39
|
-
_framebuffers: Record<number, WebGLFramebuffer>;
|
|
40
|
-
_renderbuffers: Record<number, WebGLRenderbuffer>;
|
|
41
|
-
_buffers: Record<number, WebGLBuffer>;
|
|
42
|
-
_activeProgram: WebGLProgram | null;
|
|
43
|
-
_activeFramebuffer: WebGLFramebuffer | null;
|
|
44
|
-
_activeRenderbuffer: WebGLRenderbuffer | null;
|
|
45
|
-
_checkStencil: boolean;
|
|
46
|
-
_stencilState: boolean;
|
|
47
|
-
_activeTextureUnit: number;
|
|
48
|
-
_errorStack: GLenum[];
|
|
49
|
-
_defaultVertexObjectState: WebGLVertexArrayObjectState;
|
|
50
|
-
_vertexObjectState: WebGLVertexArrayObjectState;
|
|
51
|
-
_vertexGlobalState: WebGLVertexArrayGlobalState;
|
|
52
|
-
_maxTextureSize: number;
|
|
53
|
-
_maxTextureLevel: number;
|
|
54
|
-
_maxCubeMapSize: number;
|
|
55
|
-
_maxCubeMapLevel: number;
|
|
56
|
-
_unpackAlignment: number;
|
|
57
|
-
_packAlignment: number;
|
|
58
|
-
_viewport: Int32Array;
|
|
59
|
-
_scissorBox: Int32Array;
|
|
60
11
|
_attrib0Buffer: WebGLBuffer | null;
|
|
61
|
-
|
|
62
|
-
_drawingBuffer: WebGLDrawingBufferWrapper | null;
|
|
12
|
+
get _gl(): Gwebgl.WebGLRenderingContextBase;
|
|
63
13
|
constructor(canvas: HTMLCanvasElement | null, options?: Partial<Gwebgl.WebGLRenderingContext.ConstructorProps>);
|
|
64
|
-
_initGLConstants(): void;
|
|
65
|
-
_getGlslVersion(es: boolean): string;
|
|
66
|
-
_checkDimensions(target: GLenum, width: GLsizei, height: GLsizei, level: number): boolean;
|
|
67
|
-
_checkLocation(location: WebGLUniformLocation | null): boolean;
|
|
68
|
-
_checkLocationActive(location: WebGLUniformLocation | null): boolean;
|
|
69
|
-
_checkOwns(object: any): boolean;
|
|
70
|
-
_checkShaderSource(shader: WebGLShader): boolean;
|
|
71
|
-
_checkStencilState(): boolean;
|
|
72
|
-
_checkTextureTarget(target: GLenum): boolean;
|
|
73
|
-
_checkWrapper(object: any, Wrapper: any): boolean;
|
|
74
|
-
_checkValid(object: any, Type: any): boolean;
|
|
75
|
-
_checkVertexAttribState(maxIndex: number): boolean;
|
|
76
|
-
_checkVertexIndex(index: number): boolean;
|
|
77
|
-
_computePixelSize(type: GLenum, internalFormat: GLenum): 0 | 1 | 2 | 3 | 4;
|
|
78
|
-
_computeRowStride(width: number, pixelSize: number): number;
|
|
79
|
-
_fixupLink(program: WebGLProgram): boolean;
|
|
80
|
-
_framebufferOk(): boolean;
|
|
81
|
-
_getActiveBuffer(target: GLenum): WebGLBuffer;
|
|
82
|
-
_getActiveTextureUnit(): WebGLTextureUnit;
|
|
83
|
-
_getActiveTexture(target: GLenum): WebGLTexture;
|
|
84
|
-
_getAttachments(): any;
|
|
85
|
-
_getColorAttachments(): any;
|
|
86
|
-
_getParameterDirect(pname: GLenum): any;
|
|
87
|
-
_getTexImage(target: GLenum): WebGLTexture;
|
|
88
|
-
_preCheckFramebufferStatus(framebuffer: WebGLFramebuffer): 36053 | 36054 | 36055 | 36057 | 36061;
|
|
89
|
-
_isConstantBlendFunc(factor: GLenum): factor is 32769 | 32770 | 32771 | 32772;
|
|
90
|
-
_isObject(object: any, method: any, Wrapper: any): boolean;
|
|
91
|
-
_resizeDrawingBuffer(width: number, height: number): void;
|
|
92
|
-
_restoreError(lastError: GLenum): void;
|
|
93
|
-
_saveError(): void;
|
|
94
|
-
_switchActiveProgram(active: WebGLProgram | null): void;
|
|
95
|
-
_tryDetachFramebuffer(framebuffer: WebGLFramebuffer | null, renderbuffer: WebGLRenderbuffer): void;
|
|
96
|
-
_updateFramebufferAttachments(framebuffer: WebGLFramebuffer | null): void;
|
|
97
|
-
_validBlendFunc(factor: GLenum): factor is 0 | 1 | 768 | 769 | 770 | 771 | 772 | 773 | 774 | 775 | 776 | 32769 | 32770 | 32771 | 32772;
|
|
98
|
-
_validBlendMode(mode: GLenum): boolean;
|
|
99
|
-
_validCubeTarget(target: GLenum): target is 34069 | 34070 | 34071 | 34072 | 34073 | 34074;
|
|
100
|
-
_validFramebufferAttachment(attachment: GLenum): boolean;
|
|
101
|
-
_validGLSLIdentifier(str: string): boolean;
|
|
102
|
-
_validTextureTarget(target: GLenum): target is 3553 | 34067;
|
|
103
|
-
_verifyTextureCompleteness(target: GLenum, pname: GLenum, param: GLenum): void;
|
|
104
|
-
_wrapShader(_type: GLenum, source: string): string;
|
|
105
14
|
_beginAttrib0Hack(): void;
|
|
106
15
|
_endAttrib0Hack(): void;
|
|
107
|
-
_allocateDrawingBuffer(width: number, height: number): void;
|
|
108
|
-
/**
|
|
109
|
-
* The `WebGLRenderingContext.getContextAttributes()` method returns a `WebGLContextAttributes` object that contains the actual context parameters.
|
|
110
|
-
* Might return `null`, if the context is lost.
|
|
111
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getContextAttributes
|
|
112
|
-
* @returns A `WebGLContextAttributes` object that contains the actual context parameters, or `null` if the context is lost.
|
|
113
|
-
*/
|
|
114
|
-
getContextAttributes(): WebGLContextAttributes | null;
|
|
115
|
-
getExtension(name: string): any;
|
|
116
|
-
bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
|
|
117
|
-
bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
|
|
118
|
-
bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
|
|
119
|
-
compressedTexImage2D(target: GLenum, level: GLint, internalFormat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: TypedArray): void;
|
|
120
|
-
compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: TypedArray): void;
|
|
121
|
-
readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: TypedArray | null): void;
|
|
122
|
-
texImage2D(target: GLenum, level: GLint, internalFormat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
|
|
123
|
-
texImage2D(target: GLenum, level: GLint, internalFormat: GLint, format: GLenum, type: GLenum, source: TexImageSource | GdkPixbuf.Pixbuf): void;
|
|
124
|
-
texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
|
|
125
|
-
texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource | GdkPixbuf.Pixbuf): void;
|
|
126
|
-
_checkUniformValid(location: WebGLUniformLocation | null, v0: GLfloat, name: string, count: number, type: string): boolean;
|
|
127
|
-
_checkUniformValueValid(location: WebGLUniformLocation | null, value: Float32List | Int32List, name: string, count: number, _type: string): boolean;
|
|
128
|
-
uniform1fv(location: WebGLUniformLocation | null, value: Float32List | Int32List): void;
|
|
129
|
-
uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
|
|
130
|
-
uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
|
|
131
|
-
uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
|
|
132
|
-
uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
|
|
133
|
-
uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
|
|
134
|
-
uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
|
|
135
|
-
uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
|
|
136
|
-
_checkUniformMatrix(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List, name: string, count: number): boolean;
|
|
137
|
-
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
|
|
138
|
-
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
|
|
139
|
-
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
|
|
140
|
-
activeTexture(texture?: GLenum): void;
|
|
141
|
-
attachShader(program: WebGLProgram, shader: WebGLShader): void;
|
|
142
|
-
bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
|
|
143
|
-
bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
|
|
144
|
-
bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
|
|
145
|
-
bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
|
|
146
|
-
bindTexture(target: GLenum, texture: WebGLTexture | null): void;
|
|
147
|
-
blendColor(red?: GLclampf, green?: GLclampf, blue?: GLclampf, alpha?: GLclampf): void;
|
|
148
|
-
blendEquation(mode?: GLenum): void;
|
|
149
|
-
blendEquationSeparate(modeRGB?: GLenum, modeAlpha?: GLenum): void;
|
|
150
|
-
blendFunc(sfactor?: GLenum, dfactor?: GLenum): void;
|
|
151
|
-
blendFuncSeparate(srcRGB?: GLenum, dstRGB?: GLenum, srcAlpha?: GLenum, dstAlpha?: GLenum): void;
|
|
152
|
-
checkFramebufferStatus(target: GLenum): GLenum;
|
|
153
|
-
clear(mask?: GLbitfield): void;
|
|
154
|
-
clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
|
|
155
|
-
clearDepth(depth: GLclampf): void;
|
|
156
|
-
clearStencil(s?: GLint): void;
|
|
157
|
-
colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
|
|
158
|
-
compileShader(shader: WebGLShader): void;
|
|
159
|
-
copyTexImage2D(target?: GLenum, level?: GLint, internalFormat?: GLenum, x?: GLint, y?: GLint, width?: GLsizei, height?: GLsizei, border?: GLint): void;
|
|
160
|
-
copyTexSubImage2D(target?: GLenum, level?: GLint, xoffset?: GLint, yoffset?: GLint, x?: GLint, y?: GLint, width?: GLsizei, height?: GLsizei): void;
|
|
161
|
-
createBuffer(): WebGLBuffer | null;
|
|
162
|
-
createFramebuffer(): WebGLFramebuffer | null;
|
|
163
|
-
createProgram(): WebGLProgram | null;
|
|
164
|
-
createRenderbuffer(): WebGLRenderbuffer | null;
|
|
165
|
-
createShader(type?: GLenum): WebGLShader | null;
|
|
166
|
-
createTexture(): WebGLTexture | null;
|
|
167
|
-
cullFace(mode: GLenum): void;
|
|
168
|
-
deleteBuffer(buffer: WebGLBuffer | null): void;
|
|
169
|
-
deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
|
|
170
|
-
_deleteLinkable(name: 'deleteProgram', object: WebGLProgram | null, Type: typeof WebGLProgram): void;
|
|
171
|
-
_deleteLinkable(name: 'deleteShader', object: WebGLShader | null, Type: typeof WebGLShader): void;
|
|
172
|
-
deleteProgram(program: WebGLProgram | null): void;
|
|
173
|
-
deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
|
|
174
|
-
deleteShader(shader: WebGLShader | null): void;
|
|
175
|
-
deleteTexture(texture: WebGLTexture | null): void;
|
|
176
|
-
depthFunc(func: GLenum): void;
|
|
177
|
-
depthMask(flag: GLboolean): void;
|
|
178
|
-
depthRange(zNear: GLclampf, zFar: GLclampf): void;
|
|
179
|
-
destroy(): void;
|
|
180
|
-
detachShader(program: WebGLProgram, shader: WebGLShader): void;
|
|
181
|
-
disable(cap?: GLenum): void;
|
|
182
|
-
disableVertexAttribArray(index?: GLuint): void;
|
|
183
16
|
drawArrays(mode?: GLenum, first?: GLint, count?: GLsizei): void;
|
|
184
17
|
drawElements(mode?: GLenum, count?: GLsizei, type?: GLenum, ioffset?: GLintptr): void;
|
|
185
|
-
enable(cap?: GLenum): void;
|
|
186
|
-
enableVertexAttribArray(index: GLuint): void;
|
|
187
|
-
finish(): void;
|
|
188
|
-
flush(): void;
|
|
189
|
-
framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbufferTarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
|
|
190
|
-
framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level?: GLint): void;
|
|
191
|
-
frontFace(mode?: GLenum): void;
|
|
192
|
-
generateMipmap(target?: GLenum): void;
|
|
193
|
-
getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
|
|
194
|
-
getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
|
|
195
|
-
getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
|
|
196
|
-
getAttribLocation(program: WebGLProgram, name: string): GLint;
|
|
197
|
-
getBufferParameter(target?: GLenum, pname?: GLenum): any;
|
|
198
|
-
getError(): GLenum;
|
|
199
|
-
setError(error: GLenum): void;
|
|
200
|
-
getFramebufferAttachmentParameter(target?: GLenum, attachment?: GLenum, pname?: GLenum): any;
|
|
201
|
-
getParameter(pname?: GLenum): any;
|
|
202
|
-
getProgramInfoLog(program: WebGLProgram): string | null;
|
|
203
|
-
getProgramParameter(program: WebGLProgram, pname?: GLenum): any;
|
|
204
|
-
getRenderbufferParameter(target?: GLenum, pname?: GLenum): any;
|
|
205
|
-
getShaderInfoLog(shader: WebGLShader): string | null;
|
|
206
|
-
getShaderParameter(shader: WebGLShader, pname?: GLenum): any;
|
|
207
|
-
getShaderPrecisionFormat(shaderType?: GLenum, precisionType?: GLenum): WebGLShaderPrecisionFormat | null;
|
|
208
|
-
getShaderSource(shader: WebGLShader): string | null;
|
|
209
|
-
getSupportedExtensions(): string[];
|
|
210
|
-
_getTexParameterDirect(target?: GLenum, pname?: GLenum): unknown;
|
|
211
|
-
getTexParameter(target?: GLenum, pname?: GLenum): any;
|
|
212
|
-
getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
|
|
213
|
-
getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
|
|
214
|
-
getVertexAttrib(index?: GLuint, pname?: GLenum): any;
|
|
215
|
-
getVertexAttribOffset(index?: GLuint, pname?: GLenum): GLintptr;
|
|
216
|
-
hint(target?: GLenum, mode?: GLenum): void;
|
|
217
|
-
isBuffer(buffer: WebGLBuffer): GLboolean;
|
|
218
|
-
isContextLost(): boolean;
|
|
219
|
-
isEnabled(cap?: GLenum): GLboolean;
|
|
220
|
-
isFramebuffer(framebuffer: WebGLShader): GLboolean;
|
|
221
|
-
isProgram(program: WebGLProgram): GLboolean;
|
|
222
|
-
isRenderbuffer(renderbuffer: WebGLRenderbuffer): GLboolean;
|
|
223
|
-
isShader(shader: WebGLShader): GLboolean;
|
|
224
|
-
isTexture(texture: WebGLTexture): GLboolean;
|
|
225
|
-
lineWidth(width: GLfloat): void;
|
|
226
|
-
linkProgram(program: WebGLProgram): void;
|
|
227
|
-
/** The `WebGLRenderingContext.pixelStorei()` method of the WebGL API specifies the pixel storage modes. */
|
|
228
|
-
pixelStorei(pname?: GLenum, param?: GLint | GLboolean): void;
|
|
229
|
-
polygonOffset(factor: GLfloat, units: GLfloat): void;
|
|
230
|
-
renderbufferStorage(target?: GLenum, internalFormat?: GLenum, width?: GLsizei, height?: GLsizei): void;
|
|
231
|
-
resize(width?: number, height?: number): void;
|
|
232
|
-
sampleCoverage(value: GLclampf, invert: GLboolean): void;
|
|
233
|
-
scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
|
|
234
|
-
shaderSource(shader: WebGLShader, source: string): void;
|
|
235
|
-
stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
|
|
236
|
-
stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
|
|
237
|
-
stencilMask(mask: GLuint): void;
|
|
238
|
-
stencilMaskSeparate(face: GLenum, mask: GLuint): void;
|
|
239
|
-
stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
|
|
240
|
-
stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
|
|
241
|
-
texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
|
|
242
|
-
texParameteri(target?: GLenum, pname?: GLenum, param?: GLint): void;
|
|
243
|
-
uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
|
|
244
|
-
uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
|
|
245
|
-
uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
|
|
246
|
-
uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
|
|
247
|
-
uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
|
|
248
|
-
uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
|
|
249
|
-
uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
|
|
250
|
-
uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
|
|
251
|
-
useProgram(program: WebGLProgram): void;
|
|
252
|
-
validateProgram(program: WebGLProgram): void;
|
|
253
|
-
vertexAttrib1f(index: GLuint, x: GLfloat): void;
|
|
254
|
-
vertexAttrib1fv(index: GLuint, values: Float32List): void;
|
|
255
|
-
vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
|
|
256
|
-
vertexAttrib2fv(index: GLuint, values: Float32List): void;
|
|
257
|
-
vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
|
|
258
|
-
vertexAttrib3fv(index: GLuint, values: Float32List): void;
|
|
259
|
-
vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
|
|
260
|
-
vertexAttrib4fv(index: GLuint, values: Float32List): void;
|
|
261
|
-
vertexAttribPointer(index?: GLuint, size?: GLint, type?: GLenum, normalized?: GLboolean, stride?: GLsizei, offset?: GLintptr): void;
|
|
262
|
-
viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
|
|
263
18
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Linkable } from './linkable.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WebGLContextBase } from './webgl-context-base.js';
|
|
3
3
|
export declare class WebGLShader extends Linkable implements WebGLShader {
|
|
4
4
|
_type: GLenum;
|
|
5
|
-
_ctx:
|
|
5
|
+
_ctx: WebGLContextBase;
|
|
6
6
|
_source: string;
|
|
7
7
|
_compileStatus: boolean;
|
|
8
8
|
_compileInfo: string;
|
|
9
|
-
|
|
9
|
+
_needsRecompile: boolean;
|
|
10
|
+
constructor(_: number, ctx: WebGLContextBase, type: GLenum);
|
|
10
11
|
_performDelete(): void;
|
|
11
12
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { WebGLContextBase } from './webgl-context-base.js';
|
|
2
2
|
import type { WebGLTexture } from './webgl-texture.js';
|
|
3
3
|
export declare class WebGLTextureUnit {
|
|
4
|
-
_ctx:
|
|
4
|
+
_ctx: WebGLContextBase;
|
|
5
5
|
_idx: number;
|
|
6
6
|
_mode: number;
|
|
7
7
|
_bind2D: WebGLTexture | null;
|
|
8
8
|
_bindCube: WebGLTexture | null;
|
|
9
|
-
constructor(ctx:
|
|
9
|
+
constructor(ctx: WebGLContextBase, idx: number);
|
|
10
10
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Linkable } from './linkable.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WebGLContextBase } from './webgl-context-base.js';
|
|
3
3
|
export declare class WebGLTexture extends Linkable implements WebGLTexture {
|
|
4
|
-
_ctx:
|
|
4
|
+
_ctx: WebGLContextBase;
|
|
5
5
|
_binding: number;
|
|
6
6
|
_levelWidth: Int32Array<ArrayBuffer>;
|
|
7
7
|
_levelHeight: Int32Array<ArrayBuffer>;
|
|
8
8
|
_format: number;
|
|
9
9
|
_type: number;
|
|
10
10
|
_complete: boolean;
|
|
11
|
-
constructor(_: number, ctx:
|
|
11
|
+
constructor(_: number, ctx: WebGLContextBase);
|
|
12
12
|
_performDelete(): void;
|
|
13
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WebGLBuffer } from './webgl-buffer.js';
|
|
2
|
-
import type {
|
|
2
|
+
import type { WebGLContextBase } from './webgl-context-base.js';
|
|
3
3
|
export declare class WebGLVertexArrayObjectAttribute {
|
|
4
|
-
_ctx:
|
|
4
|
+
_ctx: WebGLContextBase;
|
|
5
5
|
_idx: number;
|
|
6
6
|
_isPointer: boolean;
|
|
7
7
|
_pointerBuffer: WebGLBuffer | null;
|
|
@@ -13,7 +13,7 @@ export declare class WebGLVertexArrayObjectAttribute {
|
|
|
13
13
|
_divisor: number;
|
|
14
14
|
_inputSize: number;
|
|
15
15
|
_inputStride: number;
|
|
16
|
-
constructor(ctx:
|
|
16
|
+
constructor(ctx: WebGLContextBase, idx: number);
|
|
17
17
|
_clear(): void;
|
|
18
18
|
}
|
|
19
19
|
export declare class WebGLVertexArrayGlobalAttribute {
|
|
@@ -24,7 +24,7 @@ export declare class WebGLVertexArrayGlobalAttribute {
|
|
|
24
24
|
export declare class WebGLVertexArrayObjectState {
|
|
25
25
|
_attribs: WebGLVertexArrayObjectAttribute[];
|
|
26
26
|
_elementArrayBufferBinding: WebGLBuffer | null;
|
|
27
|
-
constructor(ctx:
|
|
27
|
+
constructor(ctx: WebGLContextBase);
|
|
28
28
|
setElementArrayBuffer(buffer: WebGLBuffer | null): void;
|
|
29
29
|
cleanUp(): void;
|
|
30
30
|
releaseArrayBuffer(buffer: WebGLBuffer): void;
|
|
@@ -33,6 +33,6 @@ export declare class WebGLVertexArrayObjectState {
|
|
|
33
33
|
export declare class WebGLVertexArrayGlobalState {
|
|
34
34
|
_arrayBufferBinding: WebGLBuffer | null;
|
|
35
35
|
_attribs: WebGLVertexArrayGlobalAttribute[];
|
|
36
|
-
constructor(ctx:
|
|
36
|
+
constructor(ctx: WebGLContextBase);
|
|
37
37
|
setArrayBuffer(buffer: WebGLBuffer | null): void;
|
|
38
38
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Gwebgl from '@girs/gwebgl-0.1';
|
|
2
|
-
import
|
|
2
|
+
import GdkPixbuf from 'gi://GdkPixbuf?version=2.0';
|
|
3
|
+
import { WebGLContextBase } from './webgl-context-base.js';
|
|
3
4
|
import { HTMLCanvasElement } from './html-canvas-element.js';
|
|
4
5
|
import { WebGLQuery } from './webgl-query.js';
|
|
5
6
|
import { WebGLSampler } from './webgl-sampler.js';
|
|
@@ -9,35 +10,91 @@ import { WebGLVertexArrayObject } from './webgl-vertex-array-object.js';
|
|
|
9
10
|
import { WebGLUniformLocation } from './webgl-uniform-location.js';
|
|
10
11
|
import { WebGLActiveInfo } from './webgl-active-info.js';
|
|
11
12
|
import { WebGLTexture } from './webgl-texture.js';
|
|
12
|
-
|
|
13
|
+
import { WebGLFramebuffer } from './webgl-framebuffer.js';
|
|
14
|
+
export declare class WebGL2RenderingContext extends WebGLContextBase implements WebGL2RenderingContext {
|
|
13
15
|
_native2: Gwebgl.WebGL2RenderingContext;
|
|
16
|
+
get _gl(): Gwebgl.WebGLRenderingContextBase;
|
|
14
17
|
_queries: Record<number, WebGLQuery>;
|
|
15
18
|
_samplers: Record<number, WebGLSampler>;
|
|
16
19
|
_transformFeedbacks: Record<number, WebGLTransformFeedback>;
|
|
17
20
|
_vertexArrayObjects: Record<number, WebGLVertexArrayObject>;
|
|
18
21
|
_syncs: Record<number, WebGLSync>;
|
|
22
|
+
_activeReadFramebuffer: WebGLFramebuffer | null;
|
|
23
|
+
_activeDrawFramebuffer: WebGLFramebuffer | null;
|
|
19
24
|
constructor(canvas: HTMLCanvasElement | null, options?: Partial<Gwebgl.WebGL2RenderingContext.ConstructorProps>);
|
|
20
25
|
_getGlslVersion(es: boolean): string;
|
|
26
|
+
/**
|
|
27
|
+
* WebGL2 delegates framebuffer completeness to the native GL driver.
|
|
28
|
+
* Called by _framebufferOk() before draw calls and by _updateFramebufferAttachments.
|
|
29
|
+
* The base class version uses JS-side format whitelists that reject valid WebGL2 formats.
|
|
30
|
+
*/
|
|
21
31
|
/** WebGL2 allows COLOR_ATTACHMENT1–15 as framebuffer attachment points. */
|
|
22
32
|
_validFramebufferAttachment(attachment: GLenum): boolean;
|
|
33
|
+
private static readonly _WGL2_ALL_COLOR_ATTACHMENTS;
|
|
34
|
+
_getColorAttachments(): number[];
|
|
35
|
+
/**
|
|
36
|
+
* WebGL2 extends the base-class framebuffer completeness pre-check to
|
|
37
|
+
* accept WebGL2-specific formats that the WebGL1 whitelist rejects.
|
|
38
|
+
*
|
|
39
|
+
* NOTE: This is called by _updateFramebufferAttachments BEFORE the native
|
|
40
|
+
* GL attachments are set, so we must NOT query glCheckFramebufferStatus
|
|
41
|
+
* here (it would see an empty FBO and always return INCOMPLETE).
|
|
42
|
+
* Instead we extend the JS-side format whitelist to cover WebGL2 formats.
|
|
43
|
+
*/
|
|
44
|
+
_preCheckFramebufferStatus(framebuffer: WebGLFramebuffer): GLenum;
|
|
45
|
+
/**
|
|
46
|
+
* WebGL2 completely replaces the base class framebuffer attachment flow.
|
|
47
|
+
*
|
|
48
|
+
* The base class flow is: (1) pre-check formats in JS → (2) set native
|
|
49
|
+
* attachments only if pre-check passes. This is wrong for WebGL2 because
|
|
50
|
+
* the JS pre-check uses WebGL1 format whitelists that reject valid WebGL2
|
|
51
|
+
* formats.
|
|
52
|
+
*
|
|
53
|
+
* WebGL2 flow: (1) always set native attachments first → (2) query native
|
|
54
|
+
* glCheckFramebufferStatus to determine completeness. This delegates all
|
|
55
|
+
* format validation to the native GL driver, matching browser behavior.
|
|
56
|
+
*
|
|
57
|
+
* Also handles COLOR_ATTACHMENT1–15 (WebGL2 MRT) that the base class
|
|
58
|
+
* doesn't know about.
|
|
59
|
+
*/
|
|
23
60
|
/**
|
|
24
|
-
* Apply COLOR_ATTACHMENT1–15 to the native GL FBO
|
|
25
|
-
* The base class
|
|
61
|
+
* Apply COLOR_ATTACHMENT1–15 to the native GL FBO (WebGL2 MRT).
|
|
62
|
+
* The base class handles CA0, DEPTH, STENCIL, DEPTH_STENCIL and calls
|
|
63
|
+
* _preCheckFramebufferStatus (which we override to query native GL).
|
|
26
64
|
*/
|
|
27
65
|
_updateFramebufferAttachments(framebuffer: any): void;
|
|
28
66
|
/** WebGL2 adds UNIFORM_BUFFER, TRANSFORM_FEEDBACK_BUFFER, etc. targets. */
|
|
29
67
|
bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
|
|
68
|
+
/**
|
|
69
|
+
* WebGL2 adds READ_FRAMEBUFFER (0x8CA8) and DRAW_FRAMEBUFFER (0x8CA9) targets.
|
|
70
|
+
* The base class only accepts FRAMEBUFFER; this override handles the two new targets
|
|
71
|
+
* and keeps _activeReadFramebuffer / _activeDrawFramebuffer in sync.
|
|
72
|
+
*/
|
|
73
|
+
bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
|
|
74
|
+
/** WebGL2 also unbinds from read/draw framebuffer slots when deleting. */
|
|
75
|
+
deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
|
|
30
76
|
/** WebGL2 adds READ/COPY buffer usages and additional buffer targets. */
|
|
31
77
|
bufferData(target: GLenum, dataOrSize: GLsizeiptr | BufferSource | null, usage: GLenum): void;
|
|
78
|
+
/** WebGL2 adds UNIFORM_BUFFER, TRANSFORM_FEEDBACK_BUFFER, COPY_READ/WRITE targets. */
|
|
79
|
+
bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
|
|
32
80
|
/** WebGL2 adds TEXTURE_3D and TEXTURE_2D_ARRAY target support. */
|
|
33
81
|
bindTexture(target: GLenum, texture: WebGLTexture | null): void;
|
|
34
|
-
/** WebGL2 adds TEXTURE_3D/TEXTURE_2D_ARRAY targets and
|
|
82
|
+
/** WebGL2 adds TEXTURE_3D/TEXTURE_2D_ARRAY targets and many new pnames. */
|
|
35
83
|
texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
|
|
84
|
+
/**
|
|
85
|
+
* In WebGL2/GLES3 the attribute-0 requirement from WebGL1 does not apply.
|
|
86
|
+
* Override drawArrays to skip the attrib0 hack and call glDrawArrays directly.
|
|
87
|
+
*/
|
|
36
88
|
/**
|
|
37
89
|
* In WebGL2/GLES3 the attribute-0 requirement from WebGL1 does not apply.
|
|
38
90
|
* Override drawArrays to skip the attrib0 hack and call glDrawArrays directly.
|
|
39
91
|
*/
|
|
40
92
|
drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
|
|
93
|
+
/**
|
|
94
|
+
* In WebGL2, UNSIGNED_INT element indices are a core feature — no extension needed.
|
|
95
|
+
* Override drawElements to skip the oes_element_index_uint extension check.
|
|
96
|
+
*/
|
|
97
|
+
drawElements(mode?: GLenum, count?: GLsizei, type?: GLenum, offset?: GLintptr): void;
|
|
41
98
|
createVertexArray(): WebGLVertexArrayObject | null;
|
|
42
99
|
deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
|
|
43
100
|
isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
|
|
@@ -83,6 +140,10 @@ export declare class WebGL2RenderingContext extends WebGLRenderingContext implem
|
|
|
83
140
|
copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
|
|
84
141
|
texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
|
|
85
142
|
texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void;
|
|
143
|
+
texImage2D(target: GLenum, level: GLint, internalFormat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
|
|
144
|
+
texImage2D(target: GLenum, level: GLint, internalFormat: GLint, format: GLenum, type: GLenum, source: TexImageSource | GdkPixbuf.Pixbuf): void;
|
|
145
|
+
texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
|
|
146
|
+
texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource | GdkPixbuf.Pixbuf): void;
|
|
86
147
|
framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void;
|
|
87
148
|
drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
|
|
88
149
|
drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
|
|
@@ -94,7 +155,7 @@ export declare class WebGL2RenderingContext extends WebGLRenderingContext implem
|
|
|
94
155
|
invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void;
|
|
95
156
|
invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
|
|
96
157
|
readBuffer(src: GLenum): void;
|
|
97
|
-
renderbufferStorageMultisample(target: GLenum, samples: GLsizei,
|
|
158
|
+
renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalFormat: GLenum, width: GLsizei, height: GLsizei): void;
|
|
98
159
|
uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void;
|
|
99
160
|
uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void;
|
|
100
161
|
uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void;
|
|
@@ -121,4 +182,32 @@ export declare class WebGL2RenderingContext extends WebGLRenderingContext implem
|
|
|
121
182
|
getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any;
|
|
122
183
|
getParameter(pname: GLenum): any;
|
|
123
184
|
getStringi(name: GLenum, index: GLuint): string | null;
|
|
185
|
+
/**
|
|
186
|
+
* WebGL2 supports ~30+ renderbuffer formats (R8, RG8, RGBA8, RGBA16F,
|
|
187
|
+
* DEPTH_COMPONENT24, DEPTH32F_STENCIL8, etc.). The WebGL1 base class
|
|
188
|
+
* only allows 7 formats. Delegate format validation to native GL.
|
|
189
|
+
*/
|
|
190
|
+
renderbufferStorage(target: GLenum, internalFormat: GLenum, width: GLsizei, height: GLsizei): void;
|
|
191
|
+
/**
|
|
192
|
+
* WebGL2 makes several WebGL1 extensions part of the core spec.
|
|
193
|
+
* EXT_color_buffer_float and EXT_color_buffer_half_float are always
|
|
194
|
+
* available in WebGL2 contexts. Append them if the base class didn't.
|
|
195
|
+
*/
|
|
196
|
+
getSupportedExtensions(): string[];
|
|
197
|
+
/**
|
|
198
|
+
* WebGL2 allows reading pixels in many more format/type combinations
|
|
199
|
+
* than WebGL1's strict RGBA/UNSIGNED_BYTE. Delegate validation to native.
|
|
200
|
+
*/
|
|
201
|
+
readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
|
|
202
|
+
/**
|
|
203
|
+
* WebGL2 never blocks draw calls on JS-side framebuffer format checks.
|
|
204
|
+
* The native GL (Mesa/libepoxy) handles completeness and generates
|
|
205
|
+
* INVALID_FRAMEBUFFER_OPERATION for truly incomplete FBOs at draw time.
|
|
206
|
+
* This matches headless-gl's approach: _framebufferOk() always returns true.
|
|
207
|
+
*
|
|
208
|
+
* The base class rejects valid WebGL2 formats (RGBA16F/HALF_FLOAT, depth
|
|
209
|
+
* textures, WebGL2 renderbuffer formats) causing silent rendering failures
|
|
210
|
+
* for postprocessing effects and environment maps.
|
|
211
|
+
*/
|
|
212
|
+
_framebufferOk(): boolean;
|
|
124
213
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/webgl",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "WebGL module for Gjs",
|
|
5
5
|
"module": "lib/esm/index.js",
|
|
6
6
|
"types": "lib/types/index.d.ts",
|
|
@@ -29,27 +29,29 @@
|
|
|
29
29
|
"build:types": "tsc",
|
|
30
30
|
"build:prebuilds": "yarn build:meson && mkdir -p prebuilds/linux-x86_64 && cp build/libgwebgl.so build/Gwebgl-0.1.typelib prebuilds/linux-x86_64/",
|
|
31
31
|
"build:test": "gjsify build src/ts/test.ts --app gjs --outfile test.gjs.js",
|
|
32
|
+
"build:conformance": "gjsify build src/ts/conformance-test.ts --app gjs --outfile conformance.gjs.js",
|
|
32
33
|
"test": "yarn build:gjsify && yarn build:test && yarn test:gjs",
|
|
33
|
-
"test:gjs": "gjsify run test.gjs.js"
|
|
34
|
+
"test:gjs": "gjsify run test.gjs.js",
|
|
35
|
+
"test:conformance": "yarn build:gjsify && yarn build:conformance && gjsify run conformance.gjs.js"
|
|
34
36
|
},
|
|
35
37
|
"keywords": [
|
|
36
38
|
"gjs",
|
|
37
39
|
"WebGL"
|
|
38
40
|
],
|
|
39
41
|
"devDependencies": {
|
|
40
|
-
"@gjsify/cli": "^0.1.
|
|
41
|
-
"@gjsify/unit": "^0.1.
|
|
42
|
+
"@gjsify/cli": "^0.1.3",
|
|
43
|
+
"@gjsify/unit": "^0.1.3",
|
|
42
44
|
"@types/bit-twiddle": "^1.0.3",
|
|
43
|
-
"@types/node": "^25.5.
|
|
45
|
+
"@types/node": "^25.5.2",
|
|
44
46
|
"typescript": "^6.0.2"
|
|
45
47
|
},
|
|
46
48
|
"dependencies": {
|
|
47
|
-
"@girs/gjs": "^4.0.0-
|
|
48
|
-
"@girs/gtk-4.0": "^4.
|
|
49
|
-
"@girs/gwebgl-0.1": "^0.1.0-4.0.0-
|
|
50
|
-
"@gjsify/dom-elements": "^0.1.
|
|
51
|
-
"@gjsify/event-bridge": "^0.1.
|
|
52
|
-
"@gjsify/utils": "^0.1.
|
|
49
|
+
"@girs/gjs": "^4.0.0-rc.1",
|
|
50
|
+
"@girs/gtk-4.0": "^4.23.0-4.0.0-rc.1",
|
|
51
|
+
"@girs/gwebgl-0.1": "^0.1.0-4.0.0-rc.1",
|
|
52
|
+
"@gjsify/dom-elements": "^0.1.3",
|
|
53
|
+
"@gjsify/event-bridge": "^0.1.3",
|
|
54
|
+
"@gjsify/utils": "^0.1.3",
|
|
53
55
|
"bit-twiddle": "^1.0.2",
|
|
54
56
|
"glsl-tokenizer": "^2.1.5"
|
|
55
57
|
}
|
|
Binary file
|
|
Binary file
|