pub struct KeyframeProperties {Show 73 fields
pub opacity: Option<f32>,
pub scale_x: Option<f32>,
pub scale_y: Option<f32>,
pub translate_x: Option<f32>,
pub translate_y: Option<f32>,
pub rotate: Option<f32>,
pub rotate_x: Option<f32>,
pub rotate_y: Option<f32>,
pub perspective: Option<f32>,
pub depth: Option<f32>,
pub translate_z: Option<f32>,
pub blend_3d: Option<f32>,
pub clip_inset: Option<[f32; 4]>,
pub background_color: Option<[f32; 4]>,
pub gradient_start_color: Option<[f32; 4]>,
pub gradient_end_color: Option<[f32; 4]>,
pub gradient_angle: Option<f32>,
pub border_color: Option<[f32; 4]>,
pub text_color: Option<[f32; 4]>,
pub corner_radius: Option<[f32; 4]>,
pub corner_shape: Option<[f32; 4]>,
pub border_width: Option<f32>,
pub outline_width: Option<f32>,
pub outline_color: Option<[f32; 4]>,
pub outline_offset: Option<f32>,
pub clip_circle_radius: Option<f32>,
pub clip_ellipse_radii: Option<[f32; 2]>,
pub overflow_fade: Option<[f32; 4]>,
pub shadow_params: Option<[f32; 4]>,
pub shadow_color: Option<[f32; 4]>,
pub text_shadow_params: Option<[f32; 4]>,
pub text_shadow_color: Option<[f32; 4]>,
pub light_intensity: Option<f32>,
pub ambient: Option<f32>,
pub specular: Option<f32>,
pub light_direction: Option<[f32; 3]>,
pub filter_grayscale: Option<f32>,
pub filter_invert: Option<f32>,
pub filter_sepia: Option<f32>,
pub filter_brightness: Option<f32>,
pub filter_contrast: Option<f32>,
pub filter_saturate: Option<f32>,
pub filter_hue_rotate: Option<f32>,
pub filter_blur: Option<f32>,
pub backdrop_blur: Option<f32>,
pub backdrop_saturation: Option<f32>,
pub backdrop_brightness: Option<f32>,
pub width: Option<f32>,
pub height: Option<f32>,
pub min_width: Option<f32>,
pub max_width: Option<f32>,
pub min_height: Option<f32>,
pub max_height: Option<f32>,
pub padding: Option<[f32; 4]>,
pub margin: Option<[f32; 4]>,
pub gap: Option<f32>,
pub flex_grow: Option<f32>,
pub flex_shrink: Option<f32>,
pub inset_top: Option<f32>,
pub inset_right: Option<f32>,
pub inset_bottom: Option<f32>,
pub inset_left: Option<f32>,
pub font_size: Option<f32>,
pub skew_x: Option<f32>,
pub skew_y: Option<f32>,
pub transform_origin: Option<[f32; 2]>,
pub z_index: Option<f32>,
pub mask_gradient: Option<[f32; 8]>,
pub svg_fill: Option<[f32; 4]>,
pub svg_stroke: Option<[f32; 4]>,
pub svg_stroke_width: Option<f32>,
pub svg_stroke_dashoffset: Option<f32>,
pub svg_path_data: Option<String>,
}Expand description
Properties that can be animated in a multi-property keyframe
Fields§
§opacity: Option<f32>Opacity (0.0 to 1.0)
scale_x: Option<f32>Scale X factor
scale_y: Option<f32>Scale Y factor
translate_x: Option<f32>Translation X in pixels
translate_y: Option<f32>Translation Y in pixels
rotate: Option<f32>Rotation in degrees (Z-axis)
rotate_x: Option<f32>Rotation X in degrees (3D tilt)
rotate_y: Option<f32>Rotation Y in degrees (3D turn)
perspective: Option<f32>Perspective distance in pixels
depth: Option<f32>3D extrusion depth in pixels
translate_z: Option<f32>Z-axis translation in pixels (positive = toward viewer)
blend_3d: Option<f32>Blend radius for smooth boolean operations (in pixels)
clip_inset: Option<[f32; 4]>Clip-path inset [top%, right%, bottom%, left%]
background_color: Option<[f32; 4]>Background color RGBA (solid brush)
gradient_start_color: Option<[f32; 4]>Gradient start color RGBA (first stop)
gradient_end_color: Option<[f32; 4]>Gradient end color RGBA (last stop)
gradient_angle: Option<f32>Gradient angle in degrees (linear gradients)
border_color: Option<[f32; 4]>Border color RGBA
text_color: Option<[f32; 4]>Text foreground color RGBA
corner_radius: Option<[f32; 4]>Corner radius [top_left, top_right, bottom_right, bottom_left]
corner_shape: Option<[f32; 4]>Corner shape (superellipse n parameter) [top_left, top_right, bottom_right, bottom_left]
border_width: Option<f32>Border width in pixels
outline_width: Option<f32>Outline width in pixels
outline_color: Option<[f32; 4]>Outline color RGBA
outline_offset: Option<f32>Outline offset in pixels
clip_circle_radius: Option<f32>Clip-path circle radius (percent)
clip_ellipse_radii: Option<[f32; 2]>Clip-path ellipse radii [rx, ry] (percent)
overflow_fade: Option<[f32; 4]>Overflow fade distances [top, right, bottom, left]
shadow_params: Option<[f32; 4]>Shadow [offset_x, offset_y, blur, spread]
shadow_color: Option<[f32; 4]>Shadow color RGBA
text_shadow_params: Option<[f32; 4]>Text shadow [offset_x, offset_y, blur, spread]
text_shadow_color: Option<[f32; 4]>Text shadow color RGBA
light_intensity: Option<f32>Light intensity (0.0-1.0+)
ambient: Option<f32>Ambient light level (0.0-1.0)
specular: Option<f32>Specular power (higher = sharper highlights)
light_direction: Option<[f32; 3]>Light direction [x, y, z]
filter_grayscale: Option<f32>filter: grayscale(0..1)
filter_invert: Option<f32>filter: invert(0..1)
filter_sepia: Option<f32>filter: sepia(0..1)
filter_brightness: Option<f32>filter: brightness(multiplier, 1.0 = normal)
filter_contrast: Option<f32>filter: contrast(multiplier, 1.0 = normal)
filter_saturate: Option<f32>filter: saturate(multiplier, 1.0 = normal)
filter_hue_rotate: Option<f32>filter: hue-rotate(degrees)
filter_blur: Option<f32>filter: blur(px)
backdrop_blur: Option<f32>backdrop-filter: blur(px)
backdrop_saturation: Option<f32>backdrop-filter saturation multiplier (1.0 = normal)
backdrop_brightness: Option<f32>backdrop-filter brightness multiplier (1.0 = normal)
width: Option<f32>Width in pixels
height: Option<f32>Height in pixels
min_width: Option<f32>Min-width in pixels
max_width: Option<f32>Max-width in pixels
min_height: Option<f32>Min-height in pixels
max_height: Option<f32>Max-height in pixels
padding: Option<[f32; 4]>Padding [top, right, bottom, left] in pixels
margin: Option<[f32; 4]>Margin [top, right, bottom, left] in pixels
gap: Option<f32>Gap between flex items in pixels
flex_grow: Option<f32>Flex grow factor
flex_shrink: Option<f32>Flex shrink factor
inset_top: Option<f32>top inset in pixels
inset_right: Option<f32>right inset in pixels
inset_bottom: Option<f32>bottom inset in pixels
inset_left: Option<f32>left inset in pixels
font_size: Option<f32>Font size in pixels
skew_x: Option<f32>Skew X in degrees
skew_y: Option<f32>Skew Y in degrees
transform_origin: Option<[f32; 2]>Transform origin [x%, y%] (default 50%, 50% = center)
z_index: Option<f32>z-index (f32 for smooth interpolation, rounded on apply)
mask_gradient: Option<[f32; 8]>Combined mask gradient: [mask_type, start_alpha, end_alpha, 0, p0, p1, p2, p3] where p0..p3 = linear(x1,y1,x2,y2) or radial(cx,cy,r,0) in OBB space
svg_fill: Option<[f32; 4]>SVG fill color RGBA
svg_stroke: Option<[f32; 4]>SVG stroke color RGBA
svg_stroke_width: Option<f32>SVG stroke width in pixels
svg_stroke_dashoffset: Option<f32>SVG stroke-dashoffset in pixels (for line-drawing animations)
svg_path_data: Option<String>SVG path d attribute data (for path morphing animations)
Implementations§
Source§impl KeyframeProperties
impl KeyframeProperties
Sourcepub fn opacity(value: f32) -> KeyframeProperties
pub fn opacity(value: f32) -> KeyframeProperties
Create properties with only opacity set
Sourcepub fn scale(value: f32) -> KeyframeProperties
pub fn scale(value: f32) -> KeyframeProperties
Create properties with uniform scale
Sourcepub fn translate(x: f32, y: f32) -> KeyframeProperties
pub fn translate(x: f32, y: f32) -> KeyframeProperties
Create properties with translation
Sourcepub fn rotation(degrees: f32) -> KeyframeProperties
pub fn rotation(degrees: f32) -> KeyframeProperties
Create properties with rotation
Sourcepub fn with_opacity(self, value: f32) -> KeyframeProperties
pub fn with_opacity(self, value: f32) -> KeyframeProperties
Builder: set opacity
Sourcepub fn with_scale(self, value: f32) -> KeyframeProperties
pub fn with_scale(self, value: f32) -> KeyframeProperties
Builder: set uniform scale
Sourcepub fn with_scale_xy(self, x: f32, y: f32) -> KeyframeProperties
pub fn with_scale_xy(self, x: f32, y: f32) -> KeyframeProperties
Builder: set scale x and y separately
Sourcepub fn with_translate(self, x: f32, y: f32) -> KeyframeProperties
pub fn with_translate(self, x: f32, y: f32) -> KeyframeProperties
Builder: set translation
Sourcepub fn with_rotate(self, degrees: f32) -> KeyframeProperties
pub fn with_rotate(self, degrees: f32) -> KeyframeProperties
Builder: set rotation
Sourcepub fn with_rotate_x(self, degrees: f32) -> KeyframeProperties
pub fn with_rotate_x(self, degrees: f32) -> KeyframeProperties
Builder: set X rotation (3D tilt)
Sourcepub fn with_rotate_y(self, degrees: f32) -> KeyframeProperties
pub fn with_rotate_y(self, degrees: f32) -> KeyframeProperties
Builder: set Y rotation (3D turn)
Sourcepub fn with_perspective(self, px: f32) -> KeyframeProperties
pub fn with_perspective(self, px: f32) -> KeyframeProperties
Builder: set perspective distance
Sourcepub fn with_depth(self, px: f32) -> KeyframeProperties
pub fn with_depth(self, px: f32) -> KeyframeProperties
Builder: set 3D depth
Sourcepub fn with_translate_z(self, px: f32) -> KeyframeProperties
pub fn with_translate_z(self, px: f32) -> KeyframeProperties
Builder: set translate-z
Sourcepub fn with_blend_3d(self, px: f32) -> KeyframeProperties
pub fn with_blend_3d(self, px: f32) -> KeyframeProperties
Builder: set 3D blend radius
Sourcepub fn lerp(&self, other: &KeyframeProperties, t: f32) -> KeyframeProperties
pub fn lerp(&self, other: &KeyframeProperties, t: f32) -> KeyframeProperties
Interpolate between two property sets
Sourcepub fn resolved_opacity(&self) -> f32
pub fn resolved_opacity(&self) -> f32
Get the resolved opacity (defaults to 1.0 if not set)
Sourcepub fn resolved_scale(&self) -> (f32, f32)
pub fn resolved_scale(&self) -> (f32, f32)
Get the resolved scale (defaults to 1.0 if not set)
Sourcepub fn resolved_translate(&self) -> (f32, f32)
pub fn resolved_translate(&self) -> (f32, f32)
Get the resolved translation (defaults to 0.0 if not set)
Sourcepub fn resolved_rotate(&self) -> f32
pub fn resolved_rotate(&self) -> f32
Get the resolved rotation (defaults to 0.0 if not set)
Sourcepub fn resolved_rotate_x(&self) -> f32
pub fn resolved_rotate_x(&self) -> f32
Get the resolved X rotation in degrees (defaults to 0.0)
Sourcepub fn resolved_rotate_y(&self) -> f32
pub fn resolved_rotate_y(&self) -> f32
Get the resolved Y rotation in degrees (defaults to 0.0)
Sourcepub fn resolved_perspective(&self) -> f32
pub fn resolved_perspective(&self) -> f32
Get the resolved perspective distance (defaults to 0.0 = no perspective)
Sourcepub fn resolved_depth(&self) -> f32
pub fn resolved_depth(&self) -> f32
Get the resolved 3D depth (defaults to 0.0 = flat)
Trait Implementations§
Source§impl Clone for KeyframeProperties
impl Clone for KeyframeProperties
Source§fn clone(&self) -> KeyframeProperties
fn clone(&self) -> KeyframeProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KeyframeProperties
impl Debug for KeyframeProperties
Source§impl Default for KeyframeProperties
impl Default for KeyframeProperties
Source§fn default() -> KeyframeProperties
fn default() -> KeyframeProperties
Source§impl PartialEq for KeyframeProperties
impl PartialEq for KeyframeProperties
impl StructuralPartialEq for KeyframeProperties
Auto Trait Implementations§
impl Freeze for KeyframeProperties
impl RefUnwindSafe for KeyframeProperties
impl Send for KeyframeProperties
impl Sync for KeyframeProperties
impl Unpin for KeyframeProperties
impl UnsafeUnpin for KeyframeProperties
impl UnwindSafe for KeyframeProperties
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.