@std/webgpu
Нестабильный
Этот пакет @std является экспериментальным, и его API может измениться без увеличения основной версии.
Обзор
Утилиты для работы с WebGPU API.
import { createTextureWithData } from "@std/webgpu";
const adapter = await navigator.gpu.requestAdapter();
const device = await adapter?.requestDevice()!;
createTextureWithData(device, {
format: "bgra8unorm-srgb",
size: {
width: 3,
height: 2,
},
usage: GPUTextureUsage.COPY_SRC,
}, new Uint8Array([1, 1, 1, 1, 1, 1, 1]));
Добавление в проект
›_
deno add jsr:@std/webgpu
© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/runtime/reference/std/webgpu