/** * The graphics-tier particle budget. A tier caps the live particle count across every effect on * screen; when the requested effects do not fit, whole effects are dropped in a defined order * (lowest {@link ParticleBudgetEntry.priority} first) rather than every effect thinning out. */ /** One effect asking for particle capacity this frame. */ export interface ParticleBudgetEntry { /** Emitter or burst id; unique within the request. */ id: string; /** Drop order: higher survives, lower is dropped first. */ priority: number; /** Particles this effect wants (its pool maximum, or a burst's count). */ requested: number; } /** An admitted effect and the particles it may hold. */ export interface ParticleBudgetGrant { id: string; particles: number; } /** What the tier cap admits, and what it drops. */ export interface ParticleBudgetPlan { /** Admitted effects in priority order, each with its granted particle count. */ grants: ParticleBudgetGrant[]; /** Dropped effect ids, lowest priority first — the defined drop order. */ dropped: string[]; /** Sum of the granted particle counts, never above the cap. */ particles: number; } /** * Allocate a tier's particle cap across the effects that want it. * * Effects are visited highest priority first (ties keep authoring order) and each takes * `min(requested, remaining)`. An effect that receives nothing is dropped, so the drop list comes * out lowest priority first: ambient dressing (dust, weather) yields before gameplay-loud effects * (explosions, muzzle flashes). The granted total never exceeds the cap, so the live particle * count cannot either. * * @capability plan-particle-budget cap live particles to a graphics tier and drop whole effects lowest-priority-first when over budget */ export declare function planParticleBudget(entries: readonly ParticleBudgetEntry[], cap: number): ParticleBudgetPlan;