Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adapt d3-force-3d layout #214

Merged
merged 4 commits into from
Apr 10, 2024
Merged

feat: adapt d3-force-3d layout #214

merged 4 commits into from
Apr 10, 2024

Conversation

Aarebecca
Copy link
Contributor

@Aarebecca Aarebecca commented Apr 9, 2024

Apr-09-2024 17-16-11

d3 force 3d
Apr-09-2024 21-33-10
d3 force

配置项完全遵守 d3-force-3d,会基于配置项自动添加力

import { D3Force3DLayout } from '@antv/layout';

const force = new D3Force3DLayout({
  // 启用中心力并设置中心位置
  center: {
    x: 250,
    y: 250,
    z: 0
  },
  manyBody: {
    // 配置多体力
  }
});

由于 d3-force-3d 缺少类型定义,因此内部使用了临时版本,已经给其提了 PR vasturiano/d3-force-3d#24

@Aarebecca Aarebecca force-pushed the feat/d3-force-3d branch 3 times, most recently from 1b4edaf to 36092aa Compare April 9, 2024 09:27
@@ -3,6 +3,8 @@ export type { DagreAlign, DagreRankdir } from './antv-dagre/types';
export * from './circular';
export * from './comboCombined';
export * from './concentric';
export { D3Force3DLayout } from './d3-force-3d';
export type { D3Force3DLayoutOptions } from './d3-force-3d/types';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个目录命名是不是应该是 d3Force3D?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要么就把其他的也改成和 G6 一致的。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

打算后面把目录命名都改为短横线连接小写形式

@hustcc hustcc merged commit 15e164d into v5 Apr 10, 2024
2 checks passed
@hustcc hustcc deleted the feat/d3-force-3d branch April 10, 2024 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants