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

Implement graph components and archetypes #7500

Merged
merged 252 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
252 commits
Select commit Hold shift + click to select a range
b39c35a
WIP: revise data model
grtlr Sep 25, 2024
74f1aeb
WIP: improve data model by making node ids non-global
grtlr Sep 25, 2024
8102a95
WIP: fmt
grtlr Sep 25, 2024
10339c1
WIP: Basic color component working with clamping
grtlr Sep 26, 2024
6c6519b
WIP: streamline visualizer data processing
grtlr Sep 27, 2024
c2a2d4e
WIP: fix component aggregation
grtlr Sep 27, 2024
b2c9a73
WIP: build an internal `petgraph` representation
grtlr Sep 27, 2024
0f78d8b
WIP: Implement basic highlights
grtlr Sep 27, 2024
8823513
WIP: basic node drawing
grtlr Sep 27, 2024
c0900c9
WIP: fix lints
grtlr Sep 27, 2024
34032eb
WIP: try to get edges working
grtlr Sep 30, 2024
aaa8733
WIP: implement node labels
grtlr Sep 30, 2024
30ec59d
WIP: basic edge drawing working
grtlr Sep 30, 2024
36d4c8f
WIP: highlight edges
grtlr Sep 30, 2024
5c0284f
WIP: improve style
grtlr Sep 30, 2024
aeb518e
WIP: drag and drop working
grtlr Sep 30, 2024
58328fb
WIP: clean up drawing code
grtlr Sep 30, 2024
e41c0fe
WIP: add basic entity boxes
grtlr Sep 30, 2024
7558ee3
WIP: improve hierarchical labels
grtlr Oct 1, 2024
e1965bf
WIP: reduce cloning
grtlr Oct 1, 2024
d8b16c8
WIP: refactor out layout in separate pass
grtlr Oct 1, 2024
803ef60
WIP: fix lints
grtlr Oct 1, 2024
b786845
WIP: fix drawing problems
grtlr Oct 2, 2024
dff3358
WIP: refactor layout algorithm
grtlr Oct 2, 2024
f644118
WIP: fit so screen
grtlr Oct 2, 2024
ef3da62
WIP: fix bounding box extent
grtlr Oct 2, 2024
8e4c69d
WIP: debug layers
grtlr Oct 2, 2024
c50a508
WIP: More cleanup
grtlr Oct 2, 2024
eac1765
WIP: show entity path again
grtlr Oct 2, 2024
761d817
WIP: fmt
grtlr Oct 2, 2024
4aaac83
WIP: introduce `EdgeInstance`
grtlr Oct 2, 2024
95bbb99
WIP: limit scale to 1
grtlr Oct 2, 2024
ff950e0
WIP: improve node styling
grtlr Oct 7, 2024
5e1cdcb
WIP: refactor edges
grtlr Oct 7, 2024
ebf5a66
WIP: prepare for dummy nodes
grtlr Oct 7, 2024
63f9baa
WIP: basic dummy nodes working
grtlr Oct 8, 2024
44cd7d2
WIP: improve dummy nodes
grtlr Oct 8, 2024
c5104be
WIP: fix dummy nodes
grtlr Oct 8, 2024
0c5d6b9
WIP: fmt
grtlr Oct 8, 2024
8f99d6f
WIP: refactor layout
grtlr Oct 8, 2024
6465092
WIP: cleanup
grtlr Oct 8, 2024
511543d
WIP: factor out drawing of entities
grtlr Oct 8, 2024
3c3e65f
WIP: make debug information available in selection
grtlr Oct 8, 2024
0df93fd
WIP: clean up
grtlr Oct 8, 2024
d42c899
WIP: minor changes
grtlr Oct 8, 2024
002c7b0
WIP: cleanup
grtlr Oct 8, 2024
8fea1fc
WIP: fix visibility
grtlr Oct 8, 2024
80ad5b1
WIP: More cleanup
grtlr Oct 9, 2024
6463f23
WIP: moving things around
grtlr Oct 9, 2024
32b9f9c
WIP: more cleanup
grtlr Oct 9, 2024
4654d3e
WIP: forgotten
grtlr Oct 9, 2024
a1d9dc7
WIP: more fix
grtlr Oct 9, 2024
61203fb
WIP: initial implementation of directed edges
grtlr Oct 9, 2024
435a646
WIP: implement `LayoutProvider`
grtlr Oct 9, 2024
9c86e37
WIP: layout switching and convenience
grtlr Oct 10, 2024
fc40c49
WIP: fmt
grtlr Oct 10, 2024
69d225e
WIP: rerun (no pun intended :innocent:) codegen
grtlr Oct 10, 2024
58e2267
WIP: add social example and some fixes
grtlr Oct 10, 2024
8fd9263
WIP: use unreleased version of `fdg`
grtlr Oct 11, 2024
6fddce8
feat: implement `From<ShowLabels>` for `bool`
grtlr Oct 11, 2024
c64678e
WIP: better force-directed layouts and nodes as circles
grtlr Oct 11, 2024
933a712
WIP: fmt
grtlr Oct 11, 2024
25022b7
WIP: improve node rendering
grtlr Oct 11, 2024
760d8d4
WIP: make circles draggable
grtlr Oct 11, 2024
f32e299
WIP: make circle logic position independent
grtlr Oct 11, 2024
69e55fc
WIP: prepare refactor
grtlr Oct 11, 2024
db1dc1d
WIP: remove `Layout` trait
grtlr Oct 14, 2024
c96ac2e
WIP: add tooltips
grtlr Oct 14, 2024
da1c85a
WIP: static graphs
grtlr Oct 14, 2024
c73f2e5
WIP: improve hash
grtlr Oct 14, 2024
009482c
WIP: cleanup
grtlr Oct 14, 2024
adad111
WIP: fmt
grtlr Oct 14, 2024
37562a3
WIP: Basic scene refactor working
grtlr Oct 14, 2024
85ccfed
WIP: finish scene abstraction
grtlr Oct 15, 2024
8fa2c63
WIP: fix docs
grtlr Oct 15, 2024
600b812
WIP: initial implementation of `re_force`
grtlr Oct 16, 2024
e5d70f6
WIP: improve `re_force` implementation
grtlr Oct 17, 2024
898afc6
WIP: before improving `link` force
grtlr Oct 18, 2024
e60b06f
WIP: fmt
grtlr Oct 18, 2024
6c9f327
WIP: improve forces
grtlr Oct 18, 2024
8685be0
WIP: improve simulation flow
grtlr Oct 18, 2024
b919f17
WIP: improve example
grtlr Oct 18, 2024
9c7e021
WIP: start implementing quadtree
grtlr Oct 18, 2024
eb09bfb
WIP: fix cover
grtlr Oct 22, 2024
748740c
WIP: fmt
grtlr Oct 22, 2024
c2edffd
Merge branch 'main' into feat/graph-primitives
grtlr Oct 22, 2024
229e6b6
WIP: move graph view inside of Rerun
grtlr Oct 22, 2024
dda3947
WIP: fmt
grtlr Oct 22, 2024
b63f0ed
WIP: fix `Cargo.lock`
grtlr Oct 22, 2024
b4c5ce3
WIP: fix imports
grtlr Oct 22, 2024
812a5d1
WIP: implement radial layout
grtlr Oct 23, 2024
85b5963
WIP
grtlr Oct 23, 2024
fb44b7a
WIP
grtlr Oct 23, 2024
1408bad
WIP: undo data model changes
grtlr Oct 23, 2024
a40390c
WIP: implement new data model
grtlr Oct 24, 2024
49e8277
WIP: improve examples
grtlr Oct 24, 2024
3aa50ac
WIP: cleanup and feedback
grtlr Oct 24, 2024
181d6a4
WIP: fix
grtlr Oct 24, 2024
68e9435
WIP: codegen
grtlr Oct 24, 2024
111b0f5
WIP: implement `nohash_hasher::IsEnabled`
grtlr Oct 24, 2024
64c09f1
WIP: doc
grtlr Oct 24, 2024
cdae279
WIP: Remove `social` example files
grtlr Oct 24, 2024
adb3ec9
WIP: remove broken examples
grtlr Oct 24, 2024
b694ac3
WIP: Remove experimental feature flag
grtlr Oct 25, 2024
eb4ae25
WIP: Add archetypes to `gen_common_index.py`
grtlr Oct 25, 2024
c36e011
WIP: fix codegen and start working on Python example
grtlr Oct 25, 2024
b1ae62a
WIP: missing Python import
grtlr Oct 25, 2024
d524516
WIP: try to get example to run
grtlr Oct 25, 2024
558b98b
WIP: import rerun
grtlr Oct 25, 2024
f1d9f21
WIP: lints
grtlr Oct 25, 2024
2bf7079
WIP: add view icon (looking great by the way! :star-struck:)
grtlr Oct 25, 2024
59acc6b
WIP: include example
grtlr Oct 25, 2024
10cf7f0
WIP: initial Python example
grtlr Oct 25, 2024
5613a07
WIP: finish first Python example
grtlr Oct 25, 2024
d9d4a02
WIP: doc
grtlr Oct 25, 2024
729682c
WIP: remove dead code
grtlr Oct 25, 2024
e04b6e5
WIP: fit to screen
grtlr Oct 25, 2024
2fa2815
Merge branch 'main' into feat/graph-primitives
grtlr Oct 25, 2024
007e8d1
WIP: fix `pixi.lock`
grtlr Oct 25, 2024
f3ff5f6
WIP: Change to `Utf8Pair`
grtlr Oct 28, 2024
59049fe
WIP: `attr.doc` and docstrings
grtlr Oct 28, 2024
b3d7b4c
Register GraphType component edit ui
abey79 Oct 28, 2024
9ef47be
WIP: `pixi run codegen`
grtlr Oct 28, 2024
0674ef0
WIP: prevent nodes from being dragged
grtlr Oct 28, 2024
81d556d
WIP: basic blueprint support
grtlr Oct 28, 2024
50a11a9
WIP: fix Python example
grtlr Oct 28, 2024
24b3ed7
WIP: try to provide types
grtlr Oct 28, 2024
82f190c
WIP: more feedback
grtlr Oct 29, 2024
ec64a20
WIP: cleanup
grtlr Oct 29, 2024
36f6670
WIP: add `binary_tree` example to Rust
grtlr Oct 29, 2024
9140ee6
Merge branch 'main' into fork/grtlr/feat/graph-primitives
abey79 Oct 29, 2024
5375384
WIP: fix `machete` warnings
grtlr Oct 29, 2024
9f6d989
WIP: use packages from the workspace
grtlr Oct 29, 2024
a80192c
WIP: remove `serde` from codegen
grtlr Oct 29, 2024
954844c
WIP: `clippy`
grtlr Oct 29, 2024
3b7608e
WIP: feedback and removal of lifetimes
grtlr Oct 29, 2024
b636bc3
WIP: refactor per entity drawing
grtlr Oct 29, 2024
ead179f
WIP: Minor improvements
grtlr Oct 30, 2024
1023394
WIP: use mono component
grtlr Oct 30, 2024
bc4580d
WIP: add entity selections
grtlr Oct 30, 2024
c790ef4
WIP: handle implicit nodes
grtlr Oct 30, 2024
d1d144a
WIP: remove unneeded `error`
grtlr Oct 30, 2024
08eff6e
WIP: add Python and Rust snippets
grtlr Oct 30, 2024
91e9385
WIP: still broken! `C++` snippet
grtlr Oct 30, 2024
ebcbe4c
WIP: C++ examples with warnings
grtlr Oct 30, 2024
9b55b72
Merge branch 'main' into feat/graph-primitives
grtlr Nov 4, 2024
539ad0a
WIP: rerun :wink: codegen
grtlr Nov 4, 2024
0284625
WIP: fmt
grtlr Nov 4, 2024
c7de2bf
WIP: more lints
grtlr Nov 4, 2024
d295b43
WIP: remove unneeded dependencies
grtlr Nov 4, 2024
29e4a53
WIP: missing entry in `manifest.toml`
grtlr Nov 4, 2024
47c20a5
WIP: improve Python example
grtlr Nov 4, 2024
ebf8fa2
WIP: more lints
grtlr Nov 4, 2024
89232ad
WIP: format C++ snippets
grtlr Nov 4, 2024
83cb218
WIP: improve C++ example
grtlr Nov 4, 2024
636a7c5
WIP: drive-by fix of `tensor_dimension_ext.cpp`
grtlr Nov 4, 2024
5a7cb20
WIP: typo
grtlr Nov 4, 2024
a242daa
WIP: fix doc comment
grtlr Nov 4, 2024
9d14402
WIP: fix `entity`
grtlr Nov 4, 2024
9585b16
WIP: reset layout after every frame
grtlr Nov 5, 2024
c100d50
WIP: fix view init
grtlr Nov 5, 2024
a3ce5f7
WIP: add `radius` to `GraphNodes` archetype
grtlr Nov 6, 2024
a8a1c01
WIP: rename to `radii` and provide fallback
grtlr Nov 6, 2024
7a592c0
WIP: prepare scene refactor
grtlr Nov 6, 2024
854c215
WIP: properly differentiate between `ui` and `scene` radius
grtlr Nov 6, 2024
e1b8a59
WIP: cleanup node drawing
grtlr Nov 7, 2024
41448c3
WIP: restructure
grtlr Nov 7, 2024
c9d09ab
WIP: rename to canvas
grtlr Nov 7, 2024
5ea8067
WIP: create `CanvasContext` to store transformations
grtlr Nov 7, 2024
8d0533e
WIP: remove `counter`
grtlr Nov 7, 2024
4f597d9
WIP: untangle `draw_entity`
grtlr Nov 7, 2024
0aaa219
WIP: fix entity interactions
grtlr Nov 8, 2024
dd743b8
WIP: allow dragging if pointer is on children
grtlr Nov 8, 2024
4838aec
WIP: allow pointer events on entities
grtlr Nov 8, 2024
88572d6
Merge branch 'main' into feat/graph-primitives
grtlr Nov 8, 2024
91d8c29
Merge branch 'main' into feat/graph-primitives
grtlr Nov 14, 2024
74c301f
WIP: fix merge
grtlr Nov 14, 2024
7b4b1f6
WIP: experiment with auto-layout
grtlr Nov 11, 2024
4ab3024
WIP: basic auto-layout working
grtlr Nov 11, 2024
f602414
WIP: compute individual layouts
grtlr Nov 13, 2024
2018c1a
WIP: restructure
grtlr Nov 13, 2024
552d3c5
WIP: finish initial version of auto-layout
grtlr Nov 14, 2024
efa710b
WIP: fmt
grtlr Nov 14, 2024
2658d5e
WIP: stash
grtlr Nov 14, 2024
d22f19b
WIP: per frame almost working
grtlr Nov 15, 2024
e6f1637
WIP: reset button
grtlr Nov 15, 2024
f8e9eda
WIP: working for demo!
grtlr Nov 15, 2024
2e54352
WIP: small improvements
grtlr Nov 15, 2024
0ccef12
WIP: create offset
grtlr Nov 15, 2024
f900aa8
Merge pull request #3 from grtlr/feat/graph-auto-layout
grtlr Nov 15, 2024
d05e266
WIP: fix entity rect
grtlr Nov 19, 2024
9fc8dd3
WIP: fmt
grtlr Nov 19, 2024
f1db8f8
WIP: sensible default forces
grtlr Nov 19, 2024
bf49647
WIP: improve offset
grtlr Nov 19, 2024
ff522e1
WIP: mark archetypes experimental
grtlr Nov 19, 2024
e530ba3
WIP: bump deps
grtlr Nov 19, 2024
476c395
Merge branch 'main' into feat/graph-primitives
grtlr Nov 19, 2024
456795f
WIP: fix merge
grtlr Nov 19, 2024
3facb25
WIP: small cleanup
grtlr Nov 20, 2024
7adad6b
Fix Utf8Pair arrow serialisation + WIP tests and Numpy API
abey79 Nov 20, 2024
8e5ab19
WIP: optional entity rects
grtlr Nov 20, 2024
3e4327d
WIP: fix panic
grtlr Nov 20, 2024
52e1d24
WIP: lints
grtlr Nov 20, 2024
d8549a3
WIP: fix `help_markdown`
grtlr Nov 20, 2024
f80b054
WIP: streamline Python examples
grtlr Nov 20, 2024
b7d296c
WIP: improve `README`
grtlr Nov 20, 2024
1bc7345
WIP: feedback around naming
grtlr Nov 21, 2024
f7b2cc6
Add numpy support to Utf8Pair and cleanup things
abey79 Nov 21, 2024
b2a1f14
WIP: add `debug_assert` instead of panic
grtlr Nov 21, 2024
8ebd1d9
WIP: comments
grtlr Nov 21, 2024
4a1282a
WIP: descriminate on entities as well
grtlr Nov 21, 2024
93d0e7f
WIP: Add view blueprint and a release checklist
abey79 Nov 21, 2024
e77d326
Increase edge force to 50
abey79 Nov 21, 2024
1e554f1
Renames
abey79 Nov 21, 2024
3d5bf65
WIP: small improvements
grtlr Nov 21, 2024
4cc6521
WIP: Restructure examples
grtlr Nov 21, 2024
b5b2ce1
WIP: Improve tooltips
grtlr Nov 21, 2024
b196c65
WIP: update `pixi.lock`
grtlr Nov 22, 2024
c32f6a7
WIP: enable basic clicking on nodes
grtlr Nov 22, 2024
3ed721d
WIP: fix zooming bug
grtlr Nov 22, 2024
9df6392
WIP: update discriminator to use hash of data
grtlr Nov 22, 2024
d1e29f8
WIP: Add Python lattice example
grtlr Nov 22, 2024
33ecd67
WIP: render to middle layer
grtlr Nov 22, 2024
e590008
WIP: upload images
grtlr Nov 22, 2024
7538159
WIP: Provide example `README.md` files
grtlr Nov 22, 2024
dfec841
WIP: `cargo machete`
grtlr Nov 22, 2024
5237b48
WIP: typo
grtlr Nov 22, 2024
6b00b47
WIP: improve checklist
grtlr Nov 22, 2024
1d1996e
Merge branch 'main' into feat/graph-primitives
grtlr Nov 22, 2024
b7704bc
WIP: update `codegen`
grtlr Nov 22, 2024
969afde
WIP: fix thumbnail dimensons
grtlr Nov 25, 2024
1e60820
WIP: fmt
grtlr Nov 25, 2024
daa200d
WIP: remove bluprint stubs
grtlr Nov 25, 2024
f5b0033
WIP: add blueprint snippet
grtlr Nov 25, 2024
5b8684e
WIP: lints
grtlr Nov 25, 2024
e4bb6fa
Make it easier to construct graph nodes & edges in C++
Wumpf Nov 25, 2024
13c16a9
WIP: fix comment
grtlr Nov 25, 2024
fc6446c
WIP: `codegen` and `fmt`
grtlr Nov 25, 2024
8bc8b18
WIP: fix chunk error
grtlr Nov 25, 2024
27f5e6a
WIP: minor change
grtlr Nov 25, 2024
a31f84d
Merge branch 'main' into feat/graph-primitives
grtlr Nov 25, 2024
5d0b3bb
WIP: add `speculative-link` to `README`s
grtlr Nov 25, 2024
f85a21e
WIP: fix example scaffolding
grtlr Nov 25, 2024
97c84b7
WIP: typo
grtlr Nov 25, 2024
a5a0382
WIP: fix `check_all_components_ui`
grtlr Nov 25, 2024
9026a8d
WIP: fmt
grtlr Nov 25, 2024
9c40b4b
WIP: more speculative
grtlr Nov 25, 2024
e4a6596
WIP: remove todo
grtlr Nov 25, 2024
44ff86c
Merge branch 'main' into feat/graph-primitives
grtlr Nov 25, 2024
10b672a
WIP: re-apply codegen
grtlr Nov 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ Update instructions:
| re_space_view | Types & utilities for defining Space View classes and communicating with the Viewport. |
| re_space_view_bar_chart | A Space View that shows a single bar chart. |
| re_space_view_dataframe | A Space View that shows the data contained in entities in a table. |
| re_space_view_graph | A Space View that shows a graph (node-link diagram). |
Copy link
Member

