cocos.particle_systems module

Pre-defined Particle Systems.

Here are some concrete implementations of Particle Systems. They are built by subclassing ParticleSystem and overriding the desired class attributes.

class Explosion(fallback=None, texture=None)

Bases: cocos.particle.ParticleSystem

angle = 90.0
angle_var = 360.0
blend_additive = False
color_modulate = True
duration = 0.1
emission_rate = 7000.0
end_color = Color(0.50, 0.50, 0.50, 0.00)
end_color_var = Color(0.50, 0.50, 0.50, 0.00)
gravity = Point2(0.00, -90.00)
life = 5.0
life_var = 2.0
pos_var = Point2(0.00, 0.00)
radial_accel = 0
radial_accel_var = 0
size = 15.0
size_var = 10.0
speed = 70.0
speed_var = 40.0
start_color = Color(0.70, 0.20, 0.10, 1.00)
start_color_var = Color(0.50, 0.50, 0.50, 0.00)
total_particles = 700
class Fire(fallback=None, texture=None)

Bases: cocos.particle.ParticleSystem

angle = 90.0
angle_var = 10.0
blend_additive = True
color_modulate = True
duration = -1
emission_rate = 83.33333333333333
end_color = Color(0.00, 0.00, 0.00, 1.00)
end_color_var = Color(0.00, 0.00, 0.00, 0.00)
gravity = Point2(0.00, 0.00)
life = 3.0
life_var = 0.25
pos_var = Point2(40.00, 20.00)
radial_accel = 0
radial_accel_var = 0
size = 100.0
size_var = 10.0
speed = 60.0
speed_var = 20.0
start_color = Color(0.76, 0.25, 0.12, 1.00)
start_color_var = Color(0.00, 0.00, 0.00, 0.00)
total_particles = 250
class Fireworks(fallback=None, texture=None)

Bases: cocos.particle.ParticleSystem

angle = 90
angle_var = 20
blend_additive = False
color_modulate = True
duration = -1
emission_rate = 857.1428571428571
end_color = Color(0.10, 0.10, 0.10, 0.20)
end_color_var = Color(0.10, 0.10, 0.10, 0.20)
gravity = Point2(0.00, -90.00)
life = 3.5
life_var = 1
pos_var = Point2(0.00, 0.00)
radial_accel = 0
radial_accel_var = 0
size = 8.0
size_var = 2.0
speed = 180
speed_var = 50
start_color = Color(0.50, 0.50, 0.50, 1.00)
start_color_var = Color(0.50, 0.50, 0.50, 1.00)
total_particles = 3000
class Flower(fallback=None, texture=None)

Bases: cocos.particle.ParticleSystem

angle = 90.0
angle_var = 360.0
blend_additive = True
color_modulate = True
duration = -1
emission_rate = 125.0
end_color = Color(0.00, 0.00, 0.00, 1.00)
end_color_var = Color(0.00, 0.00, 0.00, 0.00)
gravity = Point2(0.00, 0.00)
life = 4.0
life_var = 1.0
pos_var = Point2(0.00, 0.00)
radial_accel = -60
radial_accel_var = 0
size = 30.0
size_var = 0.0
speed = 80.0
speed_var = 10.0
start_color = Color(0.50, 0.50, 0.50, 1.00)
start_color_var = Color(0.50, 0.50, 0.50, 0.00)
tangential_accel = 15.0
tangential_accel_var = 0.0
total_particles = 500
class Galaxy(fallback=None, texture=None)

Bases: cocos.particle.ParticleSystem

angle = 90.0
angle_var = 360.0
blend_additive = True
color_modulate = True
duration = -1
emission_rate = 50.0
end_color = Color(0.00, 0.00, 0.00, 0.00)
end_color_var = Color(0.00, 0.00, 0.00, 0.00)
gravity = Point2(0.00, 0.00)
life = 4.0
life_var = 1.0
pos_var = Point2(0.00, 0.00)
radial_accel = -80.0
radial_accel_var = 0
size = 37.0
size_var = 10.0
speed = 60.0
speed_var = 10.0
start_color = Color(0.12, 0.25, 0.76, 1.00)
start_color_var = Color(0.00, 0.00, 0.00, 0.00)
tangential_accel = 80.0
tangential_accel_var = 0.0
total_particles = 200
class Meteor(fallback=None, texture=None)

Bases: cocos.particle.ParticleSystem

angle = 90.0
angle_var = 360.0
blend_additive = True
color_modulate = True
duration = -1
emission_rate = 75.0
end_color = Color(0.00, 0.00, 0.00, 1.00)
end_color_var = Color(0.00, 0.00, 0.00, 0.00)
gravity = Point2(-200.00, 100.00)
life = 2.0
life_var = 1.0
pos_var = Point2(0.00, 0.00)
radial_accel = 0
radial_accel_var = 0
size = 60.0
size_var = 10.0
speed = 15.0
speed_var = 5.0
start_color = Color(0.20, 0.70, 0.70, 1.00)
start_color_var = Color(0.00, 0.00, 0.00, 0.20)
tangential_accel = 0.0
tangential_accel_var = 0.0
total_particles = 150
class Smoke(fallback=None, texture=None)

Bases: cocos.particle.ParticleSystem

angle = 90.0
angle_var = 10.0
blend_additive = True
color_modulate = False
duration = -1
emission_rate = 20.0
end_color = Color(0.50, 0.50, 0.50, 0.10)
end_color_var = Color(0.00, 0.00, 0.00, 0.10)
gravity = Point2(0.00, 0.00)
life = 4.0
life_var = 1.0
pos_var = Point2(0.10, 0.00)
radial_accel = 5
radial_accel_var = 0
size = 40.0
size_var = 10.0
speed = 25.0
speed_var = 10.0
start_color = Color(0.50, 0.50, 0.50, 0.10)
start_color_var = Color(0.00, 0.00, 0.00, 0.10)
tangential_accel = 0.0
tangential_accel_var = 0.0
total_particles = 80
class Spiral(fallback=None, texture=None)

Bases: cocos.particle.ParticleSystem

angle = 90.0
angle_var = 0.0
blend_additive = True
color_modulate = True
duration = -1
emission_rate = 41.666666666666664
end_color = Color(0.50, 0.50, 0.50, 1.00)
end_color_var = Color(0.50, 0.50, 0.50, 0.00)
gravity = Point2(0.00, 0.00)
life = 12.0
life_var = 0.0
pos_var = Point2(0.00, 0.00)
radial_accel = -380
radial_accel_var = 0
size = 20.0
size_var = 10.0
speed = 150.0
speed_var = 0.0
start_color = Color(0.50, 0.50, 0.50, 1.00)
start_color_var = Color(0.50, 0.50, 0.50, 0.00)
tangential_accel = 45.0
tangential_accel_var = 0.0
total_particles = 500
class Sun(fallback=None, texture=None)

Bases: cocos.particle.ParticleSystem

angle = 90.0
angle_var = 360.0
blend_additive = True
color_modulate = True
duration = -1
emission_rate = 350.0
end_color = Color(0.00, 0.00, 0.00, 0.00)
end_color_var = Color(0.00, 0.00, 0.00, 0.00)
gravity = Point2(0.00, 0.00)
life = 1.0
life_var = 0.5
pos_var = Point2(0.00, 0.00)
radial_accel = 0
radial_accel_var = 0
size = 40.0
size_var = 0.0
speed = 20.0
speed_var = 5.0
start_color = Color(0.75, 0.25, 0.12, 1.00)
start_color_var = Color(0.00, 0.00, 0.00, 0.00)
tangential_accel = 0.0
tangential_accel_var = 0.0
total_particles = 350