latest
denoland/stdWorks with
•JSR Score94%•This package works with Deno, BrowsersIt is unknown whether this package works with Bun


Downloads320/wk
•Published8 months ago (0.224.9)
UNSTABLE: Utilities for working with the Web GPU API
Functions
f
createCapture(): CreateCapture
device: GPUDevice,
width: number,
height: number
Creates a texture and buffer to use as a capture.
f
createTextureWithData(): GPUTexture
device: GPUDevice,
descriptor: GPUTextureDescriptor,
data: Uint8Array_
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(): Uint8Array
buffer: Uint8Array,
width: number,
height: number
Creates a new buffer while removing any unnecessary empty bytes. Useful for when wanting to save an image as a specific format.