close
Skip to main content

@std/webgpu@0.224.9

Works with
This package works with Deno, BrowsersIt is unknown whether this package works with Bun
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score94%
Downloads320/wk
Published8 months ago (0.224.9)

UNSTABLE: Utilities for working with the Web GPU API

Functions

f
createCapture(
device: GPUDevice,
width: number,
height: number
): CreateCapture

Creates a texture and buffer to use as a capture.

f
createTextureWithData(
device: GPUDevice,
descriptor: GPUTextureDescriptor,
data: Uint8Array_
): GPUTexture

Create a GPUTexture with data.

f
describeTextureFormat(format: GPUTextureFormat): TextureFormatInfo

Get various information about a specific GPUTextureFormat.

f
getRowPadding(width: number): Padding

Calculates the number of bytes including necessary padding when passing a GPUImageCopyBuffer.

f
resliceBufferWithPadding(
buffer: Uint8Array,
width: number,
height: number
): Uint8Array

Creates a new buffer while removing any unnecessary empty bytes. Useful for when wanting to save an image as a specific format.