import { ModuleFunction } from "../../systems/modules" ; import { despawningRules } from "../../util/rules" ; import { Particle } from "../particle" ; /**
 * Represents a rule that decides whether a particle should be despawned or not.
 */ export type ParticleDespawnRule = ( particle : Particle ) => boolean ; /**
 * Holds a set of options that control the basic functionality of an emitter.
 */ export interface EmitterOptions { defaultValue duration : number ; defaultValue loops : number ; defaultValue useGravity : boolean ; defaultValue maxParticles : number ; remarks defaultValue despawningRules : ParticleDespawnRule [ ] ; remarks modules : ModuleFunction [ ] ; } /**
 * Returns the default set of emitter options.
 */ export function getDefaultEmitterOptions ( ) { return { duration : 5 , loops : 1 , useGravity : true , maxParticles : 300 , despawningRules : [ despawningRules . lifetime , despawningRules . bounds ] , modules : [ ] , } ; }