@abey79 abey79 Oct 25, 2024

Choose a reason for hiding this comment

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

Note to self: update the crate diagram

edit: turns out I dont need to do it myself :D 🎉

Copy link
Member

Choose a reason for hiding this comment

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

Done:

<picture>
  <img src="https://static.rerun.io/crates/4d33e64671a72ce4bcc3220d91bfb567b283b06b/full.png" alt="">
  <source media="(max-width: 480px)" srcset="https://static.rerun.io/crates/4d33e64671a72ce4bcc3220d91bfb567b283b06b/480w.png">
  <source media="(max-width: 768px)" srcset="https://static.rerun.io/crates/4d33e64671a72ce4bcc3220d91bfb567b283b06b/768w.png">
  <source media="(max-width: 1024px)" srcset="https://static.rerun.io/crates/4d33e64671a72ce4bcc3220d91bfb567b283b06b/1024w.png">
  <source media="(max-width: 1200px)" srcset="https://static.rerun.io/crates/4d33e64671a72ce4bcc3220d91bfb567b283b06b/1200w.png">
</picture>

| re_space_view_map | A Space View that shows geospatial data on a map. |
| re_space_view_spatial | Space Views that show entities in a 2D or 3D spatial relationship. |
| re_space_view_tensor | A Space View dedicated to visualizing tensors with arbitrary dimensionality. |
Expand Down
48 changes: 48 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2376,6 +2376,12 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"

