pub struct DoublePreset {
pub preset_a: MilkPreset,
pub preset_b: MilkPreset,
pub blend_pattern: BlendPattern,
pub blend_amount: f32,
pub animate_blend: bool,
pub animation_speed: f32,
}Expand description
A double-preset that blends two presets together.
Fields§
§preset_a: MilkPresetFirst preset (A)
preset_b: MilkPresetSecond preset (B)
blend_pattern: BlendPatternBlending pattern
blend_amount: f32Blend amount (0.0 = all A, 1.0 = all B)
animate_blend: boolWhether to animate the blend
animation_speed: f32Animation speed (if animate_blend is true)
Implementations§
Source§impl DoublePreset
impl DoublePreset
Sourcepub fn new(preset_a: MilkPreset, preset_b: MilkPreset) -> Self
pub fn new(preset_a: MilkPreset, preset_b: MilkPreset) -> Self
Create a new double-preset from two presets.
Sourcepub fn with_pattern(self, pattern: BlendPattern) -> Self
pub fn with_pattern(self, pattern: BlendPattern) -> Self
Create with specific blend pattern.
Sourcepub fn with_blend_amount(self, amount: f32) -> Self
pub fn with_blend_amount(self, amount: f32) -> Self
Set blend amount.
Sourcepub fn with_animation(self, speed: f32) -> Self
pub fn with_animation(self, speed: f32) -> Self
Enable animation.
Trait Implementations§
Source§impl Clone for DoublePreset
impl Clone for DoublePreset
Source§fn clone(&self) -> DoublePreset
fn clone(&self) -> DoublePreset
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DoublePreset
impl Debug for DoublePreset
Source§impl Default for DoublePreset
impl Default for DoublePreset
Source§impl<'de> Deserialize<'de> for DoublePreset
impl<'de> Deserialize<'de> for DoublePreset
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DoublePreset
impl PartialEq for DoublePreset
Source§impl Serialize for DoublePreset
impl Serialize for DoublePreset
impl StructuralPartialEq for DoublePreset
Auto Trait Implementations§
impl Freeze for DoublePreset
impl RefUnwindSafe for DoublePreset
impl Send for DoublePreset
impl Sync for DoublePreset
impl Unpin for DoublePreset
impl UnwindSafe for DoublePreset
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
Mutably borrows from an owned value. Read more