You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let lerped_translation = self.transform.translation.lerp(other.transform.translation, time);
475
+
476
+
// Shortest-arc rotation interpolation
477
+
letmut rotation_diff = t_angle - s_angle;
478
+
if rotation_diff > PI{
479
+
rotation_diff -= TAU;
480
+
}elseif rotation_diff < -PI{
481
+
rotation_diff += TAU;
482
+
}
483
+
let lerped_angle = s_angle + rotation_diff * time;
484
+
485
+
let lerped_scale = s_scale.lerp(t_scale, time);
486
+
let lerped_skew = s_skew.lerp(t_skew, time);
487
+
488
+
let trs = DAffine2::from_scale_angle_translation(lerped_scale, lerped_angle, lerped_translation);
489
+
let skew = DAffine2::from_cols_array(&[1., lerped_skew.y, lerped_skew.x,1.,0.,0.]);
490
+
trs * skew
491
+
},
468
492
non_scaling:if time < 0.5{self.non_scaling}else{ other.non_scaling},
469
493
paint_order:if time < 0.5{self.paint_order}else{ other.paint_order},
470
494
}
@@ -775,8 +799,8 @@ pub enum RenderMode {
775
799
Normal = 0,
776
800
/// Render only the outlines of shapes at the current viewport resolution
777
801
Outline,
778
-
// /// Render with normal coloration at the document resolution, showing the pixels when the current viewport resolution is higher
779
-
// PixelPreview,
802
+
/// Render with normal coloration at the document export resolution; at zoom > 100% this shows individual export pixels upscaled with nearest-neighbor filtering
803
+
PixelPreview,
780
804
/// Render a preview of how the object would be exported as an SVG.
0 commit comments