flutter_webgpu 0.1.0 copy "flutter_webgpu: ^0.1.0" to clipboard
flutter_webgpu: ^0.1.0 copied to clipboard

Platformweb

Flutter widget for WebGPU rendering on the web.

flutter_webgpu #

Flutter widget for WebGPU rendering on the web. Manages an HTML canvas element and its WebGPU context within Flutter's platform view system.

Usage #

GpuWebView(
  device: device,
  format: gpu.preferredCanvasFormat,
  onCreated: (ctx, w, h) {
    // create pipelines, buffers, etc.
  },
  onRender: (ctx, w, h) {
    final texture = ctx.getCurrentTexture();
    // render into texture.createView() ...
    device.queue.submit([commands]);
  },
)

Most users should use flutter_gpux instead, which wraps this with a higher-level GpuRenderer API.

0
likes
140
points
201
downloads

Documentation

API reference

Publisher

verified publisherdartgfx.dev

Weekly Downloads

Flutter widget for WebGPU rendering on the web.

Repository (GitHub)
View/report issues

Topics

#gpu #webgpu #flutter

License

MIT (license)

Dependencies

flutter, gpuweb_js

More

Packages that depend on flutter_webgpu