vello/examples/with_winit
Arman Uguray d72ad14059 Add a test scene that animates the base color
The test scenes can now supply their own optional base (background)
color. In the with_winit example, we also allow the user to provide a
base color as a CLI option. The precedence is as follows:

   1. Use the color from the CLI options, if any.
   2. Otherwise use the scene provided base color, if any.
   3. Otherwise default to black.
2023-03-03 11:30:12 -08:00
..
src Add a test scene that animates the base color 2023-03-03 11:30:12 -08:00
Cargo.toml Update dependencies, and add more metadata (#272) 2023-02-06 20:12:46 +00:00
README.md Split the examples into frontends with a shared scene repository (#262) 2023-02-03 10:22:39 +00: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.
  • Escape exits the program.