transition series
Browse files
Remotion-app/src/HelloWorld/ImageStream.jsx
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
import {Series} from 'remotion';
|
2 |
import React from 'react';
|
3 |
import {staticFile, useVideoConfig, Img} from 'remotion';
|
|
|
4 |
import imageSequences from './Assets/ImageSequences.json';
|
5 |
-
import {TransitionSeries} from '@remotion/transitions';
|
6 |
export default function ImageStream() {
|
7 |
const {fps} = useVideoConfig();
|
8 |
return (
|
@@ -13,13 +14,19 @@ export default function ImageStream() {
|
|
13 |
>
|
14 |
{imageSequences.map((entry, index) => {
|
15 |
return (
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
);
|
24 |
})}
|
25 |
</TransitionSeries>
|
|
|
1 |
import {Series} from 'remotion';
|
2 |
import React from 'react';
|
3 |
import {staticFile, useVideoConfig, Img} from 'remotion';
|
4 |
+
import {slide} from '@remotion/transitions/slide';
|
5 |
import imageSequences from './Assets/ImageSequences.json';
|
6 |
+
import {TransitionSeries, linearTiming} from '@remotion/transitions';
|
7 |
export default function ImageStream() {
|
8 |
const {fps} = useVideoConfig();
|
9 |
return (
|
|
|
14 |
>
|
15 |
{imageSequences.map((entry, index) => {
|
16 |
return (
|
17 |
+
<>
|
18 |
+
<TransitionSeries.Sequence
|
19 |
+
key={index}
|
20 |
+
from={fps * entry.start}
|
21 |
+
durationInFrames={fps * (entry.end - entry.start)}
|
22 |
+
>
|
23 |
+
<Img src={staticFile(entry.name)} />
|
24 |
+
</TransitionSeries.Sequence>
|
25 |
+
<TransitionSeries.Transition
|
26 |
+
presentation={slide()}
|
27 |
+
timing={linearTiming({durationInFrames: 30})}
|
28 |
+
/>
|
29 |
+
</>
|
30 |
);
|
31 |
})}
|
32 |
</TransitionSeries>
|