Skip to main content

Trail

Struct Trail 

Source
pub struct Trail {
Show 28 fields pub map: Option<Map>, pub blend: Blend, pub orientation: TrailOrientation, pub width: Value, pub width_scale: Value, pub segment_interval: f32, pub segment_life: f32, pub max_segments: u32, pub subdivisions: u32, pub texture_fraction: Value, pub scroll_u: Value, pub variance_u: f32, pub variance_v: Value, pub attached_uv: bool, pub dynamic_opacity: bool, pub fade_start: Value, pub fade_end: Value, pub alpha_fade_threshold: Value, pub alpha_cutoff: Value, pub atlas: Option<Atlas>, pub tint: Vec<Term>, pub fade_out: f32, pub distortion: Option<TrailDistortion>, pub lit: Option<Lit>, pub premultiply_alpha: bool, pub soft: Option<SoftEdge>, pub distance: DistanceFade, pub bloom: Option<[f32; 4]>,
}
Expand description

A strip left behind a moving particle.

Fields§

§map: Option<Map>§blend: Blend§orientation: TrailOrientation§width: Value

Width in metres, a function of the particle’s age, times width_scale, a function of the time it was emitted.

§width_scale: Value§segment_interval: f32

Seconds between segment starts, how long a segment lives, how many are alive, and how many cuts a completed segment is subdivided into.

§segment_life: f32§max_segments: u32§subdivisions: u32§texture_fraction: Value

The fraction of the texture’s width used per segment (for the whole trail when attached_uv), the speed the texture slides along (u per second), and the random offset of each segment’s texture (u as a fraction, v a function of the age).

§scroll_u: Value§variance_u: f32§variance_v: Value§attached_uv: bool

Whether the texture is attached to the strip (sliding with its source) or stays where each segment was made.

§dynamic_opacity: bool

Whether each segment’s opacity follows the speed of the source when the segment was made.

§fade_start: Value

Where along the trail (a fraction of its length from the start, and from the end) opacity has fully faded in and out, functions of the age: 0 is no fade.

§fade_end: Value§alpha_fade_threshold: Value§alpha_cutoff: Value§atlas: Option<Atlas>§tint: Vec<Term>§fade_out: f32

Seconds over which the trail fades after its particle ends.

§distortion: Option<TrailDistortion>

A refraction of what is behind the strip, by a normal map and an intensity (a function of the emitter’s active time).

§lit: Option<Lit>§premultiply_alpha: bool§soft: Option<SoftEdge>§distance: DistanceFade§bloom: Option<[f32; 4]>

Trait Implementations§

Source§

impl Clone for Trail

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Trail

Source§

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

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

impl PartialEq for Trail

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Trail

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Trail

Auto Trait Implementations§

§

impl Forget for Trail

§

impl Freeze for Trail

§

impl RefUnwindSafe for Trail

§

impl Send for Trail

§

impl Sync for Trail

§

impl Unpin for Trail

§

impl UnsafeUnpin for Trail

§

impl UnwindSafe for Trail

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.