Loading...
Loading...
Compare original and translation side by side
/remotion-animation/remotion-composition/remotion-scaffold/remotion-asset-coordinator/remotion-animation/remotion-composition/remotion-scaffold/remotion-asset-coordinatorundefinedundefined
**From Natural Language:**undefined
**来自自然语言描述:**undefinedundefinedundefinedscenes/Scene1Intro.tsximport {
AbsoluteFill,
spring,
interpolate,
useCurrentFrame,
useVideoConfig,
Img,
staticFile,
} from "remotion";
import { COLORS, SPRING_CONFIGS } from "../constants";
export function Scene1Intro() {
const frame = useCurrentFrame();
const { fps, width, height } = useVideoConfig();
// Logo entrance animation (frames 0-30)
const logoProgress = spring({
frame,
fps,
config: SPRING_CONFIGS.smooth,
});
const logoScale = interpolate(logoProgress, [0, 1], [0.8, 1]);
const logoOpacity = logoProgress;
// Subtitle reveal animation (frames 20-50)
const subtitleProgress = interpolate(
frame,
[20, 50],
[0, 1],
{
extrapolateLeft: 'clamp',
extrapolateRight: 'clamp',
}
);
const subtitleTranslateY = interpolate(subtitleProgress, [0, 1], [20, 0]);
const subtitleOpacity = subtitleProgress;
return (
<AbsoluteFill
style={{
backgroundColor: COLORS.background,
justifyContent: "center",
alignItems: "center",
}}
>
{/* Logo */}
<div
style={{
transform: `scale(${logoScale})`,
opacity: logoOpacity,
}}
>
<Img
src={staticFile("images/logo.svg")}
style={{
width: 400,
height: 400,
}}
/>
</div>
{/* Subtitle */}
<div
style={{
position: "absolute",
top: height / 2 + 250,
transform: `translateY(${subtitleTranslateY}px)`,
opacity: subtitleOpacity,
}}
>
<h2
style={{
color: COLORS.text,
fontSize: 48,
fontWeight: 600,
margin: 0,
}}
>
Innovation in Motion
</h2>
</div>
</AbsoluteFill>
);
}scenes/Scene1Intro.tsximport {
AbsoluteFill,
spring,
interpolate,
useCurrentFrame,
useVideoConfig,
Img,
staticFile,
} from "remotion";
import { COLORS, SPRING_CONFIGS } from "../constants";
export function Scene1Intro() {
const frame = useCurrentFrame();
const { fps, width, height } = useVideoConfig();
// Logo entrance animation (frames 0-30)
const logoProgress = spring({
frame,
fps,
config: SPRING_CONFIGS.smooth,
});
const logoScale = interpolate(logoProgress, [0, 1], [0.8, 1]);
const logoOpacity = logoProgress;
// Subtitle reveal animation (frames 20-50)
const subtitleProgress = interpolate(
frame,
[20, 50],
[0, 1],
{
extrapolateLeft: 'clamp',
extrapolateRight: 'clamp',
}
);
const subtitleTranslateY = interpolate(subtitleProgress, [0, 1], [20, 0]);
const subtitleOpacity = subtitleProgress;
return (
<AbsoluteFill
style={{
backgroundColor: COLORS.background,
justifyContent: "center",
alignItems: "center",
}}
>
{/* Logo */}
<div
style={{
transform: `scale(${logoScale})`,
opacity: logoOpacity,
}}
>
<Img
src={staticFile("images/logo.svg")}
style={{
width: 400,
height: 400,
}}
/>
</div>
{/* Subtitle */}
<div
style={{
position: "absolute",
top: height / 2 + 250,
transform: `translateY(${subtitleTranslateY}px)`,
opacity: subtitleOpacity,
}}
>
<h2
style={{
color: COLORS.text,
fontSize: 48,
fontWeight: 600,
margin: 0,
}}
>
Innovation in Motion
</h2>
</div>
</AbsoluteFill>
);
}export interface Scene1IntroProps {
// Add props here if scene needs customization
}
// Update component:
export function Scene1Intro({}: Scene1IntroProps) {
// ...
}export interface Scene1IntroProps {
// Add props here if scene needs customization
}
// Update component:
export function Scene1Intro({}: Scene1IntroProps) {
// ...
}import { Scene1Intro } from "./scenes/Scene1Intro";
// In main composition:
<Sequence
from={SCENE_TIMING.intro.start}
durationInFrames={SCENE_TIMING.intro.duration}
>
<Scene1Intro />
</Sequence>import { Scene1Intro } from "./scenes/Scene1Intro";
// In main composition:
<Sequence
from={SCENE_TIMING.intro.start}
durationInFrames={SCENE_TIMING.intro.duration}
>
<Scene1Intro />
</Sequence>public/images/logo.svgpublic/images/logo.svg/remotion-component-gen/remotion-component-genundefinedundefinedexport function Scene() {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const progress = spring({
frame,
fps,
config: SPRING_CONFIGS.smooth,
});
const scale = interpolate(progress, [0, 1], [0.8, 1]);
return (
<AbsoluteFill
style={{
transform: `scale(${scale})`,
opacity: progress,
}}
>
{/* Content */}
</AbsoluteFill>
);
}export function Scene() {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const progress = spring({
frame,
fps,
config: SPRING_CONFIGS.smooth,
});
const scale = interpolate(progress, [0, 1], [0.8, 1]);
return (
<AbsoluteFill
style={{
transform: `scale(${scale})`,
opacity: progress,
}}
>
{/* Content */}
</AbsoluteFill>
);
}export function Scene() {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const items = ['Feature 1', 'Feature 2', 'Feature 3'];
const STAGGER_DELAY = 10;
return (
<AbsoluteFill>
{items.map((item, index) => {
const itemProgress = spring({
frame: frame - (index * STAGGER_DELAY),
fps,
config: SPRING_CONFIGS.snappy,
});
const translateX = interpolate(itemProgress, [0, 1], [-50, 0]);
return (
<div
key={index}
style={{
transform: `translateX(${translateX}px)`,
opacity: itemProgress,
marginBottom: 20,
}}
>
<h3>{item}</h3>
</div>
);
})}
</AbsoluteFill>
);
}export function Scene() {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const items = ['Feature 1', 'Feature 2', 'Feature 3'];
const STAGGER_DELAY = 10;
return (
<AbsoluteFill>
{items.map((item, index) => {
const itemProgress = spring({
frame: frame - (index * STAGGER_DELAY),
fps,
config: SPRING_CONFIGS.snappy,
});
const translateX = interpolate(itemProgress, [0, 1], [-50, 0]);
return (
<div
key={index}
style={{
transform: `translateX(${translateX}px)`,
opacity: itemProgress,
marginBottom: 20,
}}
>
<h3>{item}</h3>
</div>
);
})}
</AbsoluteFill>
);
}export function Scene() {
const frame = useCurrentFrame();
const text = "Hello World";
const CHARS_PER_FRAME = 2;
const charsToShow = Math.min(
text.length,
Math.floor(frame / CHARS_PER_FRAME)
);
return (
<AbsoluteFill>
<h1 style={{ fontSize: 72 }}>
{text.slice(0, charsToShow)}
{charsToShow < text.length && (
<span style={{ opacity: Math.sin(frame * 0.3) * 0.5 + 0.5 }}>
|
</span>
)}
</h1>
</AbsoluteFill>
);
}export function Scene() {
const frame = useCurrentFrame();
const text = "Hello World";
const CHARS_PER_FRAME = 2;
const charsToShow = Math.min(
text.length,
Math.floor(frame / CHARS_PER_FRAME)
);
return (
<AbsoluteFill>
<h1 style={{ fontSize: 72 }}>
{text.slice(0, charsToShow)}
{charsToShow < text.length && (
<span style={{ opacity: Math.sin(frame * 0.3) * 0.5 + 0.5 }}>
|
</span>
)}
</h1>
</AbsoluteFill>
);
}remotion-component-gen (this skill)
↓ outputs: SCENE_COMPONENT.md (per scene)
↓ uses: ANIMATION_CONFIG.md (from remotion-animation)
↓ uses: COMPOSITION_STRUCTURE.md (for timing context)/motion-designer/remotion-animation/remotion-composition/remotion-scaffold/remotion-asset-coordinator/remotion-spec-translatorremotion-component-gen (本技能)
↓ 输出:SCENE_COMPONENT.md(每个场景对应一份)
↓ 使用:ANIMATION_CONFIG.md(来自remotion-animation)
↓ 使用:COMPOSITION_STRUCTURE.md(用于时间上下文)/motion-designer/remotion-animation/remotion-composition/remotion-scaffold/remotion-asset-coordinator/remotion-spec-translator