twgl.js 5.1.0 → 5.3.0
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/dist/5.x/twgl-full.d.ts +34 -1
- package/dist/5.x/twgl-full.js +417 -205
- package/dist/5.x/twgl-full.module.js +335 -197
- package/dist/5.x/twgl.d.ts +34 -1
- package/dist/5.x/twgl.js +417 -205
- package/package.json +1 -1
package/dist/5.x/twgl-full.d.ts
CHANGED
|
@@ -79,11 +79,24 @@ export type FramebufferInfo = {
|
|
|
79
79
|
height: number;
|
|
80
80
|
};
|
|
81
81
|
export type ErrorCallback = (msg: string, lineOffset?: number) => void;
|
|
82
|
+
export type FullProgramSpec = {
|
|
83
|
+
shaders: string[];
|
|
84
|
+
errorCallback?: (...params: any[]) => any;
|
|
85
|
+
attribLocations?: {
|
|
86
|
+
[key: string]: number;
|
|
87
|
+
} | string[];
|
|
88
|
+
transformFeedbackVaryings?: BufferInfo | {
|
|
89
|
+
[key: string]: AttribInfo;
|
|
90
|
+
} | string[];
|
|
91
|
+
transformFeedbackMode?: number;
|
|
92
|
+
callback?: ProgramCallback;
|
|
93
|
+
};
|
|
94
|
+
export type ProgramSpec = string[] | FullProgramSpec;
|
|
82
95
|
export type ProgramOptions = {
|
|
83
96
|
errorCallback?: (...params: any[]) => any;
|
|
84
97
|
attribLocations?: {
|
|
85
98
|
[key: string]: number;
|
|
86
|
-
};
|
|
99
|
+
} | string[];
|
|
87
100
|
transformFeedbackVaryings?: BufferInfo | {
|
|
88
101
|
[key: string]: AttribInfo;
|
|
89
102
|
} | string[];
|
|
@@ -291,6 +304,26 @@ export function setBuffersAndAttributes(gl: WebGLRenderingContext, setters: Prog
|
|
|
291
304
|
}, buffers: BufferInfo | VertexArrayInfo): void;
|
|
292
305
|
export function createProgramInfoFromProgram(gl: WebGLRenderingContext, program: WebGLProgram): ProgramInfo;
|
|
293
306
|
export function createProgramInfo(gl: WebGLRenderingContext, shaderSources: string[], opt_attribs?: ProgramOptions | string[] | ErrorCallback, opt_errorCallback?: ErrorCallback): ProgramInfo;
|
|
307
|
+
export function createPrograms(gl: WebGLRenderingContext, programSpecs: {
|
|
308
|
+
[key: string]: ProgramSpec;
|
|
309
|
+
}, programOptions?: ProgramOptions): {
|
|
310
|
+
[key: string]: WebGLProgram;
|
|
311
|
+
};
|
|
312
|
+
export function createProgramInfos(gl: WebGLRenderingContext, programSpecs: {
|
|
313
|
+
[key: string]: ProgramSpec;
|
|
314
|
+
}, programOptions?: ProgramOptions): {
|
|
315
|
+
[key: string]: ProgramInfo;
|
|
316
|
+
};
|
|
317
|
+
export function createProgramsAsync(gl: WebGLRenderingContext, programSpecs: {
|
|
318
|
+
[key: string]: ProgramSpec;
|
|
319
|
+
}, programOptions?: ProgramOptions): {
|
|
320
|
+
[key: string]: WebGLProgram;
|
|
321
|
+
};
|
|
322
|
+
export function createProgramInfosAsync(gl: WebGLRenderingContext, programSpecs: {
|
|
323
|
+
[key: string]: ProgramSpec;
|
|
324
|
+
}, programOptions?: ProgramOptions): Promise<{
|
|
325
|
+
[key: string]: ProgramInfo;
|
|
326
|
+
}>;
|
|
294
327
|
|
|
295
328
|
|
|
296
329
|
export function getBytesPerElementForInternalFormat(internalFormat: number, type: number): number;
|