Skip to main content

Module slots

Module slots 

Source
Expand description

The animatable slots an entrance or a keyframe stop may name (width, height, bg, radius, opacity) as one value.

You rarely build a Slots directly: crate::enter::Enter (where a node starts on first sight) and crate::keyframes::Keyframe (a stop in a cycle) are this plus one field each, carry the same builders, and deref to it, so enter.bg reads the slot.

use kui_core::{Color, Enter};

let enter = Enter::from(-40.0, 0.0).bg(Color::WHITE).opacity(0.0);
assert_eq!(enter.opacity, Some(0.0));
assert_eq!(enter.bg, Some(Color::WHITE));
assert!(enter.width.is_none());

Structsยง

Slots
The slots, each optional: one left out is not part of the entrance or the stop, and keeps whatever the node itself declares.