/** * Represents a compiled shader program. Checks compilation errors. * Caches attribute and uniform locations. */ export class Shader { /** * Compile and link a shader program. * @param {WebGLRenderingContext} gl * @param {String} vs - vertex shader source text * @param {String} fs - fragment shader source text * @param {String} preamble - (optional) definitions to prepend to both vs/fs */ constructor(gl: WebGLRenderingContext, vs: string, fs: string, preamble?: string); gl: WebGLRenderingContext; vs: WebGLShader | null; fs: WebGLShader | null; program: WebGLProgram | null; aLoc: Map; uLoc: Map; use(): void; uniform(name: any): any; attrib(name: any): any; relink(): void; _compile(type: any, source: any): WebGLShader | null; _link(vertexShader: any, fragmentShader: any): WebGLProgram | null; delete(): void; }