Skip to main content

Module animation

Module animation 

Source
Expand description

Built-in animation effects for nodes.

Two families, distinguished by how they handle time and by when they stop:

Persistent effects require the caller to keep requesting repaints, which turns an idle app into one redrawing continuously — use them for a handful of elements, not for every node.

Both families are reached through Map::node; see NodeHandle. They are also useful from a custom NodeTemplate: call them from notification_ui / marker_ui instead of reimplementing the effect. When you do, remember to call ui.ctx().request_repaint() yourself — the widget only does that for its own built-in path.

Structs§

Animation
Factory for the built-in node animations.

Constants§

COUNTDOWN_DURATION
How long Animation::countdown_arc takes to empty, in seconds.
CROSSHAIR_DURATION
How long Animation::crosshair takes to converge, in seconds.
PULSE_DURATION
How long Animation::pulse plays, in seconds.
RIPPLE_DURATION
How long Animation::ripple plays, in seconds.
SCALE_IN_DURATION
How long Animation::scale_in plays, in seconds.