vello/examples/with_winit
Raph Levien 3774928b24 Enforce clippy lints
This turns on clippy checking and also fixes all lints in the code.

Many lints are obvious improvements. Only a small number are slightly annoying, so I think overall worth having a vanilla default config.
2023-05-18 16:13:32 -07:00
..
src Enforce clippy lints 2023-05-18 16:13:32 -07:00
Cargo.toml Enable wasm-bindgen feature of instant crate 2023-04-23 16:00:01 -07:00
README.md Add a stats display for scene complexity (#322) 2023-05-18 18:50:57 +01: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
  • D toggles displaying the required number of each kind of dynamically allocated element (default: off)
  • V toggles VSync on/off (default: on)
  • Escape exits the program.