particlepy.math¶
-
fade_alpha(particle: particlepy.particle.Particle, alpha: int, progress: float) → float[source]¶ Fades
alpha(transparency) of argumentparticleover life span (progress) to new color (color)- Parameters
particle (
particlepy.particle.Particle) – Particle to alpha color withalpha (int) – Transparency to fade to
progress (float) – Life span identifier:
particlepy.particle.Particle.progressorparticlepy.particle.Particle.inverted_progress
- Returns
New alpha of particle
- Return type
float
-
fade_color(particle: particlepy.particle.Particle, color: Tuple[int, int, int], progress: float) → list[source]¶ Fades color of
particleover life span (progress) to new color (color)- Parameters
particle (
particlepy.particle.Particle) – Particle to fade color withcolor (Tuple[int, int, int]) – Color to fade to
progress (float) – Life span identifier:
particlepy.particle.Particle.progressorparticlepy.particle.Particle.inverted_progress
- Returns
New color of particle
- Return type
List[float]
- Raises
AssertionError – If
particle.shapenotparticlepy.shape.BaseForm