UNPKG

typegpu

Version:

A thin layer between JS and WebGPU/WGSL that improves development experience and allows for faster iteration.

26 lines (25 loc) 1.11 kB
import { type BaseData } from '../../data/wgslTypes.ts'; import type { Infer, InferGPU } from '../../shared/repr.ts'; import { $gpuValueOf, $internal, $repr, $resolve } from '../../shared/symbols.ts'; import type { LayoutMembership } from '../../tgpuBindGroupLayout.ts'; import type { BindableBufferUsage, SelfResolvable } from '../../types.ts'; /** * A class representing a buffer accessed via a BindGroupLayout. * Compared to a regular buffer, it's missing read/write methods, * but it holds a membership. */ export declare class TgpuLaidOutBufferImpl<TData extends BaseData, TUsage extends BindableBufferUsage> implements SelfResolvable { #private; /** Type-token, not available at runtime */ readonly [$repr]: Infer<TData>; readonly [$internal]: { readonly dataType: TData; }; readonly usage: TUsage; readonly dataType: TData; [$resolve]: SelfResolvable[typeof $resolve]; resourceType: 'laid-out-buffer'; $: InferGPU<TData>; readonly [$gpuValueOf]: InferGPU<TData>; constructor(usage: TUsage, dataType: TData, membership: LayoutMembership); }