typegpu
Version:
A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.
16 lines (15 loc) • 613 B
TypeScript
/**
* Extra declaration that shall be included in final WGSL code,
* when resolving objects that use it.
*/
export interface TgpuDeclare {
$uses(dependencyMap: Record<string, unknown>): this;
}
/**
* Allows defining extra declarations that shall be included in the final WGSL code,
* when resolving objects that use them.
*
* Using this API is generally discouraged, as it shouldn't be necessary in any common scenario.
* It was developed to ensure full compatibility of TypeGPU programs with current and future versions of WGSL.
*/
export declare function declare(declaration: string): TgpuDeclare;