pub struct ForceField {
pub kind: ForceKind,
pub volume: ForceVolume,
pub direction: [f32; 3],
pub strength: Value,
pub multiplier: f32,
pub random_multiplier: [f32; 2],
pub fade_out: f32,
}Expand description
A force field: pushes the particles whose Movement::fields listen, inside its volume.
Fields§
§kind: ForceKind§volume: ForceVolume§direction: [f32; 3]For a wind: the direction in the emitter’s frame (a unit vector); a gravity pulls toward the volume’s centre.
strength: ValueThe strength, a function of the field’s active time, times a constant multiplier and a random factor between the two bounds (a gravity takes their average).
multiplier: f32§random_multiplier: [f32; 2]§fade_out: f32Seconds over which it fades out when its emitter ends.
Trait Implementations§
Source§impl Clone for ForceField
impl Clone for ForceField
Source§impl Debug for ForceField
impl Debug for ForceField
Source§impl PartialEq for ForceField
impl PartialEq for ForceField
Source§impl Serialize for ForceField
impl Serialize for ForceField
impl StructuralPartialEq for ForceField
Auto Trait Implementations§
impl Forget for ForceField
impl Freeze for ForceField
impl RefUnwindSafe for ForceField
impl Send for ForceField
impl Sync for ForceField
impl Unpin for ForceField
impl UnsafeUnpin for ForceField
impl UnwindSafe for ForceField
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