import {
AbsoluteFill,
Series,
interpolate,
spring,
useCurrentFrame,
} from 'remotion';
import React from 'react';
import {staticFile, useVideoConfig, Img, Easing} from 'remotion';
import imageSequences from './Assets/ImageSequences.json';
import {TransitionSeries, linearTiming} from '@remotion/transitions';
import {slide} from '@remotion/transitions/slide';
export default function ImageStream() {
const {fps} = useVideoConfig();
return (
{imageSequences.map((entry, index) => {
return (
<>
;
>
);
})}
);
}
const Images = ({entry}) => {
const {fps} = useVideoConfig();
const frame = useCurrentFrame();
const durationInFrames = (entry.end - entry.start) * fps;
const spr = spring({
fps,
frame,
config: {
damping: 100,
},
delay: 0,
from: 0,
to: 1,
durationInFrames: durationInFrames,
});
const initialSpring = spring({
fps,
frame,
config: {
damping: 100,
},
delay: 0,
from: 0,
to: 1,
durationInFrames: durationInFrames,
});
const zoom = interpolate(spr, [0, 0.5, 1], [1, 1.3, 1.2], {
easing: Easing.bezier(0.23, 1, 0.32, 1),
// extrapolateLeft: 'clamp',
// extrapolateRight: 'clamp',
});
const blur = interpolate(
initialSpring,
[0.0, 0.09, 0.99, 0.995, 1],
[20, 0, 0, 0, 5],
{
easing: Easing.bezier(0.23, 1, 0.32, 1),
extrapolateLeft: 'identity',
extrapolateRight: 'identity',
}
);
return (
<>
0.99
? `translateX(${blur * 5}px)`
: `translateX(-${blur * 5}px)`
}`,
filter: `url(#blur)`,
objectPosition: 'center',
objectFit: 'cover',
position: 'absolute',
top: '50%', // Center vertically
left: '50%', // Center horizontally
transform: 'translate(-50%, -50%)',
// zIndex: 150,
// height: '100vh',
width: 1080,
height: 1920,
// transformOrigin: 'center center', // Move rotation origin to the
// opacity: 0.1
// transform: `translateX(-${blur * 5}px)`,
// transition: 'all 5s ease',
}}
src={staticFile(entry.name)}
/>
>
);
};