Skip to content

Commit f787b18

Browse files
nervebandclaude
andcommitted
Optimize demo GIF with flat colors
Reduced from 8.7MB to 380KB by removing gradients and effects. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent e5cca86 commit f787b18

3 files changed

Lines changed: 11 additions & 131 deletions

File tree

assets/demo.gif

-8.33 MB
Loading

remotion-demo/src/BeeperCliDemo.tsx

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -86,27 +86,13 @@ export const BeeperCliDemo: React.FC = () => {
8686
{ extrapolateLeft: "clamp", extrapolateRight: "clamp" }
8787
);
8888

89-
// Animated gradient angle
90-
const gradientAngle = interpolate(frame, [0, durationInFrames], [135, 225]);
91-
9289
return (
9390
<AbsoluteFill
9491
style={{
95-
background: `
96-
radial-gradient(ellipse at 30% 20%, ${COLORS.purple}30 0%, transparent 50%),
97-
radial-gradient(ellipse at 70% 80%, ${COLORS.cyan}25 0%, transparent 40%),
98-
linear-gradient(${gradientAngle}deg,
99-
${COLORS.gradientStart} 0%,
100-
${COLORS.gradientEnd} 100%
101-
)
102-
`,
92+
background: COLORS.gradientStart,
10393
fontFamily: FONT_FAMILY,
10494
}}
10595
>
106-
{/* Floating orbs for visual effect */}
107-
<FloatingOrb x={15} y={20} size={300} color={COLORS.purple} opacity={0.15} speed={0.015} frame={frame} />
108-
<FloatingOrb x={80} y={70} size={250} color={COLORS.cyan} opacity={0.12} speed={0.02} frame={frame} />
109-
<FloatingOrb x={50} y={85} size={200} color={COLORS.yellow} opacity={0.08} speed={0.025} frame={frame} />
11096

11197
{/* Title */}
11298
<div
@@ -126,7 +112,6 @@ export const BeeperCliDemo: React.FC = () => {
126112
color: COLORS.white,
127113
margin: 0,
128114
letterSpacing: "-0.02em",
129-
textShadow: "0 2px 20px rgba(0, 0, 0, 0.3)",
130115
}}
131116
>
132117
Beeper API CLI
@@ -208,7 +193,6 @@ export const BeeperCliDemo: React.FC = () => {
208193
letterSpacing: "0.08em",
209194
textTransform: "uppercase",
210195
opacity: sequenceOpacity,
211-
textShadow: "0 2px 10px rgba(0, 0, 0, 0.3)",
212196
}}
213197
>
214198
{currentSequence.description}
@@ -237,7 +221,7 @@ export const BeeperCliDemo: React.FC = () => {
237221
opacity: isActive ? 1 : 0.4,
238222
transform: `scale(${dotScale})`,
239223
transition: "width 0.3s ease",
240-
boxShadow: isActive ? `0 0 20px ${COLORS.cyan}` : "none",
224+
boxShadow: "none",
241225
}}
242226
/>
243227
);
@@ -248,48 +232,6 @@ export const BeeperCliDemo: React.FC = () => {
248232
);
249233
};
250234

