pub struct EasingCurveEditor {
pub current: Easing,
pub compare: Option<Easing>,
pub sample_count: usize,
}Expand description
Interactive easing curve editor.
Fields§
§current: EasingCurrent easing curve.
compare: Option<Easing>Optional comparison curve.
sample_count: usizeNumber of sample points used for rendering.
Implementations§
Source§impl EasingCurveEditor
impl EasingCurveEditor
Sourcepub fn set_easing(&mut self, easing: Easing)
pub fn set_easing(&mut self, easing: Easing)
Set the primary easing.
Sourcepub fn set_compare(&mut self, easing: Option<Easing>)
pub fn set_compare(&mut self, easing: Option<Easing>)
Set an optional comparison easing.
Sourcepub fn set_sample_count(&mut self, sample_count: usize)
pub fn set_sample_count(&mut self, sample_count: usize)
Set curve sampling resolution. Values below two are clamped.
Sourcepub fn samples_into(&self, out: &mut Vec<[f32; 2]>)
pub fn samples_into(&self, out: &mut Vec<[f32; 2]>)
Write sample points for the current easing into a reusable buffer.
Sourcepub fn compare_samples(&self) -> Option<Vec<[f32; 2]>>
pub fn compare_samples(&self) -> Option<Vec<[f32; 2]>>
Return sample points for the comparison easing.
Trait Implementations§
Source§impl Clone for EasingCurveEditor
impl Clone for EasingCurveEditor
Source§fn clone(&self) -> EasingCurveEditor
fn clone(&self) -> EasingCurveEditor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EasingCurveEditor
impl Debug for EasingCurveEditor
Source§impl Default for EasingCurveEditor
impl Default for EasingCurveEditor
Source§impl PartialEq for EasingCurveEditor
impl PartialEq for EasingCurveEditor
impl StructuralPartialEq for EasingCurveEditor
Auto Trait Implementations§
impl Freeze for EasingCurveEditor
impl RefUnwindSafe for EasingCurveEditor
impl Send for EasingCurveEditor
impl Sync for EasingCurveEditor
impl Unpin for EasingCurveEditor
impl UnsafeUnpin for EasingCurveEditor
impl UnwindSafe for EasingCurveEditor
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