https://github.com/grtlr/fjadra
Library for simulating physical forces on particles, heavily inspired by d3-force.
https://github.com/grtlr/fjadra
force-layout graphs node-link-diagrams visualization
Last synced: 26 days ago
JSON representation
Library for simulating physical forces on particles, heavily inspired by d3-force.
- Host: GitHub
- URL: https://github.com/grtlr/fjadra
- Owner: grtlr
- License: apache-2.0
- Created: 2024-11-06T08:18:36.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-12-30T08:07:32.000Z (5 months ago)
- Last Synced: 2025-04-28T19:59:20.709Z (26 days ago)
- Topics: force-layout, graphs, node-link-diagrams, visualization
- Language: Rust
- Homepage:
- Size: 230 KB
- Stars: 74
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
Fjädra 🪽
![]()
![]()
![]()
[**Documentation**](https://docs.rs/fjadra/latest/fjadra/)
`fjadra` is a library for simulating physical forces on particles, which was heavily inspired by [`d3-force`](https://d3js.org/d3-force).
Its main use case is to layout graphs (i.e. node-link diagrams)—if you are looking for a pure physics engine, you might want to check out the excellent [Rapier](https://rapier.rs/) and [Parry](https://parry.rs/) from [Dimforge](`www.dimforge.com`).---
![]()
Development is sponsored by [Rerun](https://www.rerun.io/), a startup building
an SDK for visualizing streams of multimodal data.---
## Design Goals
- Produce outputs that are comparable to `d3-force`.
- Lightweight with only minimal dependencies to allow `wasm-bindgen` and future `no_std` support.
- Idiomatic Rust API that still follows the `d3` conventions where possible.
- Performance that allows user interactions.## Forces
We currently support the following forces:
- Collision on circles (`Collide`)
- Centering (`Center`)
- Springs (`Link`)
- Charge and repulsion (`ManyBody`)
- Gravity (`PositionX` and `PositionY`)