-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(showcase): implement video template for devfest nantes (#586)
Co-authored-by: CruuzAzul <[email protected]>
- Loading branch information
Showing
17 changed files
with
348 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
public/images/showcases/devfestNantes/logo-devfest-mgm_transparent.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
remotion/compositions/showcases/campingDesSpeakers/components/TalkTitle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {Easing, Img, interpolate, staticFile, useCurrentFrame} from 'remotion'; | ||
|
||
export const Android = () => { | ||
const frame = useCurrentFrame(); | ||
const logoWidth = 200; | ||
|
||
const fall = interpolate(frame, [0, 200], [-100, 250], { | ||
extrapolateRight: 'clamp', | ||
}); | ||
const rotate = interpolate(frame, [0, 50, 150, 200], [-45, 45, -45, 45], { | ||
extrapolateRight: 'clamp', | ||
easing: Easing.inOut(Easing.sin), | ||
}); | ||
|
||
return ( | ||
<Img | ||
src={staticFile('/images/showcases/devfestNantes/android.png')} | ||
width={logoWidth} | ||
height="auto" | ||
style={{ | ||
position: 'absolute', | ||
right: 100, | ||
top: fall, | ||
transform: `rotate(${rotate}deg)`, | ||
}} | ||
/> | ||
); | ||
}; |
22 changes: 22 additions & 0 deletions
22
remotion/compositions/showcases/devfestNantes/DevfestNantes.composition.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import {Composition, Folder} from 'remotion'; | ||
|
||
import {defaultTalkValues} from '../../../../src/data/defaultValues'; | ||
|
||
import {DevfestNantes} from './DevfestNantes'; | ||
|
||
export const DevfestNantesComposition = () => { | ||
return ( | ||
<Folder name="DevfestNantesComposition"> | ||
<Composition | ||
id="DevfestNantesComposition" | ||
component={DevfestNantes} | ||
durationInFrames={300} | ||
fps={30} | ||
width={1280} | ||
height={720} | ||
defaultProps={defaultTalkValues} | ||
/> | ||
</Folder> | ||
); | ||
}; |
52 changes: 52 additions & 0 deletions
52
remotion/compositions/showcases/devfestNantes/DevfestNantes.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from 'react'; | ||
import {loadFont} from '@remotion/google-fonts/CrimsonText'; | ||
import {AbsoluteFill, Sequence, staticFile} from 'remotion'; | ||
|
||
import {BackgroundFiller} from '../../../design/atoms/BackgroundFiller'; | ||
import {DefaultProps} from '../../../types/defaultProps.types'; | ||
import {TalkTitle} from '../campingDesSpeakers/components/TalkTitle'; | ||
|
||
import {Android} from './Android'; | ||
import {Dino} from './Dino'; | ||
import {Logo} from './Logo'; | ||
import {Speakers} from './Speakers'; | ||
|
||
const {fontFamily} = loadFont(); | ||
export const DevfestNantes = ({title, speakers}: DefaultProps) => { | ||
return ( | ||
<AbsoluteFill | ||
style={{ | ||
backgroundColor: 'white', | ||
overflow: 'hidden', | ||
fontFamily, | ||
textTransform: 'uppercase', | ||
}} | ||
> | ||
<Sequence> | ||
<BackgroundFiller | ||
imageUrl={staticFile( | ||
'/images/showcases/devfestNantes/fond-visuel-etoiles.png', | ||
)} | ||
style={{ | ||
position: 'absolute', | ||
width: '100%', | ||
height: '100%', | ||
}} | ||
/> | ||
</Sequence> | ||
<Sequence from={30}> | ||
<Dino /> | ||
</Sequence> | ||
<Sequence from={110}> | ||
<Android /> | ||
</Sequence> | ||
<Sequence> | ||
<Logo /> | ||
</Sequence> | ||
<Sequence name="Speakers" from={30}> | ||
<Speakers speakers={speakers} /> | ||
<TalkTitle title={title} style={{}} /> | ||
</Sequence> | ||
</AbsoluteFill> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {Easing, Img, interpolate, staticFile, useCurrentFrame} from 'remotion'; | ||
|
||
export const Dino = () => { | ||
const frame = useCurrentFrame(); | ||
const logoWidth = 400; | ||
|
||
const pictureDrop = interpolate(frame, [0, 20], [-logoWidth, 0], { | ||
extrapolateRight: 'clamp', | ||
easing: Easing.out(Easing.ease), | ||
}); | ||
|
||
return ( | ||
<Img | ||
src={staticFile('/images/showcases/devfestNantes/dino.png')} | ||
width={logoWidth} | ||
height="auto" | ||
style={{ | ||
position: 'absolute', | ||
left: pictureDrop, | ||
bottom: 0, | ||
}} | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { | ||
Img, | ||
spring, | ||
staticFile, | ||
useCurrentFrame, | ||
useVideoConfig, | ||
} from 'remotion'; | ||
|
||
export const Logo = () => { | ||
const frame = useCurrentFrame(); | ||
const {fps} = useVideoConfig(); | ||
const logoWidth = 250; | ||
|
||
const pictureDrop = spring({ | ||
frame, | ||
fps, | ||
from: -logoWidth, | ||
to: 30, | ||
durationInFrames: 30, | ||
}); | ||
|
||
return ( | ||
<Img | ||
src={staticFile( | ||
'/images/showcases/devfestNantes/logo-devfest-mgm_transparent.svg', | ||
)} | ||
width={logoWidth} | ||
height="auto" | ||
style={{ | ||
position: 'absolute', | ||
right: pictureDrop, | ||
top: 20, | ||
}} | ||
/> | ||
); | ||
}; |
104 changes: 104 additions & 0 deletions
104
remotion/compositions/showcases/devfestNantes/Speakers.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
import {loadFont} from '@remotion/google-fonts/YanoneKaffeesatz'; | ||
import { | ||
AbsoluteFill, | ||
interpolate, | ||
spring, | ||
staticFile, | ||
useCurrentFrame, | ||
useVideoConfig, | ||
} from 'remotion'; | ||
|
||
import {Text} from '../../../design/atoms/Text'; | ||
import {AvatarWithCaption} from '../../../design/molecules/AvatarWithCaption'; | ||
import {Speaker} from '../../../types/defaultProps.types'; | ||
|
||
const {fontFamily} = loadFont(); | ||
|
||
export const Speakers: React.FC<{speakers: Speaker[]}> = ({speakers}) => { | ||
const frame = useCurrentFrame(); | ||
const {fps} = useVideoConfig(); | ||
|
||
const pictureDrop = spring({ | ||
frame: frame, | ||
fps, | ||
from: -600, | ||
to: 80, | ||
durationInFrames: 60, | ||
}); | ||
|
||
const nameOpacity = spring({ | ||
frame: frame - 40, | ||
fps, | ||
from: 0, | ||
to: 1, | ||
durationInFrames: 60, | ||
}); | ||
|
||
const nameUnblur = interpolate(frame - 40, [0, 20], [5, 0], { | ||
extrapolateRight: 'clamp', | ||
}); | ||
|
||
return ( | ||
<AbsoluteFill | ||
style={{ | ||
width: '100%', | ||
display: 'flex', | ||
flexDirection: 'row', | ||
justifyContent: 'center', | ||
gap: 100, | ||
}} | ||
> | ||
{speakers.map((speaker) => { | ||
return ( | ||
<div | ||
key={speaker.name} | ||
style={{ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
}} | ||
> | ||
<AvatarWithCaption | ||
avatarPictureUrl={ | ||
speaker.picture || | ||
staticFile( | ||
'images/showcases/campingDesSpeakers/campingDesSpeakersLogo.png', | ||
) | ||
} | ||
avatarStyle={{ | ||
width: 180, | ||
height: 180, | ||
border: 'none', | ||
boxShadow: '0 0 0 5px white, 0 0 0 8px #e7804d', | ||
top: pictureDrop, | ||
}} | ||
style={{ | ||
gap: 0, | ||
}} | ||
> | ||
<> | ||
<Text | ||
style={{ | ||
fontFamily, | ||
textShadow: | ||
'-2px 0 black, 0 2px black, 2px 0 black, 0 -2px black', | ||
letterSpacing: '0.1rem', | ||
position: 'relative', | ||
bottom: '-40%', | ||
width: 320, | ||
height: 100, | ||
fontSize: 35, | ||
fontWeight: 700, | ||
opacity: nameOpacity, | ||
filter: `blur(${nameUnblur}px)`, | ||
}} | ||
> | ||
{speaker.name} | ||
</Text> | ||
</> | ||
</AvatarWithCaption> | ||
</div> | ||
); | ||
})} | ||
</AbsoluteFill> | ||
); | ||
}; |
51 changes: 51 additions & 0 deletions
51
remotion/compositions/showcases/devfestNantes/TalkTitle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import {loadFont} from '@remotion/google-fonts/LeagueSpartan'; | ||
import {interpolate, spring, useCurrentFrame, useVideoConfig} from 'remotion'; | ||
|
||
import {Title} from '../../../design/atoms/Title'; | ||
|
||
const {fontFamily} = loadFont(); | ||
|
||
export const TalkTitle: React.FC<{ | ||
title: string; | ||
style?: React.CSSProperties; | ||
delay?: number; | ||
}> = ({title, style, delay = 0}) => { | ||
const frame = useCurrentFrame(); | ||
const {fps} = useVideoConfig(); | ||
|
||
const titleOpacity = spring({ | ||
frame: frame - delay, | ||
fps, | ||
from: 0, | ||
to: 1, | ||
durationInFrames: 60, | ||
}); | ||
|
||
const titleDeblur = interpolate(frame - delay, [0, 20], [5, 0], { | ||
extrapolateRight: 'clamp', | ||
}); | ||
|
||
return ( | ||
<Title | ||
style={{ | ||
fontFamily, | ||
width: '75%', | ||
left: '50%', | ||
transform: 'translateX(-50%)', | ||
fontSize: '50px', | ||
lineHeight: '1.5', | ||
letterSpacing: '0.1rem', | ||
textAlign: 'center', | ||
textShadow: '-2px 0 black, 0 2px black, 2px 0 black, 0 -2px black', | ||
position: 'absolute', | ||
minHeight: 150, | ||
bottom: '130px', | ||
opacity: titleOpacity, | ||
filter: `blur(${titleDeblur}px)`, | ||
...style, | ||
}} | ||
> | ||
{title} | ||
</Title> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {DevfestNantes} from '../../../../remotion/compositions/showcases/devfestNantes/DevfestNantes'; | ||
import {defaultTalkValues} from '../../defaultValues'; | ||
import {CompositionProps} from '../compositionsConfig'; | ||
|
||
export const DevfestNantesConfig: CompositionProps = { | ||
compositionName: 'DevfestNantes', | ||
component: DevfestNantes, | ||
width: 1280, | ||
height: 720, | ||
durationInFrames: 150, | ||
defaultProps: defaultTalkValues, | ||
}; |
Oops, something went wrong.
91debe0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
shortvid – ./
shortvid-git-main-lyonjs.vercel.app
social-video-generator.vercel.app
www.shortvid.io
shortvid-lyonjs.vercel.app
shortvid.io