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

Expose ui point radii to logging & blueprint, remove old default radius settings in favor of blueprint default components #6678

Merged
merged 30 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
71baa1c
update radius doc & add python utility for ui points
Wumpf Jun 28, 2024
6f12c95
allow negative radius on radius processing
Wumpf Jun 28, 2024
58570d6
add python points3d snippet for ui radius
Wumpf Jun 28, 2024
6419126
wip: snippet placeholder for points2d ui radius
Wumpf Jun 28, 2024
82ba394
ui/scene unit aware radius ui
Wumpf Jun 28, 2024
68ff62e
improve radius docs, call it consistently ui points & scene units
Wumpf Jun 28, 2024
aa1f414
remove line/point default radius settings from 2d/3d views
Wumpf Jun 28, 2024
e0deb7d
remove auto size from re_renderer
Wumpf Jun 28, 2024
8fb3afa
Express some hardcoded default radii as Radius::default
Wumpf Jul 1, 2024
0e8936a
minor fix to compare_snippet_output
Wumpf Jul 1, 2024
ce83e0f
add rust version of point3d_ui_radius
Wumpf Jul 1, 2024
21aa36f
Add C++ point3d_ui_radius demo & C++ radius extensions
Wumpf Jul 1, 2024
0df4118
add example for ui radius & points2d
Wumpf Jul 1, 2024
5b8035a
Add snippet for strip3d with ui radius
Wumpf Jul 1, 2024
cd6f858
Add snippet for 2d line point radius
Wumpf Jul 1, 2024
5d21722
fix ignoring Result on new snippets
Wumpf Jul 1, 2024
776a153
fix C++ warning
Wumpf Jul 1, 2024
5f06955
add UI & GUI capitilization lint
Wumpf Jul 1, 2024
3f0a956
fix scaling typos
Wumpf Jul 1, 2024
8f65587
comment fix
Wumpf Jul 1, 2024
da6fe69
don't clamp radius_ui drag value so user can't put in negative numbers
Wumpf Jul 1, 2024
9a1860e
rename ONE_UI_POINTS to ONE_UI_POINT
Wumpf Jul 1, 2024
2b1ad43
remove Size::ONE
Wumpf Jul 1, 2024
948979e
rename box_radius to box_line_radius
Wumpf Jul 1, 2024
975439d
Remove Radius::ONE
Wumpf Jul 1, 2024
6ce81c2
treat -0.0 (and even negative NaN) as ui point, simplified assertions
Wumpf Jul 1, 2024
13c2e2b
remove unused next_offset
Wumpf Jul 1, 2024
79991c7
fix UI capitalization that got missed due to codegen
Wumpf Jul 1, 2024
9f729cf
add tests & comments for point/scene distinction
Wumpf Jul 2, 2024
9f5d8c5
fix point2d_ui_radius comparison test, rename entities to be more sen…
Wumpf Jul 2, 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
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Update instructions:
| Crate | Description |
|-----------------------------|-------------------------------------------------------------------------------------------------------------|
| re_blueprint_tree | The UI for the blueprint tree in the left panel. |
| re_edit_ui | Provides ui editors for Rerun component data for registration with the Rerun Viewer component ui registry. |
| re_edit_ui | Provides UI editors for Rerun component data for registration with the Rerun Viewer component UI registry. |
| re_selection_panel | The UI for the selection panel. |
| 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. |
Expand All @@ -148,7 +148,7 @@ Update instructions:
| Crate | Description |
|-----------------------|----------------------------------------------------------------------|
| re_context_menu | Support crate for context menu and actions. |
| re_data_ui | Provides ui elements for Rerun component data for the Rerun Viewer. |
| re_data_ui | Provides UI elements for Rerun component data for the Rerun Viewer. |
| re_renderer | A wgpu-based renderer for all your visualization needs. |
| re_ui | Rerun GUI theme and helpers, built around egui |
| re_viewer_context | Rerun Viewer state that is shared with the viewer's code components. |
Expand Down
16 changes: 8 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ As always there's a lot going on under the hood:
#### 🪳 Bug Fixes
- Fix silently interpreting zero time range as latest-at query [#6172](https://github.com/rerun-io/rerun/pull/6172)
- Fix not being able to click suggestions in space origin selection dropdown [#6200](https://github.com/rerun-io/rerun/pull/6200)
- Fix bug in origin selection ui [#6199](https://github.com/rerun-io/rerun/pull/6199)
- Fix bug in origin selection UI [#6199](https://github.com/rerun-io/rerun/pull/6199)
- Fix out-of-bounds crash in origin selection popup [#6202](https://github.com/rerun-io/rerun/pull/6202)
- Fix rare crash [#6251](https://github.com/rerun-io/rerun/pull/6251)
- Fix visual glitch when extending the time panel [#6255](https://github.com/rerun-io/rerun/pull/6255)
Expand All @@ -92,7 +92,7 @@ As always there's a lot going on under the hood:
- New data APIs 11: port all range-only views (plots, logs…) [#5992](https://github.com/rerun-io/rerun/pull/5992)
- New data APIs 12: port all spatial views [#5993](https://github.com/rerun-io/rerun/pull/5993)
- New data APIs 14: port everything that used to be uncached [#6035](https://github.com/rerun-io/rerun/pull/6035)
- Make visible time range ui aware of latest-at & `QueryRange` [#6176](https://github.com/rerun-io/rerun/pull/6176)
- Make visible time range UI aware of latest-at & `QueryRange` [#6176](https://github.com/rerun-io/rerun/pull/6176)
- Visible time ranges are now specified per timeline, not per timeline type [#6204](https://github.com/rerun-io/rerun/pull/6204)
- Send TCP protocol header to ignore non-rerun clients [#6253](https://github.com/rerun-io/rerun/pull/6253) (thanks [@gurry](https://github.com/gurry)!)

Expand Down Expand Up @@ -615,7 +615,7 @@ Check out our [migration guide](https://www.rerun.io/docs/reference/migration/mi
- Improve the UI for the entity query [#5022](https://github.com/rerun-io/rerun/pull/5022)
- Don't show the Blueprint header when on the welcome screen [#5046](https://github.com/rerun-io/rerun/pull/5046)
- Move Visible Time Range higher in the Selection Panel [#5036](https://github.com/rerun-io/rerun/pull/5036)
- Clean up time range ui [#5089](https://github.com/rerun-io/rerun/pull/5089)
- Clean up time range UI [#5089](https://github.com/rerun-io/rerun/pull/5089)
- Improve preview UI for Component data [#5093](https://github.com/rerun-io/rerun/pull/5093)
- Paint closest labels on top of labels further away [#5124](https://github.com/rerun-io/rerun/pull/5124)

Expand Down Expand Up @@ -760,7 +760,7 @@ Check out our [migration guide](https://www.rerun.io/docs/reference/migration/mi
- Show connection status in top bar [#4443](https://github.com/rerun-io/rerun/pull/4443)
- Add the possibility to add empty space views of all registered types [#4467](https://github.com/rerun-io/rerun/pull/4467)
- Add experimental Dataframe Space View [#4468](https://github.com/rerun-io/rerun/pull/4468)
- Show e2e latency in metric ui in top panel [#4502](https://github.com/rerun-io/rerun/pull/4502)
- Show e2e latency in metric UI in top panel [#4502](https://github.com/rerun-io/rerun/pull/4502)
- Show leading slash when formatting entity paths [#4537](https://github.com/rerun-io/rerun/pull/4537)
- Improve entity size stats: include whole subtree [#4542](https://github.com/rerun-io/rerun/pull/4542)
- Add support for modal Windows to `re_ui` and use it for the Space View entity picker [#4577](https://github.com/rerun-io/rerun/pull/4577)
Expand Down Expand Up @@ -1763,7 +1763,7 @@ here's a smaller release packed with useful improvements 🎉
- Move `Caches` to `re_viewer_ctx` and make it generic [#2043](https://github.com/rerun-io/rerun/pull/2043)
- Move time control to re_viewer_context [#2045](https://github.com/rerun-io/rerun/pull/2045)
- Move `ViewerContext` & `ComponentUiRegistry` to `viewer_context` [#2047](https://github.com/rerun-io/rerun/pull/2047)
- Move data ui to new `re_data_ui` crate [#2048](https://github.com/rerun-io/rerun/pull/2048)
- Move data UI to new `re_data_ui` crate [#2048](https://github.com/rerun-io/rerun/pull/2048)
- Use instant for `Time::now()` [#2090](https://github.com/rerun-io/rerun/pull/2090)
- Move from `instant` -> `web_time` [#2093](https://github.com/rerun-io/rerun/pull/2093)
- "namespace" flag parameters for linestrip & point cloud shader flags [#2033](https://github.com/rerun-io/rerun/pull/2033)
Expand Down Expand Up @@ -2114,7 +2114,7 @@ We now host an experimental and unpolished web-viewer at <https://app.rerun.io/>
- Allow rolling 3D camera with primary mouse button + alt modifier [#1659](https://github.com/rerun-io/rerun/pull/1659)
- Name space views after the space and indicate duplicate names [#1653](https://github.com/rerun-io/rerun/pull/1653)
- Add banner about mobile browsers being unsupported [#1674](https://github.com/rerun-io/rerun/pull/1674)
- Improve ui for tensors and color map selection [#1683](https://github.com/rerun-io/rerun/pull/1683)
- Improve UI for tensors and color map selection [#1683](https://github.com/rerun-io/rerun/pull/1683)
- Only show the mobile OS warning banner on web [#1685](https://github.com/rerun-io/rerun/pull/1685)
- Improve the depth backprojection feature [#1690](https://github.com/rerun-io/rerun/pull/1690)
- Swap overlay order of selection & hover outlines [#1705](https://github.com/rerun-io/rerun/pull/1705)
Expand All @@ -2133,7 +2133,7 @@ We now host an experimental and unpolished web-viewer at <https://app.rerun.io/>
- Warn when most of the RAM has been used up by Rerun [#1651](https://github.com/rerun-io/rerun/pull/1651)
- Apply color maps to all types of depth tensors [#1686](https://github.com/rerun-io/rerun/pull/1686)
- Size boosted outlines for points & lines, color & size tweaking [#1667](https://github.com/rerun-io/rerun/pull/1667)
- Default point radius to 1.5 ui points [#1706](https://github.com/rerun-io/rerun/pull/1706)
- Default point radius to 1.5 UI points [#1706](https://github.com/rerun-io/rerun/pull/1706)
- When streaming an rrd from http: play it, don't follow it [#1707](https://github.com/rerun-io/rerun/pull/1707)

#### 🕸️ Web
Expand Down Expand Up @@ -2311,7 +2311,7 @@ Meanwhile, we did a bunch of improvements to our manual. If you had trouble runn
* Replace `reqwest` with `ureq` [#1407](https://github.com/rerun-io/rerun/pull/1407)
* Remove derive_more dependency [#1406](https://github.com/rerun-io/rerun/pull/1406)
* Use different artifact names for wasm/js in debug builds [#1428](https://github.com/rerun-io/rerun/pull/1428)
* Separate Mac wheels & trigger wheel build from ui [#1499](https://github.com/rerun-io/rerun/pull/1499)
* Separate Mac wheels & trigger wheel build from UI [#1499](https://github.com/rerun-io/rerun/pull/1499)
* Add spell checking to CI [#1492](https://github.com/rerun-io/rerun/pull/1492)
* Repo size
* Always create new orphaned branch for gh-pages [#1490](https://github.com/rerun-io/rerun/pull/1490)
Expand Down
2 changes: 1 addition & 1 deletion crates/re_data_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates.
![MIT](https://img.shields.io/badge/license-MIT-blue.svg)
![Apache](https://img.shields.io/badge/license-Apache-blue.svg)

Provides ui elements for Rerun component data for the Rerun Viewer.
Provides UI elements for Rerun component data for the Rerun Viewer.
2 changes: 1 addition & 1 deletion crates/re_edit_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates.
![MIT](https://img.shields.io/badge/license-MIT-blue.svg)
![Apache](https://img.shields.io/badge/license-Apache-blue.svg)

Provides ui editors for Rerun component data for registration with the Rerun Viewer component ui registry.
Provides UI editors for Rerun component data for registration with the Rerun Viewer component UI registry.
6 changes: 4 additions & 2 deletions crates/re_edit_ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ mod color;
mod datatype_editors;
mod marker_shape;
mod material;
mod radius;
mod range1d;
mod response_utils;
mod visual_bounds2d;
Expand All @@ -20,7 +21,7 @@ use re_types::{
components::{
AggregationPolicy, AxisLength, Color, Colormap, DepthMeter, DrawOrder, FillRatio,
GammaCorrection, ImagePlaneDistance, MagnificationFilter, MarkerSize, Name, Opacity,
Radius, StrokeWidth, Text,
StrokeWidth, Text,
},
Loggable as _,
};
Expand All @@ -35,6 +36,8 @@ pub fn register_editors(registry: &mut re_viewer_context::ComponentUiRegistry) {
registry.add_singleline_editor_ui(color::edit_color_ui);
registry.add_display_ui(Color::name(), Box::new(color::display_color_ui));

registry.add_singleline_editor_ui(radius::edit_radius_ui);

registry.add_singleline_editor_ui(marker_shape::edit_marker_shape_ui);
registry.add_singleline_editor_ui(material::edit_material_ui);
registry.add_singleline_editor_ui(range1d::edit_range1d);
Expand All @@ -48,7 +51,6 @@ pub fn register_editors(registry: &mut re_viewer_context::ComponentUiRegistry) {

registry.add_singleline_editor_ui::<DepthMeter>(edit_f32_zero_to_max_float_raw);
registry.add_singleline_editor_ui::<MarkerSize>(edit_f32_zero_to_max_float_raw);
registry.add_singleline_editor_ui::<Radius>(edit_f32_zero_to_max_float_raw);
registry.add_singleline_editor_ui::<StrokeWidth>(edit_f32_zero_to_max_float_raw);

registry.add_singleline_editor_ui::<Opacity>(edit_f32_zero_to_one);
Expand Down
66 changes: 66 additions & 0 deletions crates/re_edit_ui/src/radius.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
use egui::NumExt as _;
use re_types::components::Radius;
use re_viewer_context::ViewerContext;

use crate::response_utils::response_with_changes_of_inner;

pub fn edit_radius_ui(
_ctx: &ViewerContext<'_>,
ui: &mut egui::Ui,
value: &mut Radius,
) -> egui::Response {
let mut abs_value = value.0.abs();
let speed = (abs_value * 0.01).at_least(0.001);

let drag_response = ui.add(
egui::DragValue::new(&mut abs_value)
.range(0.0..=f32::INFINITY)
.speed(speed),
);

let mut is_scene_units = value.scene_units().is_some();
let selected_label = label_for_unit(is_scene_units);

if ui.is_enabled() {
let combobox_response = egui::ComboBox::from_id_source("units")
.selected_text(selected_label)
.show_ui(ui, |ui| {
ui.selectable_value(&mut is_scene_units, true, label_for_unit(true))
| ui.selectable_value(&mut is_scene_units, false, label_for_unit(false))
});

if combobox_response
.inner
.as_ref()
.map_or(false, |r| r.changed())
{
// When we change the type of units,the value is likely going to be _very wrong_.
// Unfortunately, we don't have knowledge of a fallback here, so we use hardcoded "reasonable" values.
if is_scene_units {
abs_value = 0.5;
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to be able to use the auto_size_world_heuristic somehow, but I guess that's a hard ask

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah 100% and it would indeed be a very complicated/annoying wire to put in. That's what I meant above with not being able to access a fallback (fallbacks have this kind of context sensitive information)

} else {
abs_value = 2.5;
};
}

if is_scene_units {
*value = Radius::new_scene_units(abs_value);
} else {
*value = Radius::new_ui_points(abs_value);
}

drag_response | response_with_changes_of_inner(combobox_response)
} else {
// Don't show the combo box drop down if this is disabled ui.
// TODO(#6661): This shouldn't happen on disabled ui, but rather when this is simply not editable.
ui.selectable_label(false, selected_label)
}
}

fn label_for_unit(is_scene_units: bool) -> &'static str {
if is_scene_units {
"scene units"
} else {
"ui points"
Wumpf marked this conversation as resolved.
Show resolved Hide resolved
}
}
3 changes: 1 addition & 2 deletions crates/re_renderer/shader/depth_cloud.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ fn vs_main(@builtin(vertex_index) vertex_idx: u32) -> VertexOut {
// Span quad
let camera_distance = distance(frame.camera_position, point_data.pos_in_world);
let world_scale_factor = average_scale_from_transform(depth_cloud_info.world_from_rdf); // TODO(andreas): somewhat costly, should precompute this
let world_radius = unresolved_size_to_world(point_data.unresolved_radius, camera_distance,
frame.auto_size_points, world_scale_factor) +
let world_radius = unresolved_size_to_world(point_data.unresolved_radius, camera_distance, world_scale_factor) +
world_size_from_point_size(depth_cloud_info.radius_boost_in_ui_points, camera_distance);
let quad = sphere_or_circle_quad_span(vertex_idx, point_data.pos_in_world, world_radius, false);
out.pos_in_clip = frame.projection_from_world * vec4f(quad.pos_in_world, 1.0);
Expand Down
7 changes: 1 addition & 6 deletions crates/re_renderer/shader/global_bindings.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ struct FrameUniformBuffer {
/// (tan(fov_y / 2) * aspect_ratio, tan(fov_y /2)), i.e. half ratio of screen dimension to screen distance in x & y.
/// Both values are set to f32max for orthographic projection
tan_half_fov: vec2f,

// Size used for all point radii given with Size::AUTO.
auto_size_points: f32,

// Size used for all line radii given with Size::AUTO.
auto_size_lines: f32,
_padding: vec2f,

/// re_renderer defined device tier.
device_tier: u32,
Expand Down
2 changes: 1 addition & 1 deletion crates/re_renderer/shader/lines.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ fn vs_main(@builtin(vertex_index) vertex_idx: u32) -> VertexOut {
}
let camera_distance = distance(camera_ray.origin, center_position);
let world_scale_factor = average_scale_from_transform(batch.world_from_obj); // TODO(andreas): somewhat costly, should precompute this
var strip_radius = unresolved_size_to_world(strip_data.unresolved_radius, camera_distance, frame.auto_size_lines, world_scale_factor);
var strip_radius = unresolved_size_to_world(strip_data.unresolved_radius, camera_distance, world_scale_factor);

// If the triangle cap is longer than the quad would be otherwise, we need to stunt it, otherwise we'd get artifacts.
var triangle_cap_length = batch.triangle_cap_length_factor * strip_radius;
Expand Down
3 changes: 1 addition & 2 deletions crates/re_renderer/shader/point_cloud.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ fn vs_main(@builtin(vertex_index) vertex_idx: u32) -> VertexOut {
// Span quad
let camera_distance = distance(frame.camera_position, point_data.pos);
let world_scale_factor = average_scale_from_transform(batch.world_from_obj); // TODO(andreas): somewhat costly, should precompute this
let world_radius = unresolved_size_to_world(point_data.unresolved_radius, camera_distance,
frame.auto_size_points, world_scale_factor) +
let world_radius = unresolved_size_to_world(point_data.unresolved_radius, camera_distance, world_scale_factor) +
world_size_from_point_size(draw_data.radius_boost_in_ui_points, camera_distance);
let quad = sphere_or_circle_quad_span(vertex_idx, point_data.pos, world_radius,
has_any_flag(batch.flags, FLAG_DRAW_AS_CIRCLES));
Expand Down
15 changes: 1 addition & 14 deletions crates/re_renderer/shader/utils/size.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,7 @@ fn world_size_from_point_size(size_in_points: f32, camera_distance: f32) -> f32
// world_size_scale:
// Scale factor that is applied iff the size is a world size.
// This is usually part of your object->world transform.
fn unresolved_size_to_world(_unresolved_size: f32, camera_distance: f32, auto_size: f32, world_size_scale: f32) -> f32 {
// Resolve auto size.
var unresolved_size: f32;
if _unresolved_size >= f32max {
// positive max for small auto size
unresolved_size = auto_size;
} else if _unresolved_size <= f32min {
// negative max for large auto size
let large_factor = 1.33;
unresolved_size = auto_size * large_factor;
} else {
unresolved_size = _unresolved_size;
}

fn unresolved_size_to_world(unresolved_size: f32, camera_distance: f32, world_size_scale: f32) -> f32 {
// Is it a world size?
if unresolved_size > 0.0 {
return unresolved_size * world_size_scale;
Expand Down
8 changes: 1 addition & 7 deletions crates/re_renderer/src/global_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@ pub struct FrameUniformBuffer {

/// (tan(fov_y / 2) * aspect_ratio, tan(fov_y /2)), i.e. half ratio of screen dimension to screen distance in x & y.
/// Both values are set to f32max for orthographic projection
pub tan_half_fov: wgpu_buffer_types::Vec2,

// Size used for all point radii given with Size::AUTO.
pub auto_size_points: f32,

// Size used for all line radii given with Size::AUTO.
pub auto_size_lines: f32,
pub tan_half_fov: wgpu_buffer_types::Vec2RowPadded,

/// re_renderer defined device tier.
pub device_tier: wgpu_buffer_types::U32RowPadded,
Expand Down
2 changes: 1 addition & 1 deletion crates/re_renderer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub use queuable_draw_data::QueueableDrawData;
pub use rect::{RectF32, RectInt};
pub use size::Size;
pub use transform::RectTransform;
pub use view_builder::{AutoSizeConfig, ViewBuilder};
pub use view_builder::ViewBuilder;
pub use wgpu_resources::WgpuResourcePoolStatistics;

use draw_phases::DrawPhase;
Expand Down
4 changes: 3 additions & 1 deletion crates/re_renderer/src/point_cloud_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ impl<'a, 'ctx> PointCloudBatchBuilder<'a, 'ctx> {
// But it's surprisingly tricky to do this effectively.
let vertices = izip!(
positions.iter().copied(),
radii.iter().copied().chain(std::iter::repeat(Size::AUTO))
radii.iter().copied().chain(std::iter::repeat(
*radii.last().unwrap_or(&Size::ONE_UI_POINT)
))
)
.map(|(pos, radius)| PositionRadius { pos, radius })
.collect_vec();
Expand Down
2 changes: 1 addition & 1 deletion crates/re_renderer/src/renderer/lines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pub mod gpu_data {
impl Default for LineStripInfo {
fn default() -> Self {
Self {
radius: crate::Size::AUTO.into(),
radius: crate::Size::new_ui_points(1.5).into(),
color: Color32::WHITE,
stippling: 0,
flags: LineStripFlags::empty(),
Expand Down
Loading
Loading