pub struct Particle {
pub particle_type: ParticleType,
pub count: u32,
pub colors: Option<Vec<String>>,
pub speed: f32,
pub size_range: SizeRange,
pub seed: u64,
pub timing: TimingConfig,
pub style: CssStyle,
pub timeline: Vec<TimelineStep>,
pub stagger: Option<f32>,
}particle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
Fields§
§particle_type: ParticleTypeparticle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
count: u32particle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
colors: Option<Vec<String>>particle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
speed: f32particle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
size_range: SizeRangeparticle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
seed: u64particle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
timing: TimingConfigparticle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
style: CssStyleparticle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
timeline: Vec<TimelineStep>particle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
stagger: Option<f32>particle is a frozen composition. Compose a for-each over N items with rand(seed, $i) for placement and sin($t) for drift instead — deterministic by construction. See crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
Trait Implementations§
Source§impl Animatable for Particle
impl Animatable for Particle
fn animation_effects(&self) -> &[AnimationEffect]
fn timeline_steps(&self) -> &[TimelineStep]
Source§impl<'de> Deserialize<'de> for Particle
impl<'de> Deserialize<'de> for Particle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Particle
impl JsonSchema for Particle
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl Painter for Particle
impl Painter for Particle
fn paint_content( &self, canvas: &Canvas, layout: &BoxLayout, _props: &AnimatedProperties, ctx: &PaintCtx, )
fn intrinsic_size( &self, _available: AvailableSize, _ctx: &MeasureCtx, ) -> Option<(f32, f32)>
Auto Trait Implementations§
impl Freeze for Particle
impl RefUnwindSafe for Particle
impl Send for Particle
impl Sync for Particle
impl Unpin for Particle
impl UnsafeUnpin for Particle
impl UnwindSafe for Particle
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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