0.4.0 - The Too Late for Genuary Release
Release Notes
Released 2024-01-21
Highlights
Parameter persistence and sketch breaking changes
Sketch parameters are now persisted across sketch launches, which dramatically improves the QoL when iterating on sketch code. A new "Reset" button sets all parameters to the sketch defaults. This also lays the groundwork for a future configuration management feature.
Two breaking changes were introduced to accommodate for this.
- Use
MySketch::runner().run()
instead ofRunner::new(MySketch::default()).run()
in yourmain()
function. - Use the
#[sketch_app]
, resp.#[sketch_widget]
attributes instead of theSketch
, resp.Widget
derive macros. These new attributes take care of deriving the now-requiredserde::Serialize
andserde::Deserialize
using the correct,whiskers
-exported version of theserde
crate.
Example:
use whiskers::prelude::*;
#[sketch_app]
#[derive(Default)]
struct HelloWorldSketch {
width: f64,
height: f64,
}
impl App for HelloWorldSketch {
fn update(&mut self, sketch: &mut Sketch, _ctx: &mut Context) -> anyhow::Result<()> {
/* sketch code here */
Ok(())
}
}
fn main() -> Result {
HelloWorldSketch::runner()
.with_page_size_options(PageSize::A5H)
.run()
}
Other highlights
- It's now possible to override pen width and opacity in the viewer.
- The viewer now persists the antialiasing setting (note: persistence happens on a per-binary basis, so the AA setting must be set e.g. for each different sketch).
- You can use custom
enum
types as sketch parameter (use the new#[sketch_widget]
attribute as noted above). vsvg
introduces a newLength
type which combines a float and aUnit
.whiskers
supports them, and, when used as sketch parameter, provides a nice UI where both the value and the unit can be changed.msvg
now sorts files "correctly" when they are numbered, and has a much nicer CLI experience.- It's now possible to directly "draw" into a
vsvg::Layer
using the APIs from thevsvg::Draw
trait. - Both
vsvg
andvsvg-viewer
now cleanly re-export key dependencies.
whiskers
crates
- BREAKING: Persist sketch parameters across app relaunches #94
- BREAKING: Add a button to reset the sketch parameters to their defaults #91
- Add support for custom
enum
as sketch parameter #107 - Add support for
vsvg::Unit
andvsvg::Length
as sketch parameters #95 - Add
Context::rng_weighted_choice()
helper function #102 (thanks @afternoon2!) - Split whiskers widgets in their own
whiskers-widgets
crate #108 - Add
particle
example based ongeos
#105 - Make
Runner::new()
private and update docs accordingly #96 - Fix
README.md
code example to useSketchApp::runner()
instead of now privateRunner::new()
#103 (thanks @reidab!)
msvg
CLI
- Sort files in natural order rather than in lexicographical order #104 (thanks @danieledapo!)
- Use
clap
formsvg
for a nicer CLI experience #83
vsvg
crate
- BREAKING: Improve
Unit
and introduceLength
#88 - Implement the
Draw
trait forLayer
#111 - Re-export core
vsvg
dependencies #113 - Fix unescaped
<dc:source>
content in SVG output #116
vsvg-viewer
crate
- Add options to override pen width and opacity #89
- Persist antialias setting across app relaunches #90
- Add
on_exit()
hook to theViewerApp
trait #106 (thanks @danieledapo!) - Re-export core
vsvg-viewer
dependencies #115 (thanks @danieledapo!)
Common
- Run documentation tests in CI #92
- Update rust toolchain to 1.75.0 #82
- Update egui to 0.25.0 #118
- Update
cargo dist
to 0.8.0 #117 - Fix web demo publishing action
5f42b4a
changelog.py
: highlight breaking changes and generate a list of contributors #93
Contributors
Full Changelog: v0.3.0...v0.4.0
msvg 0.4.0
Install msvg 0.4.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/abey79/vsvg/releases/download/v0.4.0/msvg-installer.sh | sh
Install prebuilt binaries via powershell script
irm https://github.com/abey79/vsvg/releases/download/v0.4.0/msvg-installer.ps1 | iex
Download msvg 0.4.0
File | Platform | Checksum |
---|---|---|
msvg-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
msvg-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
msvg-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
msvg-x86_64-pc-windows-msvc.msi | x64 Windows | checksum |
msvg-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
msvg-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |
vsvg-cli 0.4.0
Install vsvg-cli 0.4.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/abey79/vsvg/releases/download/v0.4.0/vsvg-cli-installer.sh | sh
Install prebuilt binaries via powershell script
irm https://github.com/abey79/vsvg/releases/download/v0.4.0/vsvg-cli-installer.ps1 | iex
Download vsvg-cli 0.4.0
File | Platform | Checksum |
---|---|---|
vsvg-cli-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
vsvg-cli-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
vsvg-cli-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
vsvg-cli-x86_64-pc-windows-msvc.msi | x64 Windows | checksum |
vsvg-cli-aarch64-unknown-linux-gnu.tar.xz | ARM64 Linux | checksum |
vsvg-cli-x86_64-unknown-linux-gnu.tar.xz | x64 Linux | checksum |