pivotick - v2.0.1
    Preparing search index...

    Interface SimulationOptions

    These may be scalled based on the amount of node and canvas size

    interface SimulationOptions {
        callbacks?: SimulationCallbacks;
        cooldownTime: number;
        d3Alpha: number;
        d3AlphaDecay: number;
        d3AlphaMin: number;
        d3AlphaTarget: number;
        d3CollideIterations: number;
        d3CollideRadius: number;
        d3CollideRadiusMultiplier: number;
        d3CollideStrength: number;
        d3GravityStrength: number;
        d3GravityStrengthConnected: number;
        d3LinkDistance: number;
        d3LinkStrength: number | null;
        d3ManyBodyStrength: number;
        d3ManyBodyTheta: number;
        d3VelocityDecay: number;
        enabled: boolean;
        fitViewOnExpandCollapse: boolean;
        freezeNodesOnDrag: boolean;
        gridSize: number;
        gridSnappingEnabled: boolean;
        physics?: "auto" | "manual";
        useWorker: boolean;
        warmupTicks: number | "auto";
    }
    Index

    Properties

    cooldownTime: number

    How long a simulation run is given before it is stopped, in milliseconds. Spent as ticks so it holds below 60fps; the settleTime knob sets this and d3AlphaDecay together.

    2000
    
    d3Alpha: number
    1.0
    
    d3AlphaDecay: number
    0.0228
    
    d3AlphaMin: number
    0.001
    
    d3AlphaTarget: number
    0
    
    d3CollideIterations: number
    1
    
    d3CollideRadius: number

    Fallback collision radius, in px, used only for nodes that report no circle radius. Nodes with a radius use d3CollideRadiusMultiplier × their radius.

    12
    
    d3CollideRadiusMultiplier: number

    Multiplier applied to each node's circle radius to derive its collision radius (the spacing the sim keeps between nodes). Higher spreads nodes further apart. This is what the "collision radius" physics knob scales via Simulation.setCollisionRadius.

    1.2
    
    d3CollideStrength: number
    1
    
    d3GravityStrength: number

    Centring pull toward the canvas centre, applied only to isolated (degree-0) nodes so they don't fly off; connected nodes use d3GravityStrengthConnected.

    0.1
    
    d3GravityStrengthConnected: number

    Centring pull for connected nodes. Kept low by default so link + charge forces find their own equilibrium; raise it to stop a sparsely-linked graph from drifting apart.

    0.001
    
    d3LinkDistance: number
    30
    
    d3LinkStrength: number | null
    null
    
    d3ManyBodyStrength: number
    -150
    
    d3ManyBodyTheta: number
    0.9
    
    d3VelocityDecay: number
    0.4
    
    enabled: boolean
    true
    
    fitViewOnExpandCollapse: boolean

    Automatically fit the graph to the viewport after a cluster is expanded or collapsed.

    false
    
    freezeNodesOnDrag: boolean
    true
    
    gridSize: number
    50
    
    gridSnappingEnabled: boolean
    false
    
    physics?: "auto" | "manual"

    Who drives the physics knobs.

    • 'auto' — the layout re-tunes itself from what is on screen (node count, node sizes, canvas size) and keeps doing so as the graph changes.
    • 'manual' — the knobs stay exactly where they were configured.

    Left unset, 'auto' is used unless the graph configures a physics option auto drives (d3LinkDistance, d3ManyBodyStrength, d3CollideRadiusMultiplier, d3VelocityDecay, d3GravityStrength, d3GravityStrengthConnected, d3AlphaDecay, cooldownTime) — so tuning any of them is enough to keep it, and no existing configuration is taken over. Setting physics: 'auto' and d3 options is legal: the explicit values seed the opening frame and auto takes over from there.

    Turning any knob by hand (a flyout slider, a set* call, a preset) also leaves auto.

    'auto' when no physics option is configured, 'manual' otherwise

    useWorker: boolean
    true
    
    warmupTicks: number | "auto"
    auto