webgpubridge
v0.1.0
Published
Small adapters between portable Web3D Kit descriptors and WebGPU.
Readme
WebGPUbridge
A small, explicit bridge from portable 3D descriptions to WebGPU.
WebGPUbridge materializes Web3D Kit descriptors as WebGPU-ready data and caller-owned GPU resources. It keeps scene descriptions portable while leaving adapter selection, device ownership, rendering, and asset loading explicit.
Install
npm install webgpubridge web3d-kitimport { mesh, planeGeometry, shaderMaterial } from "web3d-kit";
import { createWebGPUObject } from "webgpubridge";
const object = createWebGPUObject(
mesh({
geometry: planeGeometry({ width: 2, height: 2 }),
material: shaderMaterial({ vertexShader, fragmentShader }),
}),
);Architecture
shader-runtime webgl-kit
│ │
└─────────┬────────┘
▼
web3d-kit
│
▼
webgpubridge
│
▼
WebGPUweb3d-kit owns portable descriptions; webgpubridge materializes those
descriptions without taking ownership of a WebGPU adapter, device, or queue.
Supported conversions
- vectors, transforms, bounds, scenes, groups, meshes, and cameras
- plane, box, sphere, and simple position/index buffer geometry
- basic, standard, and shader material envelopes
- tightly packed scalar and vector uniform blocks
- explicit GPU buffer, shader module, and render-pipeline helpers
Lifecycle
Use disposeWebGPUBuffer or disposeWebGPUGeometry explicitly. The bridge
does not request an adapter or device, submit work, or dispose caller-owned
pipelines and textures.
