Skip to content

Commit ca07eb5

Browse files
author
Miriad
committed
Merge remote-tracking branch 'origin/main' into dev
2 parents 0e7515d + 18e15dc commit ca07eb5

2 files changed

Lines changed: 87 additions & 99 deletions

File tree

remotion/components/CTAScene.tsx

Lines changed: 13 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,9 @@ export const CTAScene: React.FC<CTASceneProps> = ({
2626
{ extrapolateLeft: "clamp", extrapolateRight: "clamp" }
2727
);
2828

29-
// --- CTA text spring ---
30-
const ctaSpring = spring({
31-
frame: frame - 10,
32-
fps,
33-
config: { damping: 12, mass: 0.5, stiffness: 90 },
34-
});
35-
36-
const ctaScale = interpolate(ctaSpring, [0, 1], [0.8, 1]);
37-
const ctaOpacity = interpolate(ctaSpring, [0, 1], [0, 1]);
38-
3929
// --- Subscribe button animation ---
4030
const buttonSpring = spring({
41-
frame: frame - 30,
31+
frame: frame - 20,
4232
fps,
4333
config: { damping: 10, mass: 0.4, stiffness: 100 },
4434
});
@@ -59,12 +49,19 @@ export const CTAScene: React.FC<CTASceneProps> = ({
5949
{ extrapolateRight: "clamp" }
6050
);
6151

52+
// --- Brand name animation ---
53+
const brandSpring = spring({
54+
frame,
55+
fps,
56+
config: { damping: 12, mass: 0.5, stiffness: 90 },
57+
});
58+
6259
return (
6360
<AbsoluteFill style={{ opacity: fadeIn }}>
64-
{/* Background gradient */}
61+
{/* Pure black background */}
6562
<AbsoluteFill
6663
style={{
67-
background: `linear-gradient(135deg, ${COLORS.backgroundDark}, ${COLORS.primary}, ${COLORS.gradientEnd})`,
64+
backgroundColor: "#000000",
6865
}}
6966
/>
7067

@@ -87,34 +84,13 @@ export const CTAScene: React.FC<CTASceneProps> = ({
8784
fontWeight: 700,
8885
letterSpacing: 3,
8986
textTransform: "uppercase",
87+
opacity: brandSpring,
88+
transform: `scale(${brandSpring})`,
9089
}}
9190
>
9291
{BRAND.name}
9392
</div>
9493

95-
{/* CTA Text */}
96-
<div
97-
style={{
98-
opacity: ctaOpacity,
99-
transform: `scale(${ctaScale})`,
100-
maxWidth: isVertical ? "95%" : "75%",
101-
}}
102-
>
103-
<div
104-
style={{
105-
fontSize: fonts.cta,
106-
color: COLORS.textWhite,
107-
fontFamily: "sans-serif",
108-
fontWeight: 700,
109-
textAlign: "center",
110-
lineHeight: 1.4,
111-
textShadow: "0 2px 20px rgba(0, 0, 0, 0.4)",
112-
}}
113-
>
114-
{cta}
115-
</div>
116-
</div>
117-
11894
{/* Subscribe Button */}
11995
<div
12096
style={{
@@ -152,7 +128,7 @@ export const CTAScene: React.FC<CTASceneProps> = ({
152128
>
153129
{socialLinks.map((link, i) => {
154130
const linkSpring = spring({
155-
frame: frame - 45 - i * 8,
131+
frame: frame - 35 - i * 8,
156132
fps,
157133
config: { damping: 12, mass: 0.4, stiffness: 100 },
158134
});

remotion/components/HookScene.tsx

Lines changed: 74 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,7 @@ export const HookScene: React.FC<HookSceneProps> = ({
3030
{ extrapolateLeft: "clamp", extrapolateRight: "clamp" },
3131
);
3232

33-
// --- Background pulse animation (only used when no infographic) ---
34-
const bgPulse = interpolate(
35-
frame,
36-
[0, durationInFrames],
37-
[0, 360],
38-
{ extrapolateRight: "clamp" }
39-
);
40-
41-
// --- Logo / brand fade in ---
33+
// --- Logo / brand fade in (only used when no infographic) ---
4234
const brandOpacity = interpolate(
4335
frame,
4436
[0, 15],
@@ -56,7 +48,7 @@ export const HookScene: React.FC<HookSceneProps> = ({
5648
},
5749
});
5850

59-
// --- Hook text animation: spring pop-in after brand ---
51+
// --- Hook text animation: spring pop-in after brand (only used when no infographic) ---
6052
const hookSpring = spring({
6153
frame: frame - 20, // delay 20 frames after start
6254
fps,
@@ -87,7 +79,7 @@ export const HookScene: React.FC<HookSceneProps> = ({
8779

8880
return (
8981
<AbsoluteFill style={{ opacity: fadeOut }}>
90-
{/* Background: infographic or animated gradient */}
82+
{/* Background: infographic or pure black */}
9183
{hasInfographic ? (
9284
<AbsoluteFill style={{ overflow: "hidden" }}>
9385
<Img
@@ -100,7 +92,7 @@ export const HookScene: React.FC<HookSceneProps> = ({
10092
transformOrigin: "center center",
10193
}}
10294
/>
103-
{/* Dark overlay for text readability */}
95+
{/* Dark overlay for readability */}
10496
<AbsoluteFill
10597
style={{
10698
backgroundColor: "rgba(0, 0, 0, 0.5)",
@@ -109,10 +101,10 @@ export const HookScene: React.FC<HookSceneProps> = ({
109101
</AbsoluteFill>
110102
) : (
111103
<>
112-
{/* Animated gradient background */}
104+
{/* Pure black background fallback */}
113105
<AbsoluteFill
114106
style={{
115-
background: `linear-gradient(${bgPulse}deg, ${COLORS.gradientStart}, ${COLORS.backgroundDark}, ${COLORS.primary})`,
107+
backgroundColor: "#000000",
116108
}}
117109
/>
118110

@@ -144,72 +136,92 @@ export const HookScene: React.FC<HookSceneProps> = ({
144136
</>
145137
)}
146138

147-
{/* Content container */}
148-
<AbsoluteFill
149-
style={{
150-
justifyContent: "center",
151-
alignItems: "center",
152-
padding: isVertical ? 40 : 80,
153-
gap: isVertical ? 40 : 50,
154-
flexDirection: "column",
155-
}}
156-
>
157-
{/* Brand name */}
158-
<div
139+
{/* Content container — only shown when NO infographic (narration carries the hook) */}
140+
{!hasInfographic && (
141+
<AbsoluteFill
159142
style={{
160-
opacity: brandOpacity,
161-
transform: `scale(${brandScale})`,
162-
display: "flex",
163-
flexDirection: "column",
143+
justifyContent: "center",
164144
alignItems: "center",
165-
gap: 8,
145+
padding: isVertical ? 40 : 80,
146+
gap: isVertical ? 40 : 50,
147+
flexDirection: "column",
166148
}}
167149
>
150+
{/* Brand name */}
168151
<div
169152
style={{
170-
fontSize: isVertical ? 28 : 32,
171-
color: COLORS.secondary,
172-
fontFamily: "monospace",
173-
fontWeight: 700,
174-
letterSpacing: 4,
175-
textTransform: "uppercase",
153+
opacity: brandOpacity,
154+
transform: `scale(${brandScale})`,
155+
display: "flex",
156+
flexDirection: "column",
157+
alignItems: "center",
158+
gap: 8,
176159
}}
177160
>
178-
{BRAND.name}
161+
<div
162+
style={{
163+
fontSize: isVertical ? 28 : 32,
164+
color: COLORS.secondary,
165+
fontFamily: "monospace",
166+
fontWeight: 700,
167+
letterSpacing: 4,
168+
textTransform: "uppercase",
169+
}}
170+
>
171+
{BRAND.name}
172+
</div>
173+
<div
174+
style={{
175+
width: 60,
176+
height: 3,
177+
backgroundColor: COLORS.accent,
178+
borderRadius: 2,
179+
}}
180+
/>
179181
</div>
182+
183+
{/* Hook text */}
180184
<div
181185
style={{
182-
width: 60,
183-
height: 3,
184-
backgroundColor: COLORS.accent,
185-
borderRadius: 2,
186+
opacity: hookOpacity,
187+
transform: `scale(${hookScale})`,
188+
maxWidth: isVertical ? "95%" : "80%",
186189
}}
187-
/>
188-
</div>
190+
>
191+
<div
192+
style={{
193+
fontSize: fonts.hook,
194+
color: COLORS.textWhite,
195+
fontFamily: "sans-serif",
196+
fontWeight: 800,
197+
textAlign: "center",
198+
lineHeight: 1.3,
199+
textShadow: "0 4px 30px rgba(0, 0, 0, 0.5)",
200+
}}
201+
>
202+
{hook}
203+
</div>
204+
</div>
205+
</AbsoluteFill>
206+
)}
189207

190-
{/* Hook text */}
208+
{/* Watermark — always visible */}
209+
{hasInfographic && (
191210
<div
192211
style={{
193-
opacity: hookOpacity,
194-
transform: `scale(${hookScale})`,
195-
maxWidth: isVertical ? "95%" : "80%",
212+
position: "absolute",
213+
bottom: isVertical ? 30 : 20,
214+
right: isVertical ? 30 : 30,
215+
fontSize: fonts.watermark,
216+
color: "rgba(255, 255, 255, 0.35)",
217+
fontFamily: "monospace",
218+
fontWeight: 600,
219+
letterSpacing: 1,
196220
}}
197221
>
198-
<div
199-
style={{
200-
fontSize: fonts.hook,
201-
color: COLORS.textWhite,
202-
fontFamily: "sans-serif",
203-
fontWeight: 800,
204-
textAlign: "center",
205-
lineHeight: 1.3,
206-
textShadow: "0 4px 30px rgba(0, 0, 0, 0.5)",
207-
}}
208-
>
209-
{hook}
210-
</div>
222+
codingcat.dev
211223
</div>
212-
</AbsoluteFill>
224+
)}
213225
</AbsoluteFill>
214226
);
215227
};

0 commit comments

Comments
 (0)