vello/examples/with_winit
2023-04-29 08:19:01 -07:00
..
src Focus canvas on setup 2023-04-29 08:19:01 -07:00
Cargo.toml Display error message when WebGPU not enabled 2023-04-28 13:55:24 -07:00
README.md [frame_stats] Add a VSync toggle key; show the current VSync state in stats UI 2023-03-21 11:34:08 -07:00

Usage

Running the viewer without any arguments will render a built-in set of public-domain SVG images:

$ cargo run -p with_winit --release

Optionally, you can pass in paths to SVG files that you want to render:

$ cargo run -p with_winit --release -- [SVG FILES]

Controls

  • Mouse drag-and-drop will translate the image.
  • Mouse scroll wheel will zoom.
  • Arrow keys switch between SVG images in the current set.
  • Space resets the position and zoom of the image.
  • S toggles the frame statistics layer
  • C resets the min/max frame time tracked by statistics
  • V toggles VSync on/off (default: on)
  • Escape exits the program.