WaveParams

Struct WaveParams 

Source
pub struct WaveParams {
Show 18 fields pub r: f32, pub g: f32, pub b: f32, pub a: f32, pub x: f32, pub y: f32, pub mode: i32, pub scale: f32, pub param: f32, pub smoothing: f32, pub thick: bool, pub dots: bool, pub additive: bool, pub maximize_color: bool, pub mod_alpha_by_volume: bool, pub mod_alpha_start: f32, pub mod_alpha_end: f32, pub split_lr: bool,
}
Expand description

Wave parameters mirrored from a MilkPreset every frame.

Holds the full MD2 wave_* cluster: colour, position, mode, the boolean toggles (b_wave_dots, b_wave_thick, b_additive_waves, b_maximize_wave_color, b_mod_wave_alpha_by_volume), the scalar shaping params (f_wave_scale, f_wave_param, f_wave_smoothing), and the volume-modulation envelope (f_mod_wave_alpha_start/_end). Per-frame eqs can flip any of these, so the engine re-reads them every frame — same pattern as FeedbackParams.

Fields§

§r: f32§g: f32§b: f32§a: f32§x: f32§y: f32§mode: i32

MD2 nWaveMode, 0..7. See WaveformMode::from_i32 for the mapping; out-of-range values clamp to mode 0 (Circle).

§scale: f32

f_wave_scale — amplitude multiplier (typical 0.5..2.0).

§param: f32

f_wave_param — mode-specific shaping (rotation, separation, …).

§smoothing: f32

f_wave_smoothing — single-pole IIR α driver applied to samples CPU-side before upload. 0 = passthrough.

§thick: bool

b_wave_thick — draw thick segments.

§dots: bool

b_wave_dots — draw points instead of segments.

§additive: bool

b_additive_waves — use additive blend instead of alpha blend.

§maximize_color: bool

b_maximize_wave_color — normalize rgb so max channel = 1.

§mod_alpha_by_volume: bool

b_mod_wave_alpha_by_volume — scale alpha by current vol.

§mod_alpha_start: f32

f_mod_wave_alpha_start — lower bound of the volume envelope.

§mod_alpha_end: f32

f_mod_wave_alpha_end — upper bound of the volume envelope.

§split_lr: bool

Renderer-side top-vs-bottom stereo split. When true, the waveform pass dispatches twice — left channel on the upper screen half (wave_y - 0.25) and right on the lower (wave_y + 0.25). Independent of any preset flag; surfaced at engine config level so the player can toggle it without editing presets.

Trait Implementations§

Source§

impl Clone for WaveParams

Source§

fn clone(&self) -> WaveParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WaveParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for WaveParams

Source§

fn default() -> WaveParams

Returns the “default value” for a type. Read more
Source§

impl Copy for WaveParams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,