Keep wipeout frames continuous

This commit is contained in:
ramox81 committed 2026-09-11 17:27:34 +03:00
1 parent 21a232ef8d
commit 61e5271055
6 files changed
+19 -10

No files matched your search

+10 -5
View File
@@ -407,11 +407,10 @@ pub struct WireModel {
pub pattern: [f32; 8],
/// Rendered line width in screen pixels (half-width = line_weight_px / 2).
pub line_weight_px: f32,
/// World-space band width (drawing units). `0.0` = a normal wire whose
/// width comes from `line_weight_px` (screen pixels). Non-zero = a wide
/// polyline: the shader expands this centre-line to `world_width` world
/// units (scaling with zoom) so the band IS the wire — the linetype dash
/// pattern then applies to the band instead of a separate hatch fill.
/// World-space band width (drawing units). Positive values create a wide
/// polyline band that scales with zoom. Zero uses `line_weight_px` and the
/// drawing's lineweight display setting. A negative value encodes a fixed
/// screen-pixel width whose absolute value bypasses that display setting.
pub world_width: f32,
/// Per-point full band width (drawing units), aligned index-for-index with
/// [`points`], for a polyline whose width VARIES (a taper). Empty = a
@@ -553,6 +552,12 @@ impl WireModel {
w
}
pub fn set_fixed_screen_width(&mut self, width_px: f32) {
let width_px = width_px.max(1.0);
self.line_weight_px = width_px;
self.world_width = -width_px;
}
/// Create a solid wire (no dash pattern, 1px weight).
pub fn solid(name: String, points: Vec<[f32; 3]>, color: [f32; 4], selected: bool) -> Self {
Self {