Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要检测力布局的稳定性,例如,当它变换坐标时,在页面上添加加载动画。
完成后,然后删除加载动画。
“稳定”不是那么精确,但应该检测到几乎稳定的图形。
我该怎么办?有什么建议或例子吗?
文档alpha说当低于阈值(默认值为)时会感觉到稳定性,因此0.1您可以只听此值并进行锻炼。我会fiddle尽快在此发布一个。
alpha
0.1
fiddle