Particles#

arcade.EternalParticle#

class arcade.EternalParticle(filename_or_texture: Union[str, arcade.texture.Texture], change_xy: Tuple[float, float], center_xy: Tuple[float, float] = (0.0, 0.0), angle: float = 0, change_angle: float = 0, scale: float = 1.0, alpha: int = 255, mutation_callback=None)[source]#

Particle that has no end to its life

can_reap()[source]#

Determine if Particle can be deleted

arcade.FadeParticle#

class arcade.FadeParticle(filename_or_texture: Union[str, arcade.texture.Texture], change_xy: Tuple[float, float], lifetime: float, center_xy: Tuple[float, float] = (0.0, 0.0), angle: float = 0, change_angle: float = 0, scale: float = 1.0, start_alpha: int = 255, end_alpha: int = 0, mutation_callback=None)[source]#

Particle that animates its alpha between two values during its lifetime

update()[source]#

Advance the Particle’s simulation

arcade.LifetimeParticle#

class arcade.LifetimeParticle(filename_or_texture: Union[str, arcade.texture.Texture], change_xy: Tuple[float, float], lifetime: float, center_xy: Tuple[float, float] = (0.0, 0.0), angle: float = 0, change_angle: float = 0, scale: float = 1.0, alpha: int = 255, mutation_callback=None)[source]#

Particle that lives for a given amount of time and is then deleted

can_reap()[source]#

Determine if Particle can be deleted

update()[source]#

Advance the Particle’s simulation

arcade.Particle#

class arcade.Particle(filename_or_texture: Union[str, arcade.texture.Texture], change_xy: Tuple[float, float], center_xy: Tuple[float, float] = (0.0, 0.0), angle: float = 0.0, change_angle: float = 0.0, scale: float = 1.0, alpha: int = 255, mutation_callback=None)[source]#

Sprite that is emitted from an Emitter

can_reap()[source]#

Determine if Particle can be deleted

update()[source]#

Advance the Particle’s simulation

arcade.EmitBurst#

class arcade.EmitBurst(count: int)[source]#

Used to configure an Emitter to emit particles in one burst

arcade.EmitController#

class arcade.EmitController[source]#

Base class for how a client configure the rate at which an Emitter emits Particles

Subclasses allow the client to control the rate and duration of emitting

arcade.EmitInterval#

class arcade.EmitInterval(emit_interval: float)[source]#

Base class used to configure an Emitter to have a constant rate of emitting. Will emit indefinitely.

arcade.EmitMaintainCount#

class arcade.EmitMaintainCount(particle_count: int)[source]#

Used to configure an Emitter so it emits particles so that the given count is always maintained

arcade.Emitter#

class arcade.Emitter(center_xy: Tuple[float, float], emit_controller: arcade.emitter.EmitController, particle_factory: Callable[[arcade.emitter.Emitter], arcade.particle.Particle], change_xy: Tuple[float, float] = (0.0, 0.0), emit_done_cb: Optional[Callable[[arcade.emitter.Emitter], None]] = None, reap_cb: Optional[Callable[[], None]] = None)[source]#

Emits and manages Particles over their lifetime. The foundational class in a particle system.

can_reap() bool[source]#

Determine if Emitter can be deleted

get_pos() Tuple[float, float][source]#

Get position of emitter

arcade.EmitterIntervalWithCount#

class arcade.EmitterIntervalWithCount(emit_interval: float, particle_count: int)[source]#

Configure an Emitter to emit particles with given interval, ending after emitting given number of particles

arcade.EmitterIntervalWithTime#

class arcade.EmitterIntervalWithTime(emit_interval: float, lifetime: float)[source]#

Configure an Emitter to emit particles with given interval, ending after given number of seconds

arcade.make_burst_emitter#

arcade.make_burst_emitter(center_xy: Tuple[float, float], filenames_and_textures: Sequence[Union[str, arcade.texture.Texture]], particle_count: int, particle_speed: float, particle_lifetime_min: float, particle_lifetime_max: float, particle_scale: float = 1.0, fade_particles: bool = True)[source]#

Returns an emitter that emits all of its particles at once

arcade.make_interval_emitter#

arcade.make_interval_emitter(center_xy: Tuple[float, float], filenames_and_textures: Sequence[Union[str, arcade.texture.Texture]], emit_interval: float, emit_duration: float, particle_speed: float, particle_lifetime_min: float, particle_lifetime_max: float, particle_scale: float = 1.0, fade_particles: bool = True)[source]#

Returns an emitter that emits its particles at a constant rate for a given amount of time