251-
// Floating orb component
252-
interface FloatingOrbProps {
253-
x: number;
254-
y: number;
255-
size: number;
256-
color: string;
257-
opacity: number;
258-
speed: number;
259-
frame: number;
260-
}
261-
262-
const FloatingOrb: React.FC<FloatingOrbProps> = ({
263-
x,
264-
y,
265-
size,
266-
color,
267-
opacity,
268-
speed,
269-
frame,
270-
}) => {
271-
const offsetX = Math.sin(frame * speed) * 20;
272-
const offsetY = Math.cos(frame * speed * 0.7) * 15;
273-
274-
return (
275-
<div
276-
style={{
277-
position: "absolute",
278-
left: `${x}%`,
279-
top: `${y}%`,
280-
width: size,
281-
height: size,
282-
borderRadius: "50%",
283-
background: `radial-gradient(circle at 30% 30%, ${color}, transparent)`,
284-
opacity,
285-
transform: `translate(${offsetX}px, ${offsetY}px)`,
286-
filter: "blur(60px)",
287-
pointerEvents: "none",
288-
}}
289-
/>
290-
);
291-
};
292-
293235
// Blinking cursor
294236
interface CursorProps {
295237
visible: boolean;

remotion-demo/src/components/TerminalWindow.tsx

Lines changed: 9 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,28 @@
11
import React from "react";
2-
import { useCurrentFrame, interpolate } from "remotion";
32
import { FONT_FAMILY } from "../fonts";
43

54
interface TerminalWindowProps {
65
children: React.ReactNode;
76
}
87

98
export const TerminalWindow: React.FC<TerminalWindowProps> = ({ children }) => {
10-
const frame = useCurrentFrame();
11-
12-
// Subtle floating animation
13-
const floatY = interpolate(Math.sin(frame / 40), [-1, 1], [-4, 4]);
14-
const floatRotate = interpolate(Math.sin(frame / 50), [-1, 1], [-0.3, 0.3]);
15-
169
return (
1710
<div
1811
style={{
19-
transform: `translateY(${floatY}px) rotate(${floatRotate}deg)`,
20-
borderRadius: 20,
12+
borderRadius: 16,
2113
overflow: "hidden",
22-
boxShadow: `
23-
0 0 0 1px rgba(255, 255, 255, 0.18),
24-
0 0 0 2px rgba(255, 255, 255, 0.05),
25-
0 4px 12px rgba(0, 0, 0, 0.15),
26-
0 16px 48px rgba(0, 0, 0, 0.2),
27-
0 32px 80px rgba(0, 0, 0, 0.15),
28-
inset 0 1px 1px rgba(255, 255, 255, 0.15),
29-
inset 0 -1px 1px rgba(0, 0, 0, 0.1)
30-
`,
31-
background: `
32-
linear-gradient(165deg,
33-
rgba(20, 25, 45, 0.95) 0%,
34-
rgba(15, 20, 40, 0.98) 30%,
35-
rgba(10, 15, 35, 0.98) 70%,
36-
rgba(8, 12, 30, 0.95) 100%
37-
)
38-
`,
39-
backdropFilter: "blur(50px) saturate(180%)",
40-
WebkitBackdropFilter: "blur(50px) saturate(180%)",
14+
boxShadow: "0 8px 32px rgba(0, 0, 0, 0.3)",
15+
background: "#1a1a2e",
4116
position: "relative",
4217
}}
4318
>
44-
{/* Glass reflection */}
45-
<div
46-
style={{
47-
position: "absolute",
48-
top: 0,
49-
left: 0,
50-
right: 0,
51-
height: "50%",
52-
background: "linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 100%)",
53-
borderRadius: "20px 20px 0 0",
54-
pointerEvents: "none",
55-
}}
56-
/>
5719

5820
{/* Title bar */}
5921
<div
6022
style={{
61-
height: 52,
62-
background: `
63-
linear-gradient(180deg,
64-
rgba(40, 50, 80, 0.95) 0%,
65-
rgba(30, 40, 70, 0.95) 50%,
66-
rgba(25, 35, 65, 0.95) 100%
67-
)
68-
`,
69-
borderBottom: "1px solid rgba(255, 255, 255, 0.08)",
23+
height: 48,
24+
background: "#16162a",
25+
borderBottom: "1px solid #2a2a4a",
7026
display: "flex",
7127
alignItems: "center",
7228
padding: "0 20px",
@@ -128,30 +84,12 @@ interface TrafficLightProps {
12884
const TrafficLight: React.FC<TrafficLightProps> = ({ color }) => (
12985
<div
13086
style={{
131-
width: 13,
132-
height: 13,
87+
width: 12,
88+
height: 12,
13389
borderRadius: "50%",
13490
backgroundColor: color,
135-
boxShadow: `
136-
inset 0 1px 0 rgba(255, 255, 255, 0.4),
137-
inset 0 -1px 2px rgba(0, 0, 0, 0.25),
138-
0 1px 2px rgba(0, 0, 0, 0.2)
139-
`,
140-
position: "relative",
14191
}}
142-
>
143-
<div
144-
style={{
145-
position: "absolute",
146-
top: 2,
147-
left: 3,
148-
width: 5,
149-
height: 3,
150-
borderRadius: "50%",
151-
background: "linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 100%)",
152-
}}
153-
/>
154-
</div>
92+
/>
15593
);
15694

15795
interface WindowButtonProps {

0 commit comments

Comments
 (0)