Skip to content

Create professional demos and 3D mockups in seconds, directly in your browser

Merge branch 'main' into feat/3d-camera-controls

Efrain Chiri Ninae2cec70a037c
diff --cc lib/canvas.utils.ts
index f8a7998,d01f717..e81f6e0
--- a/lib/canvas.utils.ts
+++ b/lib/canvas.utils.ts
@@@ -234,14 -230,13 +230,21 @@@ export function calculateSmoothZoom
return 1 + (targetScale - 1) * easeOutQuart(progress);
}
++ feat/3d-camera-controls
+ // Exit ramp [end-T, end]: begin at targetScale and decay back to 1 by endTime.
+ const timeBeforeEnd = fragment.endTime - time;
+ if (transitionSec > 0 && timeBeforeEnd < transitionSec) {
+ const progress = Math.min(1, Math.max(0, (transitionSec - timeBeforeEnd) / transitionSec));
+ return 1 + (targetScale - 1) * (1 - easeOutQuart(progress));
++=======
+ const timeBeforeEnd = fragment.endTime - time;
+ if (transitionSec > 0 && timeBeforeEnd < transitionSec) {
+ const timeIntoExit = transitionSec - timeBeforeEnd;
+ const progress = Math.min(1, Math.max(0, timeIntoExit / transitionSec));
+ return targetScale - (targetScale - 1) * easeOutQuart(progress);
++ main
}
- // Hold
return targetScale;
};