canvas-renderer
Rendering engine for Saorsa Canvas — GPU rendering via wgpu with SVG/PNG/JPEG/PDF export.
Features
- GPU rendering via wgpu (WebGPU/WebGL2)
- Chart rendering (bar, line, pie, scatter) via plotters
- Image element support
- Export to PNG, JPEG, SVG, and PDF (via
exportfeature) - WASM-compatible rendering path
Installation
[]
= "0.1.4"
Enable export support:
[]
= { = "0.1.4", = ["export"] }
Usage
use Scene;
use ;
let scene = new;
let exporter = with_defaults;
let png_bytes = exporter.export?;
Feature Flags
| Feature | Default | Description |
|---|---|---|
gpu |
yes | wgpu-based GPU rendering |
charts |
yes | Chart rendering via plotters |
images |
yes | Image element support |
export |
no | PNG/JPEG/SVG/PDF export via resvg + tiny-skia |
wasm |
no | WASM/browser target support |
License
MIT OR Apache-2.0