File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -540,14 +540,16 @@ fn process_scale_input(
540
540
541
541
for ( mut transform, selection) in & mut scale_selections {
542
542
if app_status. selection == * selection {
543
- transform. scale *= 1.0 + mouse_motion. delta . x * SCALE_SPEED ;
543
+ transform. scale = ( transform. scale * ( 1.0 + mouse_motion. delta . x * SCALE_SPEED ) )
544
+ . clamp ( Vec3 :: splat ( 0.01 ) , Vec3 :: splat ( 5.0 ) ) ;
544
545
}
545
546
}
546
547
547
548
for ( mut spotlight, selection) in & mut spotlight_selections {
548
549
if app_status. selection == * selection {
549
- spotlight. outer_angle =
550
- ( spotlight. outer_angle * ( 1.0 + mouse_motion. delta . x * SCALE_SPEED ) ) . min ( FRAC_PI_4 ) ;
550
+ spotlight. outer_angle = ( spotlight. outer_angle
551
+ * ( 1.0 + mouse_motion. delta . x * SCALE_SPEED ) )
552
+ . clamp ( 0.01 , FRAC_PI_4 ) ;
551
553
spotlight. inner_angle = spotlight. outer_angle ;
552
554
}
553
555
}
You can’t perform that action at this time.
0 commit comments