UNPKG

@figliolia/ripples

Version:

WebGL ripples based on the clever work of Pim Schreurs

25 lines (24 loc) 865 B
import { Options } from "./Options"; import { Shaders } from "./Shaders"; import { StyleCache } from "./StyleCache"; import { Textures } from "./Textures"; export declare class WebGL extends Options { Shaders: Shaders; Textures: Textures; quad: WebGLBuffer; target: HTMLElement; canvas: HTMLCanvasElement; GL: WebGLRenderingContext; StyleCache: StyleCache; imageSource: string | null; constructor(target: HTMLElement, ...rest: ConstructorParameters<typeof Options>); protected initializeWebGL(): void; protected hideCSSBackground(): void; protected render(): void; protected update(): void; protected isPercentage(str: string): boolean; protected bindTexture(texture: WebGLTexture | null, unit?: number): void; private positionCanvas; private createGL; protected loadImage(): Promise<void>; }