https://github.com/antvis/layout
Layout algorithms for graphs.
https://github.com/antvis/layout
layout
Last synced: about 1 year ago
JSON representation
Layout algorithms for graphs.
- Host: GitHub
- URL: https://github.com/antvis/layout
- Owner: antvis
- Created: 2020-12-02T09:16:35.000Z (over 5 years ago)
- Default Branch: v5
- Last Pushed: 2024-09-14T10:02:44.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T21:05:31.289Z (over 1 year ago)
- Topics: layout
- Language: TypeScript
- Homepage:
- Size: 4.92 MB
- Stars: 201
- Watchers: 12
- Forks: 55
- Open Issues: 64
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
@antv/layout
[](https://github.com/antvis/layout/actions)
[](https://coveralls.io/github/antvis/layout?branch=v5)
[](https://www.npmjs.com/package/@antv/layout)
[](https://www.npmjs.com/package/@antv/layout)
[](https://www.npmjs.com/package/@antv/layout)
This is a collection of basic layout algorithms. We provide the following packages to support different runtime environments:
- [@antv/layout](./packages/layout/README.md) [](https://www.npmjs.com/package/@antv/layout) Implemented with TypeScript. [Online Demo](https://observablehq.com/d/2db6b0cc5e97d8d6)
- [@antv/layout-rust](./packages/layout-rust/README.md) Implemented with Rust.
- [@antv/layout-wasm](./packages/layout-wasm/README.md) [](https://www.npmjs.com/package/@antv/layout-wasm) Provide a WASM binding of `@antv/layout-rust`. [Online Demo](https://observablehq.com/d/288c16a54543a141)
- [@antv/layout-gpu](./packages/layout-gpu/README.md) [](https://www.npmjs.com/package/@antv/layout-gpu) Accelerate some parallelizable algorithms such as Fruchterman with WebGPU which has a better performance under large amount of data.
Online benchmarks: https://antv.vision/layout/index.html
## Development
We use [Vite](https://vitejs.dev/) to start a dev server:
```bash
$ pnpm dev
```
## Test
```bash
$ pnpm test
```
## Publish
Using Changesets with pnpm: https://pnpm.io/next/using-changesets
The generated markdown files in the .changeset directory should be committed to the repository.
```bash
pnpm changeset
```
This will bump the versions of the packages previously specified with pnpm changeset (and any dependents of those) and update the changelog files.
```bash
pnpm changeset version
```
Commit the changes. This command will publish all packages that have bumped versions not yet present in the registry.
```bash
pnpm publish -r
```
If you want to publish versions for test:
```bash
pnpm changeset pre enter alpha # 发布 alpha 版本
pnpm changeset pre enter beta # 发布 beta 版本
pnpm changeset pre enter rc # 发布 rc 版本
```