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

    Interface SimulationForce<TNode>

    Force protocol — contract-compatible with d3-force. A force is a function called once per tick with the current alpha; it mutates vx/vy on nodes. Optional initialize lets the force compute setup (link indices, etc.).

    interface SimulationForce<TNode extends SimulationNode = SimulationNode> {
        initialize?(nodes: TNode[], random?: () => number): void;
        (alpha: number): void;
    }

    Type Parameters

    Index

    Methods

    Methods