Skip to content

d3-force

此模块实现了一个 velocity Verlet 数值积分器,用于模拟粒子上的物理力。力模拟可用于可视化 网络层次结构,以及像在 气泡图 中那样解决 碰撞 问题。

🌐 This module implements a velocity Verlet numerical integrator for simulating physical forces on particles. Force simulations can be used to visualize networks and hierarchies, and to resolve collisions as in bubble charts.

要使用此模块,请为一组节点创建一个模拟,并应用所需的。然后监听tick事件,以便在你首选的图形系统(例如Canvas或SVG)中渲染节点的更新。

🌐 To use this module, create a simulation for an array of nodes and apply the desired forces. Then listen for tick events to render the nodes as they update in your preferred graphics system, such as Canvas or SVG.

请参阅以下之一:

🌐 See one of: