Revert jerky zoom fix; cap strong zoom level instead
Dividing the centering shift by top_scale (previous commit) avoided the strong-zoom black border, but made the shift a nonlinear function of the scale value being interpolated -- mid-animation, the pan no longer tracked the zoom at a constant rate, which read as jerky/skippy motion. Reverted shift to the original linear formula, (1-s)*(ART_SIZE/2), which moves smoothly in lockstep with Scale's own eased interpolation. Instead, capped ZOOM_LEVELS["strong"] at 1.45 (down from 1.7) -- the highest value where this plain linear formula stays safely inside the art's bounds, verified with the calibration tool (no black border across the full animation cycle, at both 1.45x and against a live station).
This commit is contained in:
1 parent
9f2216c692
commit
5f42319e26
2 files changed
+19
-17
No files matched your search
@@ -30,7 +30,7 @@ ART_ZOOM_DURATION = 200
|
||||
def _art_widget(art_bytes, zoom_scale):
|
||||
art = render.Image(src = art_bytes, width = ART_SIZE, height = ART_SIZE)
|
||||
top_scale = max(zoom_scale, 1.0)
|
||||
shift = (1.0 - top_scale) * (ART_SIZE / 2.0) / top_scale
|
||||
shift = (1.0 - top_scale) * (ART_SIZE / 2.0)
|
||||
zoom = animation.Transformation(
|
||||
child = art,
|
||||
duration = ART_ZOOM_DURATION,
|
||||
|
||||