twgl.js
Advanced tools
Comparing version 5.1.0 to 5.2.0
@@ -82,2 +82,15 @@ | ||
export type ErrorCallback = (msg: string, lineOffset?: number) => void; | ||
export type FullProgramSpec = { | ||
shaders: string[]; | ||
errorCallback?: (...params: any[]) => any; | ||
attribLocations?: { | ||
[key: string]: number; | ||
} | string[]; | ||
transformFeedbackVaryings?: BufferInfo | { | ||
[key: string]: AttribInfo; | ||
} | string[]; | ||
transformFeedbackMode?: number; | ||
callback?: ProgramCallback; | ||
}; | ||
export type ProgramSpec = string[] | FullProgramSpec; | ||
export type ProgramOptions = { | ||
@@ -87,3 +100,3 @@ errorCallback?: (...params: any[]) => any; | ||
[key: string]: number; | ||
}; | ||
} | string[]; | ||
transformFeedbackVaryings?: BufferInfo | { | ||
@@ -296,2 +309,22 @@ [key: string]: AttribInfo; | ||
export function createProgramInfo(gl: WebGLRenderingContext, shaderSources: string[], opt_attribs?: ProgramOptions | string[] | ErrorCallback, opt_errorCallback?: ErrorCallback): ProgramInfo; | ||
export function createPrograms(gl: WebGLRenderingContext, programSpecs: { | ||
[key: string]: ProgramSpec; | ||
}, programOptions?: ProgramOptions): { | ||
[key: string]: WebGLProgram; | ||
}; | ||
export function createProgramInfos(gl: WebGLRenderingContext, programSpecs: { | ||
[key: string]: ProgramSpec; | ||
}, programOptions?: ProgramOptions): { | ||
[key: string]: ProgramInfo; | ||
}; | ||
export function createProgramsAsync(gl: WebGLRenderingContext, programSpecs: { | ||
[key: string]: ProgramSpec; | ||
}, programOptions?: ProgramOptions): { | ||
[key: string]: WebGLProgram; | ||
}; | ||
export function createProgramInfosAsync(gl: WebGLRenderingContext, programSpecs: { | ||
[key: string]: ProgramSpec; | ||
}, programOptions?: ProgramOptions): Promise<{ | ||
[key: string]: ProgramInfo; | ||
}>; | ||
@@ -298,0 +331,0 @@ |
@@ -82,2 +82,15 @@ | ||
export type ErrorCallback = (msg: string, lineOffset?: number) => void; | ||
export type FullProgramSpec = { | ||
shaders: string[]; | ||
errorCallback?: (...params: any[]) => any; | ||
attribLocations?: { | ||
[key: string]: number; | ||
} | string[]; | ||
transformFeedbackVaryings?: BufferInfo | { | ||
[key: string]: AttribInfo; | ||
} | string[]; | ||
transformFeedbackMode?: number; | ||
callback?: ProgramCallback; | ||
}; | ||
export type ProgramSpec = string[] | FullProgramSpec; | ||
export type ProgramOptions = { | ||
@@ -87,3 +100,3 @@ errorCallback?: (...params: any[]) => any; | ||
[key: string]: number; | ||
}; | ||
} | string[]; | ||
transformFeedbackVaryings?: BufferInfo | { | ||
@@ -296,2 +309,22 @@ [key: string]: AttribInfo; | ||
export function createProgramInfo(gl: WebGLRenderingContext, shaderSources: string[], opt_attribs?: ProgramOptions | string[] | ErrorCallback, opt_errorCallback?: ErrorCallback): ProgramInfo; | ||
export function createPrograms(gl: WebGLRenderingContext, programSpecs: { | ||
[key: string]: ProgramSpec; | ||
}, programOptions?: ProgramOptions): { | ||
[key: string]: WebGLProgram; | ||
}; | ||
export function createProgramInfos(gl: WebGLRenderingContext, programSpecs: { | ||
[key: string]: ProgramSpec; | ||
}, programOptions?: ProgramOptions): { | ||
[key: string]: ProgramInfo; | ||
}; | ||
export function createProgramsAsync(gl: WebGLRenderingContext, programSpecs: { | ||
[key: string]: ProgramSpec; | ||
}, programOptions?: ProgramOptions): { | ||
[key: string]: WebGLProgram; | ||
}; | ||
export function createProgramInfosAsync(gl: WebGLRenderingContext, programSpecs: { | ||
[key: string]: ProgramSpec; | ||
}, programOptions?: ProgramOptions): Promise<{ | ||
[key: string]: ProgramInfo; | ||
}>; | ||
@@ -298,0 +331,0 @@ |
{ | ||
"name": "twgl.js", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"description": "A Tiny WebGL helper library", | ||
@@ -5,0 +5,0 @@ "main": "dist/5.x/twgl-full.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1140515
27648