UNPKG

xgpu

Version:

XGPU is an extendable library for WebGPU that provides a higher-level, easy-to-use interface for building rendering engines or processing numeric data. It handles automatic data binding, buffer alignment, variable declarations in shaders, and more. XGPU i

29 lines (28 loc) 772 B
export declare class ShaderStruct { protected properties: { name: string; type: string; builtin?: string; }[]; protected isShaderIO: boolean; name: string; constructor(name: string, properties?: ({ name: string; type: string; builtin?: string; })[]); clone(name?: string): ShaderStruct; addProperty(o: { name: string; type: string; builtin?: string; offset?: number; size?: number; obj?: any; }): ShaderStruct; getComputeVariableDeclaration(offset?: number): string; getFunctionParams(): string; getComputeFunctionParams(): string; getInputFromOutput(): ShaderStruct; get struct(): string; }