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
28 lines (27 loc) • 929 B
TypeScript
/// <reference types="dist" />
import { ImageTexture } from "./ImageTexture";
export declare class ImageTextureIO {
textures: ImageTexture[];
descriptor: {
size: GPUExtent3D;
format: GPUTextureFormat;
usage?: number;
};
protected stagingBuffer: GPUBuffer;
protected canCallMapAsync: boolean;
onOutputData: (data: Uint32Array) => void;
constructor(descriptor: {
source: ImageBitmap | HTMLCanvasElement | HTMLVideoElement | OffscreenCanvas | GPUTexture | null;
width?: number;
height?: number;
format?: GPUTextureFormat;
});
clone(): ImageTextureIO;
createDeclaration(name: string, bindingId: number, groupId: number): string;
protected outputBuffer: GPUBuffer;
destroy(): void;
getOutputData(): Promise<void>;
get width(): number;
get height(): number;
textureSize(): GPUExtent3D;
}