struct
ParticleOptions
pub struct ParticleOptions {
pub count: u32,
pub density: f32,
pub colors: Vec<Color>,
pub shapes: Vec<Sprite>,
pub sides: u32,
pub stroke: Color,
pub stroke_width: f32,
pub image: String,
pub image_ratio: f32,
pub opacity: f32,
pub opacity_random: bool,
pub opacity_speed: f32,
pub opacity_min: f32,
pub opacity_sync: bool,
pub size: f32,
pub size_random: bool,
pub size_speed: f32,
pub size_min: f32,
pub size_sync: bool,
pub links: bool,
pub link_distance: f32,
pub link_color: Color,
pub link_opacity: f32,
pub link_width: f32,
pub moving: bool,
pub speed: f32,
pub direction: Direction,
pub random_speed: bool,
pub straight: bool,
pub edge: Edge,
pub collide: bool,
pub attract: bool,
pub attract_x: f32,
pub attract_y: f32,
pub detect: Detect,
pub hover: Modes,
pub click: Modes,
pub grab_distance: f32,
pub grab_opacity: f32,
pub bubble_distance: f32,
pub bubble_size: f32,
pub bubble_opacity: f32,
pub bubble_duration: f32,
pub repulse_distance: f32,
pub repulse_duration: f32,
pub push: u32,
pub remove: u32,
pub seed: u64,
}Everything about a particle background. Sizes and distances are CSS pixels; speeds are pixels per frame at 60 frames a second, halved (as in particles.js, whose options these follow).
Fields
density
pub density: f32With a value, count is per this many thousand square pixels and the number follows the area's size; 0 keeps count fixed.
bubble_duration
pub bubble_duration: f32Seconds a click's bubble takes to grow (and again to shrink).