import { EasingFunction } from "../easing"; import { Module, ModuleObject } from "../module"; import { ParticleEffect } from "../particleEffect"; import { Particle } from "../particle"; declare type ParticleWithInitialAlpha = Particle & { /** * Saved initial alpha of particle. This is cached when particle is added. */ _alphaOverLifetime_initialAlpha?: number; }; /** * Module that decays particles alpha over their lifetime. * * Alpha animation can be customized with `easing` property. * * This module modifies `Particle.alpha` property and can not be combined with any other modifier that does so. * It can however be combined with modules that alter the alpha during initialization, but these modules must be defined before `AlphaOverLifetime`! * * @module * @category Modifier * easing { * @tooltip TODO * @type EasingFunction * @defaultValue easeOutSine * } */ export declare class AlphaOverLifetime extends Module { /** * Easing function that controls the animation of alpha. * * Assign via `EasingFunctions` export. */ easing: EasingFunction; init(): void; handleParticleAdd: (particle: ParticleWithInitialAlpha) => void; update(dt: number): void; /** * Wrap the properties of the module into a JSON containing only primitive JavaScript data types * (such as numbers, strings, etc.) that can be serialized into strings natively. */ toObject(): ModuleObject; static fromObject(particleEffect: ParticleEffect, object: ModuleObject, hideWarnings: boolean): AlphaOverLifetime; /** * Serializable identifier for the module. * * This must be unique between all existing Modules in the library. */ static moduleTypeId: string; } export {};