antvis / layout

Layout algorithms for graphs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FruchtermanLayout 布局,gpuEnabled: true性能没有提升

kevinchangm opened this issue · comments

antv/layout 的版本 "@antv/layout": "0.3.23",
const fruchtermanLayout = new FruchtermanLayout({
type: 'fruchterman',
center: [this.width / 2, this.height / 2],
gravity: 2,
speed: 300,
maxIteration: 500,
workerEnabled: false, // 可选,开启 web-worker
gpuEnabled: true, // 可选,开启 GPU 并行计算,G6 4.0 支持
preventOverlap: true,
animate: false,
width: this.width / getZoom(),
height: this.height / getZoom(),
onLayoutEnd: () => {
// 回调函数
},
});
this.doLayout(fruchtermanLayout, model);