Skip to content

v0.14.0: Release 0.14.0: nodes of your own.

Choose a tag to compare

@github-actions github-actions released this 21 Oct 17:30
· 137 commits to main since this release

Nodes of your own, behind the unstable-node-api feature.

Added

  • #[derive(Node)] on a struct that implements Draw makes it a node.
    Fields marked #[signal] get a setter on the builder (Gauge::new())
    and a signal on the handle (GaugeHandle), so gauge.value().to(0.8, 1.0)
    animates them. Other fields are set once.
  • Draw::draw paints with the same DrawCtx as Custom, and
    Draw::size gives the box that layout, Camera::fit and check use.
    The node gets position, opacity, effects, flex properties and theme
    colors like any built-in one, and check names it by its type.
  • DrawCtx::arc strokes or fills an arc, for gauges and rings.
  • oxframe init --template node my-node makes a crate with a node, a demo
    scene and a reference test.
  • The gauge example.