pub enum EffectValue {
Float(f32),
Vec2([f32; 2]),
Vec4([f32; 4]),
Color([f32; 4]),
Enum(u32),
Bool(bool),
}Expand description
Serializable value supplied to one runtime effect parameter.
Variants§
Float(f32)
One finite scalar.
Vec2([f32; 2])
Two finite components, normally in normalized coordinates.
Vec4([f32; 4])
Four finite components that are not a color, such as per-channel thresholds; they keyframe component by component.
Color([f32; 4])
Straight (not premultiplied), sRGB-encoded RGBA in 0..=1, as a color picker shows it.
Enum(u32)
Index into an effect definition’s enum choices.
Bool(bool)
Boolean toggle.
Implementations§
Source§impl EffectValue
impl EffectValue
Trait Implementations§
Source§impl AnimatedValue for EffectValue
impl AnimatedValue for EffectValue
Source§const ACCEPTS_DATA: bool = true
const ACCEPTS_DATA: bool = true
Whether the type takes the
data value mode.Source§const VALUE_CURVES: bool = true
const VALUE_CURVES: bool = true
Whether a keyframe of the type can start a value curve (
ValueBezier).Source§const INTERPOLATES: bool = true
const INTERPOLATES: bool = true
Whether keyframes of the type can interpolate; those of the others only hold.
Source§const OFFSETS: bool = true
const OFFSETS: bool = true
Whether two values of the type have a difference to add: what
repeat_offset needs.Source§const SPLIT: Option<(usize, usize)>
const SPLIT: Option<(usize, usize)>
The fewest and the most channels the type’s
split mode takes, or None for a type
without the mode.Source§fn takes_value_curve(&self) -> bool
fn takes_value_curve(&self) -> bool
Whether a keyframe holding this value may start or end a value curve.
Source§fn extrapolates(&self, extrapolation: Extrapolation) -> bool
fn extrapolates(&self, extrapolation: Extrapolation) -> bool
Whether keyframes holding this value may extrapolate by
extrapolation.Source§impl Clone for EffectValue
impl Clone for EffectValue
impl Copy for EffectValue
Source§impl Debug for EffectValue
impl Debug for EffectValue
Source§impl<'de> Deserialize<'de> for EffectValue
impl<'de> Deserialize<'de> for EffectValue
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 EffectValue
impl PartialEq for EffectValue
Source§impl Serialize for EffectValue
impl Serialize for EffectValue
impl StructuralPartialEq for EffectValue
Auto Trait Implementations§
impl Forget for EffectValue
impl Freeze for EffectValue
impl Move for EffectValue
impl RefUnwindSafe for EffectValue
impl Send for EffectValue
impl Sync for EffectValue
impl Unpin for EffectValue
impl UnsafeUnpin for EffectValue
impl UnwindSafe for EffectValue
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