1- import React from "react" ;
2- import {
3- AbsoluteFill ,
4- interpolate ,
5- spring ,
6- useCurrentFrame ,
7- useVideoConfig ,
8- } from "remotion" ;
9- import { loadFont } from "@remotion/google-fonts/Inter" ;
10- import { loadFont as loadMono } from "@remotion/google-fonts/JetBrainsMono" ;
11-
12- const { fontFamily } = loadFont ( "normal" , {
13- weights : [ "400" , "700" , "800" ] ,
14- subsets : [ "latin" ] ,
1+ import React from 'react' ;
2+ import { AbsoluteFill , interpolate , spring , useCurrentFrame , useVideoConfig } from 'remotion' ;
3+ import { loadFont } from '@remotion/google-fonts/Inter' ;
4+ import { loadFont as loadMono } from '@remotion/google-fonts/JetBrainsMono' ;
5+
6+ const { fontFamily } = loadFont ( 'normal' , {
7+ weights : [ '400' , '700' , '800' ] ,
8+ subsets : [ 'latin' ] ,
159} ) ;
1610
17- const { fontFamily : monoFont } = loadMono ( " normal" , {
18- weights : [ " 400" , " 700" ] ,
19- subsets : [ " latin" ] ,
11+ const { fontFamily : monoFont } = loadMono ( ' normal' , {
12+ weights : [ ' 400' , ' 700' ] ,
13+ subsets : [ ' latin' ] ,
2014} ) ;
2115
22- const GRADIENT_BG =
23- "radial-gradient(ellipse at 30% 20%, #1a1a3e 0%, #0f0c29 40%, #0a0a1a 100%)" ;
16+ const GRADIENT_BG = 'radial-gradient(ellipse at 30% 20%, #1a1a3e 0%, #0f0c29 40%, #0a0a1a 100%)' ;
2417
2518const ASCII_LINES = [
26- " ████████╗███████╗██████╗ ███╗ ███╗██████╗ ███████╗ █████╗ ███╗ ███╗" ,
27- " ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██╔══██╗██╔════╝██╔══██╗████╗ ████║" ,
28- " ██║ █████╗ ██████╔╝██╔████╔██║██████╔╝█████╗ ███████║██╔████╔██║" ,
29- " ██║ ██╔══╝ ██╔══██╗██║╚██╔╝██║██╔══██╗██╔══╝ ██╔══██║██║╚██╔╝██║" ,
30- " ██║ ███████╗██║ ██║██║ ╚═╝ ██║██████╔╝███████╗██║ ██║██║ ╚═╝ ██║" ,
31- " ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝" ,
19+ ' ████████╗███████╗██████╗ ███╗ ███╗██████╗ ███████╗ █████╗ ███╗ ███╗' ,
20+ ' ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██╔══██╗██╔════╝██╔══██╗████╗ ████║' ,
21+ ' ██║ █████╗ ██████╔╝██╔████╔██║██████╔╝█████╗ ███████║██╔████╔██║' ,
22+ ' ██║ ██╔══╝ ██╔══██╗██║╚██╔╝██║██╔══██╗██╔══╝ ██╔══██║██║╚██╔╝██║' ,
23+ ' ██║ ███████╗██║ ██║██║ ╚═╝ ██║██████╔╝███████╗██║ ██║██║ ╚═╝ ██║' ,
24+ ' ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝' ,
3225] ;
3326
3427export const Intro : React . FC = ( ) => {
@@ -64,11 +57,7 @@ export const Intro: React.FC = () => {
6457 } ) ;
6558
6659 // ── Glow pulse ─────────────────────────────────────────
67- const glowIntensity = interpolate (
68- frame % 60 ,
69- [ 0 , 30 , 60 ] ,
70- [ 0.3 , 0.7 , 0.3 ] ,
71- ) ;
60+ const glowIntensity = interpolate ( frame % 60 , [ 0 , 30 , 60 ] , [ 0.3 , 0.7 , 0.3 ] ) ;
7261
7362 // ── Tagline: snappy entrance ───────────────────────────
7463 const tagSpring = spring ( {
@@ -88,10 +77,14 @@ export const Intro: React.FC = () => {
8877 config : { damping : 8 , stiffness : 120 } ,
8978 } ) ;
9079 const emojiScale = interpolate ( emojiSpring , [ 0 , 1 ] , [ 0 , 1.2 ] ) ;
91- const emojiSettleScale = frame > 45 ? interpolate (
92- spring ( { frame, fps, delay : 35 , config : { damping : 20 , stiffness : 200 } } ) ,
93- [ 0 , 1 ] , [ 1.2 , 1 ] ,
94- ) : emojiScale ;
80+ const emojiSettleScale =
81+ frame > 45
82+ ? interpolate (
83+ spring ( { frame, fps, delay : 35 , config : { damping : 20 , stiffness : 200 } } ) ,
84+ [ 0 , 1 ] ,
85+ [ 1.2 , 1 ] ,
86+ )
87+ : emojiScale ;
9588
9689 // ── Subtitle ───────────────────────────────────────────
9790 const subSpring = spring ( {
@@ -119,25 +112,25 @@ export const Intro: React.FC = () => {
119112 < AbsoluteFill
120113 style = { {
121114 background : GRADIENT_BG ,
122- justifyContent : " center" ,
123- alignItems : " center" ,
115+ justifyContent : ' center' ,
116+ alignItems : ' center' ,
124117 fontFamily,
125118 perspective : 3600 ,
126- overflow : " hidden" ,
119+ overflow : ' hidden' ,
127120 } }
128121 >
129122 { /* Ambient particles */ }
130123 { particles . map ( ( p , i ) => (
131124 < div
132125 key = { i }
133126 style = { {
134- position : " absolute" ,
127+ position : ' absolute' ,
135128 left : `calc(50% + ${ p . x } px)` ,
136129 top : `calc(50% + ${ p . y } px)` ,
137130 width : p . size ,
138131 height : p . size ,
139- borderRadius : " 50%" ,
140- background : " #a78bfa" ,
132+ borderRadius : ' 50%' ,
133+ background : ' #a78bfa' ,
141134 opacity : p . opacity ,
142135 } }
143136 />
@@ -148,18 +141,18 @@ export const Intro: React.FC = () => {
148141 style = { {
149142 transform : `rotateX(${ floatRotateX } deg) rotateY(${ floatRotateY } deg) scale(${ zoomScale } )` ,
150143 opacity : zoomOpacity ,
151- transformStyle : " preserve-3d" ,
152- display : " flex" ,
153- flexDirection : " column" ,
154- alignItems : " center" ,
144+ transformStyle : ' preserve-3d' ,
145+ display : ' flex' ,
146+ flexDirection : ' column' ,
147+ alignItems : ' center' ,
155148 } }
156149 >
157150 { /* ASCII Logo with glow */ }
158151 < div
159152 style = { {
160- display : " flex" ,
161- flexDirection : " column" ,
162- alignItems : " center" ,
153+ display : ' flex' ,
154+ flexDirection : ' column' ,
155+ alignItems : ' center' ,
163156 filter : `drop-shadow(0 0 ${ glowIntensity * 40 } px rgba(167, 139, 250, ${ glowIntensity * 0.6 } ))` ,
164157 } }
165158 >
@@ -169,8 +162,8 @@ export const Intro: React.FC = () => {
169162 style = { {
170163 fontFamily : monoFont ,
171164 fontSize : 18 ,
172- color : " #a78bfa" ,
173- whiteSpace : " pre" ,
165+ color : ' #a78bfa' ,
166+ whiteSpace : ' pre' ,
174167 lineHeight : 1.15 ,
175168 opacity : lineAnimations [ i ] . opacity ,
176169 transform : `translateY(${ lineAnimations [ i ] . y } px) scale(${ lineAnimations [ i ] . scale } )` ,
@@ -201,10 +194,10 @@ export const Intro: React.FC = () => {
201194 transform : `translateY(${ tagY } px)` ,
202195 fontSize : 48 ,
203196 fontWeight : 700 ,
204- color : " #ffffff" ,
205- textAlign : " center" ,
197+ color : ' #ffffff' ,
198+ textAlign : ' center' ,
206199 letterSpacing : - 0.5 ,
207- textShadow : " 0 2px 30px rgba(167, 139, 250, 0.3)" ,
200+ textShadow : ' 0 2px 30px rgba(167, 139, 250, 0.3)' ,
208201 } }
209202 >
210203 Beam your terminal to any device
@@ -217,8 +210,8 @@ export const Intro: React.FC = () => {
217210 opacity : subOpacity ,
218211 transform : `translateY(${ subY } px)` ,
219212 fontSize : 24 ,
220- color : " rgba(255, 255, 255, 0.45)" ,
221- textAlign : " center" ,
213+ color : ' rgba(255, 255, 255, 0.45)' ,
214+ textAlign : ' center' ,
222215 } }
223216 >
224217 Zero install. Zero friction. Just scan and go.
0 commit comments