pub struct SurfaceEmitter(/* private fields */);Expand description
An area-uniform shared VectorSurface source.
Implementations§
Source§impl SurfaceEmitter
impl SurfaceEmitter
Sourcepub fn rate(self, rate: f64) -> Self
pub fn rate(self, rate: f64) -> Self
Replaces particles/second; constant schedules quantize to step boundaries.
Sourcepub fn rate_animation(self, rate: impl Animation<f64> + 'static) -> Self
pub fn rate_animation(self, rate: impl Animation<f64> + 'static) -> Self
Uses seeded stochastic fractional births at each fixed step; its expected birth count follows the animation, without hidden cursors.
Sourcepub fn speed(self, speed: f64) -> Self
pub fn speed(self, speed: f64) -> Self
Replaces isotropic launch speed (path sources use path tangents).
Sourcepub fn velocity(self, velocity: Vector2) -> Self
pub fn velocity(self, velocity: Vector2) -> Self
Adds a fixed design-unit velocity to the sampled launch direction.
Sourcepub fn depth_range(self, minimum: f32, maximum: f32) -> Self
pub fn depth_range(self, minimum: f32, maximum: f32) -> Self
Samples depth into custom[1]; a constant range consumes no random draw.
Source§impl SurfaceEmitter
impl SurfaceEmitter
Sourcepub fn new(tree: Arc<VectorTree>) -> Self
pub fn new(tree: Arc<VectorTree>) -> Self
Captures a shared tree; its default area triangulation is cached.
Sourcepub fn inherit_color(self, enabled: bool) -> Self
pub fn inherit_color(self, enabled: bool) -> Self
Enables fill-color inheritance without changing area density or sampled positions.
Sourcepub fn from_text(
text: &Text,
context: &DrawContext,
) -> Result<Self, ValidationError>
pub fn from_text( text: &Text, context: &DrawContext, ) -> Result<Self, ValidationError>
Captures already-shaped glyph outlines through the shared vector surface.
Trait Implementations§
Source§impl Clone for SurfaceEmitter
impl Clone for SurfaceEmitter
Source§impl ParticleEmitter for SurfaceEmitter
impl ParticleEmitter for SurfaceEmitter
Source§fn emit(
&self,
step: u64,
time: Time,
random: &mut Random,
output: &mut Vec<Particle>,
) -> Result<(), ValidationError>
fn emit( &self, step: u64, time: Time, random: &mut Random, output: &mut Vec<Particle>, ) -> Result<(), ValidationError>
Appends births at this exact fixed-step boundary.
Source§fn accepts_event(&self, _: &ParticleEvent) -> bool
fn accepts_event(&self, _: &ParticleEvent) -> bool
Filters event-triggered births. Root emission is unaffected; ordinary emitters accept all events.
Auto Trait Implementations§
impl !RefUnwindSafe for SurfaceEmitter
impl !UnwindSafe for SurfaceEmitter
impl Forget for SurfaceEmitter
impl Freeze for SurfaceEmitter
impl Send for SurfaceEmitter
impl Sync for SurfaceEmitter
impl Unpin for SurfaceEmitter
impl UnsafeUnpin for SurfaceEmitter
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