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

Support loading images and meshes on web #3131

Merged
merged 4 commits into from
Aug 29, 2023
Merged

Conversation

emilk
Copy link
Member

@emilk emilk commented Aug 28, 2023

What

Drag-dropping images and meshes now works on web, as does File->Open.

I also managed to get rid of the use of MsgSender to create a LogMsg, simplifying the dependencies a bit (if not the code).

Checklist

@emilk emilk added 🕸️ web regarding running the viewer in a browser 📺 re_viewer affects re_viewer itself labels Aug 28, 2023
re_log_types::DataTable::from_rows(re_log_types::TableId::random(), [data_row]);
let arrow_msg = data_table.to_arrow_msg()?;
Ok(LogMsg::ArrowMsg(store_id, arrow_msg))
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Creating log messages is quite verbose 😬

Copy link
Member

Choose a reason for hiding this comment

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

At least it doesn't look too arcane.

@@ -329,7 +329,7 @@ impl App {
self.add_receiver(rx);
}
Err(err) => {
re_log::error!("Failed to open data source: {err}");
re_log::error!("Failed to open data source: {}", re_error::format(err));
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a really bad gotcha. By default, anyhow::Error only shows the latest part of its context 🤦

Copy link
Member

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

Nice! Nothing caught my eyes 👍🏻

re_log_types::DataTable::from_rows(re_log_types::TableId::random(), [data_row]);
let arrow_msg = data_table.to_arrow_msg()?;
Ok(LogMsg::ArrowMsg(store_id, arrow_msg))
}
Copy link
Member

Choose a reason for hiding this comment

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

At least it doesn't look too arcane.

@emilk emilk merged commit 80cc99d into main Aug 29, 2023
@emilk emilk deleted the emilk/load-images-and-meshes branch August 29, 2023 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📺 re_viewer affects re_viewer itself 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All files Rerun can open should support command line, drag, and open from menu
2 participants