UNPKG

fluid-pointer-react

Version:

A dependency-free fluid simulation component with WebGL-based physics - supports both vanilla web components and React

35 lines 1.43 kB
import type { ShaderProgram, Material } from "../types/fluid-types.js"; /** * Creates a shader program wrapper with uniform management. */ export declare class Program implements ShaderProgram { program: WebGLProgram; uniforms: Record<string, WebGLUniformLocation>; private gl; constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, vertexShader: WebGLShader, fragmentShader: WebGLShader); bind(): void; } /** * Material class for managing shaders with keyword variants. */ export declare class MaterialImpl implements Material { program: WebGLProgram; uniforms: Record<string, WebGLUniformLocation>; private programs; private gl; private vertexShader; private fragmentShaderSource; constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, vertexShader: WebGLShader, fragmentShaderSource: string); private createProgramVariant; setKeywords(keywords: string[]): void; bind(): void; } /** * Helper function to create a basic program. */ export declare function createBasicProgram(gl: WebGLRenderingContext | WebGL2RenderingContext, vertexShaderSource: string, fragmentShaderSource: string): Program; /** * Helper function to create a material. */ export declare function createMaterial(gl: WebGLRenderingContext | WebGL2RenderingContext, vertexShaderSource: string, fragmentShaderSource: string): MaterialImpl; //# sourceMappingURL=program.d.ts.map