blur
Browse files
Remotion-app/src/HelloWorld/ImageStream.jsx
CHANGED
|
@@ -44,7 +44,9 @@ export default function ImageStream() {
|
|
| 44 |
durationInFrames: 1,
|
| 45 |
easing: Easing.bezier(0.02, 1.85, 0.83, 0.43),
|
| 46 |
})}
|
| 47 |
-
|
|
|
|
|
|
|
| 48 |
</>
|
| 49 |
);
|
| 50 |
})}
|
|
@@ -68,6 +70,17 @@ const Images = ({entry, key}) => {
|
|
| 68 |
to: 1,
|
| 69 |
durationInFrames: durationInFrames,
|
| 70 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
const zoom = interpolate(spr, [0, 0.5, 1], [1, 1.5, 1.3], {
|
| 73 |
// easing: Easing.bezier(0.8, 0.22, 0.96, 0.65),
|
|
@@ -75,11 +88,19 @@ const Images = ({entry, key}) => {
|
|
| 75 |
extrapolateRight: 'clamp',
|
| 76 |
});
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
return (
|
| 79 |
<>
|
| 80 |
<Img
|
| 81 |
style={{
|
| 82 |
transform: `scale(${zoom})`,
|
|
|
|
|
|
|
| 83 |
// transition: 'all 5s ease',
|
| 84 |
}}
|
| 85 |
src={staticFile(entry.name)}
|
|
|
|
| 44 |
durationInFrames: 1,
|
| 45 |
easing: Easing.bezier(0.02, 1.85, 0.83, 0.43),
|
| 46 |
})}
|
| 47 |
+
>
|
| 48 |
+
jelllo
|
| 49 |
+
</TransitionSeries.Transition>
|
| 50 |
</>
|
| 51 |
);
|
| 52 |
})}
|
|
|
|
| 70 |
to: 1,
|
| 71 |
durationInFrames: durationInFrames,
|
| 72 |
});
|
| 73 |
+
const initialSpring = spring({
|
| 74 |
+
fps,
|
| 75 |
+
frame,
|
| 76 |
+
config: {
|
| 77 |
+
damping: 100,
|
| 78 |
+
},
|
| 79 |
+
delay: 0,
|
| 80 |
+
from: 0,
|
| 81 |
+
to: 1,
|
| 82 |
+
durationInFrames: 2,
|
| 83 |
+
});
|
| 84 |
|
| 85 |
const zoom = interpolate(spr, [0, 0.5, 1], [1, 1.5, 1.3], {
|
| 86 |
// easing: Easing.bezier(0.8, 0.22, 0.96, 0.65),
|
|
|
|
| 88 |
extrapolateRight: 'clamp',
|
| 89 |
});
|
| 90 |
|
| 91 |
+
const blur = interpolate(initialSpring, [0, 1], [30, 0], {
|
| 92 |
+
// easing: Easing.bezier(0.8, 0.22, 0.96, 0.65),
|
| 93 |
+
extrapolateLeft: 'clamp',
|
| 94 |
+
extrapolateRight: 'clamp',
|
| 95 |
+
});
|
| 96 |
+
|
| 97 |
return (
|
| 98 |
<>
|
| 99 |
<Img
|
| 100 |
style={{
|
| 101 |
transform: `scale(${zoom})`,
|
| 102 |
+
filter: `blur(${blur}px)`,
|
| 103 |
+
transform: `translateX((${blur * 10}px)`,
|
| 104 |
// transition: 'all 5s ease',
|
| 105 |
}}
|
| 106 |
src={staticFile(entry.name)}
|