Skip to main content
Version: Release

Particles

ParticleGenerator​

ParticleGenerator is a Drawable that owns and draws a list of particles.

gen = bf.ParticleGenerator()
scene.add("world", gen)

gen.add_particle(
bf.BasicParticle(
(200, 100),
(50, -120),
duration=0.8,
color=(255, 200, 0),
)
)
  • add_particle(particle)
  • clear()

Particle types​

ClassRole
ParticleBase particle
TimedParticleAuto-kills after a duration
BasicParticleMoves with velocity and fades out
DirectionalParticleLike basic, rotates to face velocity

See the Fireworks example for a full demo.