@remotion/transitions
Advanced tools
Comparing version 4.0.88 to 4.0.89
@@ -7,4 +7,10 @@ "use strict"; | ||
const remotion_1 = require("remotion"); | ||
const epsilon = 0.01; | ||
const SlidePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left', enterStyle, exitStyle }, }) => { | ||
const directionStyle = (0, react_1.useMemo)(() => { | ||
// Overlay the two slides barely to avoid a white line between them | ||
// Remove the correction once the presentation progress is 1 | ||
const presentationProgressWithEpsilonCorrection = presentationProgress === 1 | ||
? presentationProgress * 100 | ||
: presentationProgress * 100 - epsilon; | ||
if (presentationDirection === 'exiting') { | ||
@@ -14,3 +20,3 @@ switch (direction) { | ||
return { | ||
transform: `translateX(${presentationProgress * 100}%)`, | ||
transform: `translateX(${presentationProgressWithEpsilonCorrection}%)`, | ||
}; | ||
@@ -23,3 +29,3 @@ case 'from-right': | ||
return { | ||
transform: `translateY(${presentationProgress * 100}%)`, | ||
transform: `translateY(${presentationProgressWithEpsilonCorrection}%)`, | ||
}; | ||
@@ -41,3 +47,3 @@ case 'from-bottom': | ||
return { | ||
transform: `translateX(${100 - presentationProgress * 100}%)`, | ||
transform: `translateX(${100 - presentationProgressWithEpsilonCorrection}%)`, | ||
}; | ||
@@ -50,3 +56,3 @@ case 'from-top': | ||
return { | ||
transform: `translateY(${100 - presentationProgress * 100}%)`, | ||
transform: `translateY(${100 - presentationProgressWithEpsilonCorrection}%)`, | ||
}; | ||
@@ -53,0 +59,0 @@ default: |
{ | ||
"name": "@remotion/transitions", | ||
"version": "4.0.88", | ||
"version": "4.0.89", | ||
"description": "Transition presets for Remotion", | ||
@@ -19,5 +19,5 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@remotion/shapes": "4.0.88", | ||
"remotion": "4.0.88", | ||
"@remotion/paths": "4.0.88" | ||
"remotion": "4.0.89", | ||
"@remotion/shapes": "4.0.89", | ||
"@remotion/paths": "4.0.89" | ||
}, | ||
@@ -37,4 +37,4 @@ "devDependencies": { | ||
"@rollup/plugin-typescript": "^8.2.0", | ||
"remotion": "4.0.88", | ||
"@remotion/test-utils": "4.0.88" | ||
"remotion": "4.0.89", | ||
"@remotion/test-utils": "4.0.89" | ||
}, | ||
@@ -41,0 +41,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
67551
39
1434
+ Added@remotion/paths@4.0.89(transitive)
+ Added@remotion/shapes@4.0.89(transitive)
+ Addedremotion@4.0.89(transitive)
- Removed@remotion/paths@4.0.88(transitive)
- Removed@remotion/shapes@4.0.88(transitive)
- Removedremotion@4.0.88(transitive)
Updated@remotion/paths@4.0.89
Updated@remotion/shapes@4.0.89
Updatedremotion@4.0.89