mickeyf.docs
    Preparing search index...

    Drives FractalAnimation instances while keeping them SRP-focused.

    Invariants callers can rely on:

    • At most one animation instance is active at a time.
    • Configuration patching and lifecycle calls are issued by the host; the animation owns visuals/state.

    Thread model: methods are expected to be called from the main JS/UI thread.

    interface FractalHost {
        dispose(): void;
        getStats(): { fps: number; remainingLifetime: number | null };
        restart(): void;
        setFractal<C>(Fractal: FractalAnimationConstructor<C>, config: C): void;
        setLifetime(seconds: number | null): void;
        updateConfig<C>(patch: Partial<C>): void;
    }
    Index

    Methods

    • Disposes the host and all owned resources.

      This removes the canvas from the DOM, stops ticker integration, and disposes the active animation (if any) along with the underlying PIXI Application.

      Calling this multiple times is safe; after disposal, the host must not be used again.

      Returns void

    • Returns lightweight runtime stats.

      • fps is a smoothed estimate of frames per second.
      • remainingLifetime is remaining time until disposal begins, in seconds, or null when auto-disposal is disabled.

      Returns { fps: number; remainingLifetime: number | null }