[[package]]
name = "fjadra"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccc0416b27f53bba6c9bd564260f27d4784c5f430926eb16a519356be7d66bbc"

[[package]]
name = "flatbuffers"
version = "23.5.26"
Expand Down Expand Up @@ -2754,6 +2760,25 @@ dependencies = [
"bitflags 2.6.0",
]

[[package]]
name = "graph_binary_tree"
version = "0.21.0-alpha.1+dev"
dependencies = [
"anyhow",
"clap",
"rerun",
]

[[package]]
name = "graph_lattice"
version = "0.21.0-alpha.1+dev"
dependencies = [
"anyhow",
"clap",
"itertools 0.13.0",
"rerun",
]

[[package]]
name = "h2"
version = "0.3.26"
Expand Down Expand Up @@ -6052,6 +6077,28 @@ dependencies = [
"thiserror",
]

[[package]]
name = "re_space_view_graph"
version = "0.21.0-alpha.1+dev"
dependencies = [
"ahash",
"bytemuck",
"egui",
"fjadra",
"nohash-hasher",
"re_chunk",
"re_format",
"re_log_types",
"re_query",
"re_renderer",
"re_space_view",
"re_tracing",
"re_types",
"re_ui",
"re_viewer_context",
"re_viewport_blueprint",
]

