-
Notifications
You must be signed in to change notification settings - Fork 373
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
Example of how to embed the Rerun Viewer inside your own GUI (+ ergonomic improvements) #2250
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your title & description isn't doing the many small improvements you got in here justice :)
# Turn on if you want to share analytics with Rerun (e.g. callstacks on crashes). | ||
analytics = ["re_crash_handler/analytics", "re_viewer/analytics"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reckon this is opt-in since we want to force the user to make a conscious choice to have analytics that may include their own callstack? A bit unfortunate since this might make us miss a lot of analytics going forward 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, exactly. I'm not sure if we want to see a lot of analytics from unwrap()
s in our users code though.
}); | ||
ui.separator(); | ||
|
||
if let Some(log_db) = self.rerun_app.log_db() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kinda out of scope, but if we'd expose the ViewerContext instead, we could do extra nice things like showing our data ui on on_hover 🤔
…omic improvements) (#2250) Closes #2243 Add an example showing how to wrap the Rerun Viewer in your own GUI, using [`eframe`](https://github.com/emilk/egui/tree/master/crates/eframe) and [`egui`](https://github.com/emilk/egui). This example can be useful for anyone who wants to extend the viewer with their own controls and widgets. The example shows how to read from the data store. Analytics are supported but is an opt-in feature in the example `Cargo.toml`. I created a `re_crash_handler` crate so that the example can get useful info on panics and signals, and have them sent to rerun if they enable analytics. Only works on `main` (not on 0.6.0). ![image](https://github.com/rerun-io/rerun/assets/1148717/cbbad63e-9b18-4e54-bafe-b6ffd723f63e) * [ ] Top-level docs at https://www.rerun.io/docs * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) <!-- This line will get updated when the PR build summary job finishes. --> PR Build Summary: https://build.rerun.io/pr/2250 --------- Co-authored-by: Andreas Reich <[email protected]>
Closes #2243
What
Add an example showing how to wrap the Rerun Viewer in your own GUI, using
eframe
andegui
.This example can be useful for anyone who wants to extend the viewer with their own controls and widgets. The example shows how to read from the data store.
Analytics are supported but is an opt-in feature in the example
Cargo.toml
.I created a
re_crash_handler
crate so that the example can get useful info on panics and signals, and have them sent to rerun if they enable analytics.Only works on
main
(not on 0.6.0).TODO
Checklist
PR Build Summary: https://build.rerun.io/pr/2250