way off
Browse files
Remotion-app/src/HelloWorld/ImageStream.jsx
CHANGED
@@ -6,7 +6,7 @@ import imageSequences from './Assets/ImageSequences.json';
|
|
6 |
import {TransitionSeries, linearTiming} from '@remotion/transitions';
|
7 |
|
8 |
export default function ImageStream() {
|
9 |
-
const {fps} = useVideoConfig();
|
10 |
|
11 |
const frame = useCurrentFrame();
|
12 |
return (
|
@@ -24,20 +24,16 @@ export default function ImageStream() {
|
|
24 |
}}
|
25 |
>
|
26 |
{imageSequences.map((entry, index) => {
|
27 |
-
const durationInFrames = (entry.end - entry.start) * fps;
|
28 |
|
29 |
const zoom = interpolate(
|
30 |
frame,
|
31 |
-
[
|
32 |
-
fps * entry.start,
|
33 |
-
fps * entry.start + 2 * (durationInFrames / 4),
|
34 |
-
fps * entry.end,
|
35 |
-
],
|
36 |
[1, 1.2, 1],
|
37 |
{
|
38 |
easing: Easing.bezier(0.8, 0.22, 0.96, 0.65),
|
39 |
-
extrapolateLeft: 'clamp',
|
40 |
-
extrapolateRight: 'clamp',
|
41 |
}
|
42 |
);
|
43 |
|
|
|
6 |
import {TransitionSeries, linearTiming} from '@remotion/transitions';
|
7 |
|
8 |
export default function ImageStream() {
|
9 |
+
const {fps, durationInFrames} = useVideoConfig();
|
10 |
|
11 |
const frame = useCurrentFrame();
|
12 |
return (
|
|
|
24 |
}}
|
25 |
>
|
26 |
{imageSequences.map((entry, index) => {
|
27 |
+
// const durationInFrames = (entry.end - entry.start) * fps;
|
28 |
|
29 |
const zoom = interpolate(
|
30 |
frame,
|
31 |
+
[0, durationInFrames * 0.5, durationInFrames],
|
|
|
|
|
|
|
|
|
32 |
[1, 1.2, 1],
|
33 |
{
|
34 |
easing: Easing.bezier(0.8, 0.22, 0.96, 0.65),
|
35 |
+
// extrapolateLeft: 'clamp',
|
36 |
+
// extrapolateRight: 'clamp',
|
37 |
}
|
38 |
);
|
39 |
|