import type { Particle, RealtimeEdge } from "./networkTypes";
/**
 * Object-pool particle manager for high-performance canvas rendering.
 *
 * Pre-allocates a fixed-size array to avoid GC pressure.
 * Particles travel along bezier paths within link bands.
 *
 * `_freeIndices` is a stack of currently-free slot indices. Spawn pops; step
 * pushes when a particle expires. This makes spawn O(1) instead of O(capacity).
 */
export declare class ParticlePool {
    particles: Particle[];
    private capacity;
    private _freeIndices;
    constructor(capacity: number);
    /**
     * Spawn a new particle on the given edge.
     * Returns the particle if a free slot was found, null otherwise.
     */
    spawn(edgeIndex: number): Particle | null;
    /**
     * Advance all active particles by deltaTime.
     * Recycles particles that have completed their journey (t >= 1).
     * @param edgeSpeedMultipliers - optional per-edge speed scaling (for proportional flow rate)
     */
    step(deltaTime: number, speed: number, edges: RealtimeEdge[], edgeSpeedMultipliers?: number[]): void;
    /** Count active particles for a specific edge index */
    countForEdge(edgeIndex: number): number;
    /** Deactivate all particles */
    clear(): void;
    /** Resize the pool (creates a new array) */
    resize(newCapacity: number): void;
}
