Closed xiaoiver closed 1 year ago
工程改造:
封装 WASM 暴露的 layout 方法,与 @antv/layout 保持一致:
@antv/layout
import { Graph } from "@antv/graphlib"; import { ForceAtlas2 } from "@antv/layout-wasm"; const forceatlas2 = new ForceAtlas2({ threads, maxIteration: 1000, // ...other params }); const { nodes } = await forceatlas2.execute(graph);
工程改造:
封装 WASM 暴露的 layout 方法,与
@antv/layout
保持一致: