Expand description
dinamika — umbrella crate: re-exports the raster renderer
dinamika_cpu (as cpu) and the animation library
dinamika_core (as core).
Re-exports§
pub use dinamika_cpu as cpu;pub use dinamika_core as core;
Modules§
- cpu
dinamika-cpu— a raster 2D renderer on the CPU.
Macros§
- render
- Renders the whole timeline animation into the
outputs/<scene>directory next to the.rsfile where the macro is called; returns astd::io::Resultcarrying only success/failure. The number of saved frames is not returned — if you need it, callTimeline::renderdirectly. - scene_
dir - Default output directory for a scene —
outputs/<scene>next to the.rsfile where the macro is called.
Structs§
- Action
- The unit of timeline composition: a tween, pause, parallel or sequence.
- Color
- A color in floating-point RGBA format in the range
0.0..=1.0, non-premultiplied alpha. - Computed
- A derived (computed) signal — read-only.
- Gradient
Stop - A gradient stop.
- Highlight
Edit - A handle of range highlighting, returned by
highlightandclear_highlight. - Linear
Gradient - A linear gradient along the segment
start–end. - Padding
- The shape’s inner padding by side.
- Padding
Tween - A handle of the
paddingproperty — likeTween, but animates all four padding sides at once.overbuilds a parallel tween. - Paint
- A fill description: the color source, blend mode and anti-aliasing.
- Palette
- A highlight palette: “token category → color”, assembled manually.
- Pixmap
- Bitmap:
width × heightRGBA pixels, premultiplied alpha. - Point
- A point (or vector) in the plane.
- Radial
Gradient - A radial gradient around a center.
- Rect
- A rectangle defined by its bounds in floating-point coordinates.
- Shape
- A scene node. This is a cheap shared handle (
Rc): a clone points to the same shape, so it can be held both in the scene tree and in the timeline. - Signal
- A reactive value, shared by reference.
- Text
Edit - A handle of a text edit, returned by the text shape’s editor methods
(
content,append,prepend,insert,rewrite). - Timeline
- An animation timeline: a top-level sequence of actions plus references to the shapes to draw.
- Transform
- A 2×3 affine transformation.
- Tween
- A handle of an animatable property, returned by its setter method.
Enums§
- Align
- Alignment along the cross axis (analogous to
align-items). - Blend
Mode - Blend mode of the source and the background.
- Direction
- The children’s layout axis (analogous to
flex-direction). - Easing
- Animation easing curve.
- Justify
- Distribution along the main axis (analogous to
justify-content). - Language
- The code shape’s highlight language. Resolves to a Sublime Text grammar from
the built-in
syntectset; an unknown grammar (orPlainText) means “no parsing” — all the code is colored with the palette’s base color. - Length
- A length along one axis: absolute in pixels, or a fraction of the parent’s
content area in percent. Passed to
widthandheight. - Shader
- A color source.
- Shape
Kind - Shape kind.
- Spread
Mode - How coordinates outside
0..=1are handled for a gradient. - Text
Align - Horizontal alignment of lines within a text block (analogous to
CSS
text-align). - TextPos
- A position in the text for the bounds of a
rewriterange.
Traits§
- Into
Children - Conversion of a
Shape::childrenargument into a list of child shapes. - Tweenable
- A type whose values can be linearly interpolated.
Functions§
- cascade
- A cascade: sequential execution of actions with a
gap-second pause between neighbors. Put inside the animations that should follow each other in a “wave”. - delay
- An action that starts after
secondsseconds. - infinite
- The position of the end of the text for the
tobound inrewrite. - line
- The position of the start of line
n(0-based) forrewrite. - parallel
- Simultaneous execution of all the actions. The duration is the maximum of the nested ones.
- pause
- A pause of the given duration (in seconds).
- render_
scene - Draws a scene of root shapes over the
background. - scene_
output_ dir - Default output directory for a scene:
<source-dir>/outputs/<scene>. - sequence
- Sequential execution one after another (with no gaps).