#particle #force #warnings #fjadra

fjadra

Library for simulating physical forces on particles

3 unstable releases

0.2.1 Dec 11, 2024
0.2.0 Dec 6, 2024
0.1.0 Nov 19, 2024

#54 in Visualization

Download history 392/week @ 2024-12-21 598/week @ 2024-12-28 3287/week @ 2025-01-04 5165/week @ 2025-01-11 3297/week @ 2025-01-18 3285/week @ 2025-01-25 4424/week @ 2025-02-01 2782/week @ 2025-02-08 3935/week @ 2025-02-15 3000/week @ 2025-02-22 7766/week @ 2025-03-01 11977/week @ 2025-03-08 10692/week @ 2025-03-15 10344/week @ 2025-03-22 9035/week @ 2025-03-29 10306/week @ 2025-04-05

41,828 downloads per month
Used in 4 crates (via re_view_graph)

MIT/Apache

89KB
2.5K SLoC

Fjädra 🪽

A library for simulating physical forces on particles, which was heavily inspired by 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 and Parry from Dimforge.

Warning

This library is currently under development so the API is still likely to change.


Development is sponsored by Rerun, 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 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)

No runtime deps