[[package]]
name = "re_space_view_map"
version = "0.21.0-alpha.1+dev"
Expand Down Expand Up @@ -6462,6 +6509,7 @@ dependencies = [
"re_smart_channel",
"re_space_view_bar_chart",
"re_space_view_dataframe",
"re_space_view_graph",
"re_space_view_map",
"re_space_view_spatial",
"re_space_view_tensor",
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ re_space_view = { path = "crates/viewer/re_space_view", version = "=0.21.0-alpha
re_space_view_bar_chart = { path = "crates/viewer/re_space_view_bar_chart", version = "=0.21.0-alpha.1", default-features = false }
re_space_view_spatial = { path = "crates/viewer/re_space_view_spatial", version = "=0.21.0-alpha.1", default-features = false }
re_space_view_dataframe = { path = "crates/viewer/re_space_view_dataframe", version = "=0.21.0-alpha.1", default-features = false }
re_space_view_graph = { path = "crates/viewer/re_space_view_graph", version = "=0.21.0-alpha.1", default-features = false }
re_space_view_map = { path = "crates/viewer/re_space_view_map", version = "=0.21.0-alpha.1", default-features = false }
re_space_view_tensor = { path = "crates/viewer/re_space_view_tensor", version = "=0.21.0-alpha.1", default-features = false }
re_space_view_text_document = { path = "crates/viewer/re_space_view_text_document", version = "=0.21.0-alpha.1", default-features = false }
Expand Down Expand Up @@ -186,6 +187,7 @@ enumset = "1.0.12"
env_logger = { version = "0.10", default-features = false }
ffmpeg-sidecar = { version = "2.0.2", default-features = false }
fixed = { version = "1.28", default-features = false }
fjadra = "0.1"
flatbuffers = "23.0"
futures-channel = "0.3"
futures-util = { version = "0.3", default-features = false }
Expand Down
2 changes: 2 additions & 0 deletions crates/store/re_types/definitions/rerun/archetypes.fbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions crates/store/re_types/definitions/rerun/archetypes/graph_edges.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace rerun.archetypes;

// ---

// TODO(ab): Add images to snippets.

/// A list of edges in a graph.
///
/// By default, edges are undirected.
///
/// \example archetypes/graph_undirected !api title="Simple undirected graph" image=""
Copy link
Member

Choose a reason for hiding this comment

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

add screenshot

  1. run example
  2. chose a "nice" layout/window size
  3. command palette -> screenshot
  4. pixi run upload-image --name graph_undirected (uses the currently copied image)
  5. copy-paste the url of the 1200px version

/// \example archetypes/graph_directed !api title="Simple directed graph" image=""
table GraphEdges (
"attr.docs.category": "Graph",
"attr.docs.unreleased",
"attr.docs.view_types": "GraphView",
"attr.rust.derive": "PartialEq, Eq",
"attr.rerun.experimental"
) {
// --- Required ---

/// A list of node tuples.
edges: [rerun.components.GraphEdge] ("attr.rerun.component_required", order: 1000);


// --- Recommended ---

/// Specifies if the graph is directed or undirected.
grtlr marked this conversation as resolved.
Show resolved Hide resolved
///
/// If no `GraphType` is provided, the graph is assumed to be undirected.
graph_type: rerun.components.GraphType ("attr.rerun.component_recommended", nullable, order: 2000);

}
39 changes: 39 additions & 0 deletions crates/store/re_types/definitions/rerun/archetypes/graph_nodes.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
namespace rerun.archetypes;

// ---

// TODO(ab): Add images to snippets.

/// A list of nodes in a graph with optional labels, colors, etc.
///
/// \example archetypes/graph_undirected !api title="Simple undirected graph" image=""
/// \example archetypes/graph_directed !api title="Simple directed graph" image=""
Copy link
Member

Choose a reason for hiding this comment

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

add screenshot

table GraphNodes (
"attr.docs.category": "Graph",
"attr.docs.unreleased",
"attr.docs.view_types": "GraphView",
"attr.rust.derive": "PartialEq",
"attr.rerun.experimental"
) {
// --- Required ---

/// A list of node IDs.
node_ids: [rerun.components.GraphNode] ("attr.rerun.component_required", order: 1000);

// --- Optional ---

/// Optional center positions of the nodes.
positions: [rerun.components.Position2D] ("attr.rerun.component_optional", nullable, order: 3000);

/// Optional colors for the boxes.
colors: [rerun.components.Color] ("attr.rerun.component_optional", nullable, order: 3100);

/// Optional text labels for the node.
labels: [rerun.components.Text] ("attr.rerun.component_optional", nullable, order: 3200);

/// Optional choice of whether the text labels should be shown by default.
show_labels: rerun.components.ShowLabels ("attr.rerun.component_optional", nullable, order: 3250);

/// Optional radii for nodes.
radii: [rerun.components.Radius] ("attr.rerun.component_optional", nullable, order: 3300);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions crates/store/re_types/definitions/rerun/blueprint/views/graph.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace rerun.blueprint.views;

/// A graph view to display time-variying, directed or undirected graph visualization.
///
/// \example views/graph title="Use a blueprint to create a graph view." image="https://static.rerun.io/graph_lattice/f9169da9c3f35b7260c9d74cd5be5fe710aec6a8/1200w.png"
table GraphView (
"attr.rerun.view_identifier": "Graph",
"attr.docs.unreleased"
) {
/// Everything within these bounds is guaranteed to be visible.
///
/// Somethings outside of these bounds may also be visible due to letterboxing.
visual_bounds: rerun.blueprint.archetypes.VisualBounds2D (order: 1000);
}
3 changes: 3 additions & 0 deletions crates/store/re_types/definitions/rerun/components.fbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions crates/store/re_types/definitions/rerun/components/graph_edge.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace rerun.components;

// ---

/// An edge in a graph connecting two nodes.
table GraphEdge (
"attr.docs.unreleased",
"attr.rust.derive": "Default, PartialEq, Eq, PartialOrd, Ord",
"attr.rust.repr": "transparent"
) {
edge: rerun.datatypes.Utf8Pair (order: 100);
}
14 changes: 14 additions & 0 deletions crates/store/re_types/definitions/rerun/components/graph_node.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace rerun.components;

// ---

/// A string-based ID representing a node in a graph.
table GraphNode (
"attr.docs.unreleased",
"attr.python.aliases": "str",
"attr.python.array_aliases": "str, Sequence[str]",
"attr.rust.derive": "Default, PartialEq, Eq, PartialOrd, Ord, Hash",
"attr.rust.repr": "transparent"
) {
id: rerun.datatypes.Utf8 (order: 100);
}
18 changes: 18 additions & 0 deletions crates/store/re_types/definitions/rerun/components/graph_type.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace rerun.components;

// --

/// Specifies if a graph has directed or undirected edges.
enum GraphType: ubyte (
"attr.docs.unreleased",
"attr.rust.derive": "Default, PartialEq, Eq"
) {
/// Invalid value. Won't show up in generated types.
Invalid = 0,

/// The graph has undirected edges.
Undirected (default),

/// The graph has directed edges.
Directed,
}
1 change: 1 addition & 0 deletions crates/store/re_types/definitions/rerun/datatypes.fbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions crates/store/re_types/definitions/rerun/datatypes/utf8_pair.fbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace rerun.datatypes;

/// Stores a tuple of UTF-8 strings.
table Utf8Pair (
"attr.docs.unreleased",
"attr.python.aliases": "Tuple[datatypes.Utf8Like, datatypes.Utf8Like]",
"attr.python.array_aliases": "npt.NDArray[np.str_]",
"attr.rust.derive": "Default, PartialEq, Eq, PartialOrd, Ord"
) {
/// The first string.
first: rerun.datatypes.Utf8 (order: 100);

/// The second string.
second: rerun.datatypes.Utf8 (order: 200);
}
2 changes: 2 additions & 0 deletions crates/store/re_types/src/archetypes/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading