Skip to content

d3-force

此模块实现了一个 Verlet 速度 数值积分器,用于模拟粒子上的物理力。力场模拟可用于可视化 networkshierarchies,并像 气泡图 中一样解析 collisions

¥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.

要使用此模块,请为 nodes 数组创建一个 simulation,并应用所需的 forces。然后,使用 listen 的 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: