import { Module, ModuleObject } from "./module"; import { Particle } from "./particle"; import { ParticleSystem } from "./particleSystem"; export declare class ParticleEffect { particleSystem: ParticleSystem; modules: Module[]; particles: Particle[]; isInitialized: boolean; /** * List of texture names that are randomly assigned to particles of this effect. */ textures: string[]; addParticleListeners: ((particle: Particle) => unknown)[]; destroyParticleListeners: ((particle: Particle) => unknown)[]; /** * **NOTE: ParticleEffects should be created with `ParticleSystem.addParticleEffect()` instead of using the constructor directly** */ constructor(particleSystem: ParticleSystem); init(): void; update(dt: number): void; addParticle(particle: Particle): void; /** * Destroy a particle, removing it from further updates. * * This can be safely called while iterating over `particles`, the array is not modified immediately. */ destroyParticle(particle: Particle): void; static fromObject(particleSystem: ParticleSystem, effectObject: ParticleEffectObject, options?: { hideWarnings?: boolean; }): ParticleEffect; } export declare type ParticleEffectObject = { modules: ModuleObject[] | undefined; textures: string[]; };