pivotick - v0.0.1
    Preparing search index...

    Interface Simulation

    interface Simulation {
        changeLayout(
            type: LayoutType,
            simulationOptions?: DeepPartial<SimulationOptions.SimulationOptions>,
        ): Promise<void>;
        getForceSimulation(): SimulationForces;
        getSimulation(): Simulation<Node, undefined>;
        isDragging(): boolean;
        pause(): void;
        reheat(alpha?: number): void;
        restart(): void;
        start(): Promise<void>;
        stop(): void;
        update(): void;
        waitForSimulationStop(): Promise<void>;
    }
    Index

    Methods

    • Restart the simulation with a bit of heat

      Parameters

      • alpha: number = 0.7

      Returns void

    • Restart the simulation with rendering on each animation frame.

      Returns void

    • Start the simulation with rendering on each animation frame.

      Returns Promise<void>

    • Manually stop the simulation and cancel animation frame.

      Returns void

    • Returns a promise that resolves when the simulation stops naturally. Useful for performing actions (like fitAndCenter) after stabilization.

      Returns Promise<void>