Fix smooth zoom response for zero delta time

This commit is contained in:
2026-04-27 00:55:06 +02:00
parent 6ebc875fd4
commit 2ddabc0566

View File

@@ -1630,7 +1630,7 @@ export class ViewportHost {
private getSmoothZoomFrameResponse(dt: number) {
if (dt <= 0) {
return 1;
return SMOOTH_ZOOM_IMMEDIATE_RESPONSE;
}
return Math.min(1, 1 - Math.exp(-SMOOTH_ZOOM_RESPONSE * dt));