3D全部引入

This commit is contained in:
2026-08-22 02:16:48 +08:00
parent 424784f47d
commit 80e5b05e63
9 changed files with 397 additions and 164 deletions
+15 -1
View File
@@ -49,6 +49,20 @@ int run_web_server(std::uint16_t port, const std::filesystem::path& asset_root)
plots->emplace("constellation", make_constellation_plot(executor));
plots->emplace("selection_overlay", make_selection_overlay_plot(executor));
plots->emplace("datoviz_point", make_datoviz_point_plot(executor));
plots->emplace("datoviz_splat", make_datoviz_splat_plot(executor));
plots->emplace("datoviz_pixel", make_datoviz_pixel_plot(executor));
plots->emplace("datoviz_marker", make_datoviz_marker_plot(executor));
plots->emplace("datoviz_sphere", make_datoviz_sphere_plot(executor));
plots->emplace("datoviz_segment", make_datoviz_segment_plot(executor));
plots->emplace("datoviz_vector", make_datoviz_vector_plot(executor));
plots->emplace("datoviz_primitive", make_datoviz_primitive_plot(executor));
plots->emplace("datoviz_mesh", make_datoviz_mesh_plot(executor));
plots->emplace("datoviz_path", make_datoviz_path_plot(executor));
plots->emplace("datoviz_image", make_datoviz_image_plot(executor));
plots->emplace("datoviz_labels", make_datoviz_labels_plot(executor));
plots->emplace("datoviz_glyph", make_datoviz_glyph_plot(executor));
plots->emplace("datoviz_text", make_datoviz_text_plot(executor));
plots->emplace("datoviz_volume", make_datoviz_volume_plot(executor));
auto resolve_plot = [plots](std::string_view id) { return find_plot(*plots, id); };
auto websocket = std::make_shared<Graph_WebSocket_Controller>(resolve_plot);
@@ -61,7 +75,7 @@ int run_web_server(std::uint16_t port, const std::filesystem::path& asset_root)
static_cast<void>(plot);
result.push_back({
{"id", id}, {"title", id}, {"category", "Plots"}, {"description", ""},
{"dimension", ""}, {"websocket", "/ws/plot/" + id},
{"dimension", id.starts_with("datoviz_") ? "3D" : "2D"}, {"websocket", "/ws/plot/" + id},
{"schema", "/plot/" + id + "/schema"}});
}
callback(json_response(std::move(result)));