weasel API - v0.8.0
    Preparing search index...

    Interface Simulation<TNode>

    interface Simulation<TNode extends SimulationNode> {
        nodes: TNode[];
        alpha(): number;
        alpha(value: number): this;
        alphaDecay(): number;
        alphaDecay(value: number): this;
        alphaMin(): number;
        alphaMin(value: number): this;
        alphaTarget(): number;
        alphaTarget(value: number): this;
        isSettled(): boolean;
        restart(): this;
        setForces(forces: SimulationForce<TNode>[]): this;
        setNodes(nodes: TNode[]): this;
        stop(): this;
        tick(iterations?: number): this;
        velocityDecay(): number;
        velocityDecay(value: number): this;
    }

    Type Parameters

    Index

    Properties

    nodes: TNode[]

    Methods

    • Run the tick body synchronously iterations times. Does NOT fire onTick or onEnd (matches d3-force). Used for offscreen pre-warm and tests.

      Parameters

      • Optionaliterations: number

      Returns this