@zync/zync-screnplay-player 0.1.187
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ZyncScreenplayPlayer.js +35 -0
- package/dist/bundle.js +2 -0
- package/dist/bundle.js.LICENSE.txt +54 -0
- package/dist/index.js +4 -0
- package/dist/screenplay/RemotionRenderer/RemotionRenderer.js +281 -0
- package/dist/screenplay/RemotionRenderer/Root.js +22 -0
- package/dist/screenplay/RemotionRenderer/components/LottieAnimationGlobal.js +116 -0
- package/dist/screenplay/RemotionRenderer/components/backgrounds/VirtualBackground.js +26 -0
- package/dist/screenplay/RemotionRenderer/components/backgrounds/VirtualBackgroundUnderlay.js +41 -0
- package/dist/screenplay/RemotionRenderer/components/captions/CaptionSimple.js +12 -0
- package/dist/screenplay/RemotionRenderer/components/effects/BrollFullscreen.js +27 -0
- package/dist/screenplay/RemotionRenderer/components/effects/GlitchText.js +22 -0
- package/dist/screenplay/RemotionRenderer/components/effects/HandoffNametag.js +7 -0
- package/dist/screenplay/RemotionRenderer/components/effects/LottieAnimation.js +64 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Nametag.js +9 -0
- package/dist/screenplay/RemotionRenderer/components/effects/PhraseRainbowEffect.js +34 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Sentence.js +50 -0
- package/dist/screenplay/RemotionRenderer/components/effects/Title.js +12 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/BrollGreenScreen.js +742 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/BrollSplitScreen.js +714 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/BrollStudioBackdrop.js +620 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/DynamicTriangle.js +618 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/Handoff.js +161 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/IntroVideo.js +1330 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/KeyPointOverlayDepth.js +397 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/Keyword.js +539 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/KeywordStudioBackdrop.js +714 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStill.js +381 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillFullScreen.js +178 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillGreenScreen.js +568 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillGreenScreenV2.js +731 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/MotionStillStudioBackdrop.js +588 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrame.js +183 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameBroll.js +181 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameSentence.js +17 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/SimpleFrameZoomCut.js +13 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/TextWithVideo.js +373 -0
- package/dist/screenplay/RemotionRenderer/components/layouts/quote-bubble-animation.json +1 -0
- package/dist/screenplay/RemotionRenderer/components/utils/BlurOverlay.js +19 -0
- package/dist/screenplay/RemotionRenderer/components/utils/ChromaKeyedVideo.js +59 -0
- package/dist/screenplay/RemotionRenderer/components/utils/FaceCenteredVideo.js +562 -0
- package/dist/screenplay/RemotionRenderer/components/utils/PausableImg.js +124 -0
- package/dist/screenplay/RemotionRenderer/components/utils/README.md +80 -0
- package/dist/screenplay/RemotionRenderer/components/utils/SafeZones.js +69 -0
- package/dist/screenplay/RemotionRenderer/components/utils/StretchText.js +124 -0
- package/dist/screenplay/RemotionRenderer/components/utils/StretchTextDemo.js +66 -0
- package/dist/screenplay/RemotionRenderer/config.js +8 -0
- package/dist/screenplay/RemotionRenderer/development.js +1370 -0
- package/dist/screenplay/RemotionRenderer/helpers/cleanFacemetadata.js +29 -0
- package/dist/screenplay/RemotionRenderer/helpers/convertToSeconds.js +14 -0
- package/dist/screenplay/RemotionRenderer/helpers/faceBasedVideoStyles.js +212 -0
- package/dist/screenplay/RemotionRenderer/helpers/faceCenteredVideoTransforms.js +468 -0
- package/dist/screenplay/RemotionRenderer/helpers/getContrastColor.js +15 -0
- package/dist/screenplay/RemotionRenderer/helpers/getVideoOrientation.js +21 -0
- package/dist/screenplay/RemotionRenderer/helpers/hexToRgb.js +48 -0
- package/dist/screenplay/RemotionRenderer/hooks/useLottieReplaceColor.js +45 -0
- package/dist/screenplay/RemotionRenderer/hooks/useOrientationBased.js +29 -0
- package/dist/screenplay/RemotionRenderer/hooks/useTimeInterpolate.js +54 -0
- package/dist/screenplay/RemotionRenderer/hooks/useVirtualBackground.js +38 -0
- package/dist/screenplay/RemotionRenderer/index.js +3 -0
- package/dist/screenplay/RemotionRenderer/main/lib/Sequence.js +76 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/DefaultLayout.js +72 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/DynamicTriangleLayout.js +54 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/HandoffLayout.js +50 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/IntroVideoLayout.js +33 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/KeywordLayout.js +36 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/LayoutFactory.js +68 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/MotionStillLayout.js +36 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/SimpleFrameLayout.js +43 -0
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/TextWithVideoLayout.js +52 -0
- package/dist/screenplay/RemotionRenderer/main/screenplaySchema.js +92 -0
- package/dist/screenplay/RemotionRenderer/registeredComponents.js +91 -0
- package/dist/screenplay/RemotionRenderer/theme/config.js +8 -0
- package/dist/screenplay/RemotionRenderer/theme/hooks/useTheme.js +24 -0
- package/dist/screenplay/RemotionRenderer/theme/hooks/useThemedComponents.js +101 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldNameTag.js +147 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldSentence.js +138 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/bigbold/BigBoldTitle.js +136 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColor.js +67 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorInverse.js +67 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionColorShadow.js +66 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionElegant.js +134 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionEmphasis.js +122 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionPunctuated.js +84 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBoom.js +88 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordBubble.js +91 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/CaptionWordPopup.js +118 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/DefaultCaption.js +62 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag/handoffNametagConfig.js +59 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag.js +173 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Nametag.js +129 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/AnimatedSentence.js +20 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/AnimatedSentenceDefault.js +29 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence/SentenceSimple.helpers.js +61 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Sentence.js +86 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/Title.js +112 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/default/constants.js +1 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Nametag.js +134 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Sentence.js +49 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/Title.js +108 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/animations.js +30 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glassmorphism/config.js +9 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchNametag.js +252 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchSentence.js +156 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/GlitchTitle.js +142 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/DisplacedText.js +66 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/GlitchAnimatedLine.js +38 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/components/SplitSentence.js +80 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/glitch/helpers.js +32 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/none/Nametag.js +3 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/none/Title.js +3 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullNametag.js +165 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullSentence.js +94 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/PushPullTitle.js +98 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/designs/sentence.js +92 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/pushpull/designs/title.js +119 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/Nametag.js +122 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsCaption.js +93 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/SportsSentence.js +76 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/Title.js +90 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sports/shared.js +62 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Nametag.js +145 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/SportsBounceSentence.js +148 -0
- package/dist/screenplay/RemotionRenderer/theme/themes/sportsbounce/Title.js +160 -0
- package/dist/screenplay/RemotionRenderer/tracks/AudioTrack.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/CaptionsVideoTrack.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/DynamicVideoComposition.js +31 -0
- package/dist/screenplay/RemotionRenderer/tracks/EffectsVideoTrack.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +141 -0
- package/dist/screenplay/RemotionRenderer/tracks/Soundtrack.js +16 -0
- package/dist/screenplay/RemotionRenderer/tracks/Watermark.js +23 -0
- package/dist/screenplay/RemotionRenderer/tracks/transitions/GlitchOne.js +92 -0
- package/package.json +45 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { AbsoluteFill, Sequence, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { loadFont } from "@remotion/google-fonts/TitanOne";
|
|
4
|
+
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
|
+
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
6
|
+
import { useTheme } from "../../hooks/useTheme";
|
|
7
|
+
import { getBrighterColor } from "../../../helpers/hexToRgb";
|
|
8
|
+
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
9
|
+
var _loadFont = loadFont(),
|
|
10
|
+
fontFamily = _loadFont.fontFamily;
|
|
11
|
+
export var CaptionWordBoom = function CaptionWordBoom(_ref) {
|
|
12
|
+
var transcripts = _ref.transcripts,
|
|
13
|
+
color = _ref.color;
|
|
14
|
+
var _useVideoConfig = useVideoConfig(),
|
|
15
|
+
width = _useVideoConfig.width;
|
|
16
|
+
var _useOrientationBased = useOrientationBased({
|
|
17
|
+
portrait: {
|
|
18
|
+
fontSize: 55,
|
|
19
|
+
bottom: CAPTION_PORTRAIT_BOTTOM_OFFSET
|
|
20
|
+
},
|
|
21
|
+
landscape: {
|
|
22
|
+
fontSize: 55,
|
|
23
|
+
bottom: 110
|
|
24
|
+
},
|
|
25
|
+
square: {
|
|
26
|
+
fontSize: 55,
|
|
27
|
+
bottom: 110
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
bottom = _useOrientationBased.bottom,
|
|
31
|
+
fontSize = _useOrientationBased.fontSize;
|
|
32
|
+
var _useTheme = useTheme(),
|
|
33
|
+
primaryColor = _useTheme.primaryColor,
|
|
34
|
+
primaryContrast = _useTheme.primaryContrast,
|
|
35
|
+
accentColor = _useTheme.accentColor,
|
|
36
|
+
accentContrast = _useTheme.accentContrast;
|
|
37
|
+
var containerWidth = width * 0.8;
|
|
38
|
+
var frame = useCurrentFrame();
|
|
39
|
+
var brighterColor = getBrighterColor(primaryColor, accentColor);
|
|
40
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, null, transcripts.map(function (transcript, index) {
|
|
41
|
+
var _distributeTextToFit = distributeTextToFit(transcript.text, width * 0.7, fontSize * 1.6, fontSize),
|
|
42
|
+
lines = _distributeTextToFit.lines,
|
|
43
|
+
textFontSize = _distributeTextToFit.fontSize;
|
|
44
|
+
return /*#__PURE__*/React.createElement(Sequence, {
|
|
45
|
+
key: index,
|
|
46
|
+
from: transcript.from,
|
|
47
|
+
durationInFrames: transcript.durationInFrames
|
|
48
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
49
|
+
style: {
|
|
50
|
+
display: "flex",
|
|
51
|
+
alignItems: "center",
|
|
52
|
+
gap: fontSize / 1.75,
|
|
53
|
+
justifyContent: "center",
|
|
54
|
+
height: fontSize * 1.6,
|
|
55
|
+
position: "absolute",
|
|
56
|
+
bottom: bottom,
|
|
57
|
+
left: "50%",
|
|
58
|
+
width: containerWidth,
|
|
59
|
+
margin: "0 auto",
|
|
60
|
+
transform: "translateX(-50%)",
|
|
61
|
+
fontSize: textFontSize,
|
|
62
|
+
textTransform: "uppercase",
|
|
63
|
+
textAlign: "center",
|
|
64
|
+
fontFamily: fontFamily,
|
|
65
|
+
textWrap: "nowrap",
|
|
66
|
+
lineHeight: 1,
|
|
67
|
+
fontWeight: 400,
|
|
68
|
+
color: "#fff"
|
|
69
|
+
}
|
|
70
|
+
}, transcript.text.split(" ").map(function (word, wordIndex) {
|
|
71
|
+
var _transcript$punctuati, _transcript$punctuati2;
|
|
72
|
+
var isPunctuated = frame >= Number(((_transcript$punctuati = transcript.punctuations.find(function (p) {
|
|
73
|
+
return p.index === wordIndex;
|
|
74
|
+
})) === null || _transcript$punctuati === void 0 ? void 0 : _transcript$punctuati.start) || 0) && Number(frame <= ((_transcript$punctuati2 = transcript.punctuations.find(function (p) {
|
|
75
|
+
return p.index === wordIndex;
|
|
76
|
+
})) === null || _transcript$punctuati2 === void 0 ? void 0 : _transcript$punctuati2.end));
|
|
77
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
78
|
+
key: wordIndex,
|
|
79
|
+
style: {
|
|
80
|
+
color: isPunctuated ? color || accentColor : "white",
|
|
81
|
+
transform: "scaleX(".concat(isPunctuated ? 1.15 : 1, ") scaleY(").concat(isPunctuated ? 1.3 : 1, ")"),
|
|
82
|
+
transition: "transform 0.2s",
|
|
83
|
+
textShadow: "0px 0px 4px #000000, 0px 0px 4px #000000, 0px 0px 4px #000000, 0px 0px 10px #000000, 0px 0px 10px #000000"
|
|
84
|
+
}
|
|
85
|
+
}, word);
|
|
86
|
+
})));
|
|
87
|
+
}));
|
|
88
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { AbsoluteFill, Sequence, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { loadFont } from "@remotion/google-fonts/Montserrat";
|
|
4
|
+
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
|
+
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
6
|
+
import { useTheme } from "../../hooks/useTheme";
|
|
7
|
+
import { getBrighterColor } from "../../../helpers/hexToRgb";
|
|
8
|
+
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
9
|
+
var _loadFont = loadFont(),
|
|
10
|
+
fontFamily = _loadFont.fontFamily;
|
|
11
|
+
export var CaptionWordBubble = function CaptionWordBubble(_ref) {
|
|
12
|
+
var transcripts = _ref.transcripts,
|
|
13
|
+
color = _ref.color;
|
|
14
|
+
var _useVideoConfig = useVideoConfig(),
|
|
15
|
+
width = _useVideoConfig.width;
|
|
16
|
+
var _useOrientationBased = useOrientationBased({
|
|
17
|
+
portrait: {
|
|
18
|
+
fontSize: 60,
|
|
19
|
+
bottom: CAPTION_PORTRAIT_BOTTOM_OFFSET
|
|
20
|
+
},
|
|
21
|
+
landscape: {
|
|
22
|
+
fontSize: 60,
|
|
23
|
+
bottom: 110
|
|
24
|
+
},
|
|
25
|
+
square: {
|
|
26
|
+
fontSize: 60,
|
|
27
|
+
bottom: 110
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
bottom = _useOrientationBased.bottom,
|
|
31
|
+
fontSize = _useOrientationBased.fontSize;
|
|
32
|
+
var _useTheme = useTheme(),
|
|
33
|
+
primaryColor = _useTheme.primaryColor,
|
|
34
|
+
primaryContrast = _useTheme.primaryContrast,
|
|
35
|
+
accentColor = _useTheme.accentColor,
|
|
36
|
+
accentContrast = _useTheme.accentContrast;
|
|
37
|
+
var containerWidth = width * 0.8;
|
|
38
|
+
var frame = useCurrentFrame();
|
|
39
|
+
var brighterColor = getBrighterColor(primaryColor, accentColor);
|
|
40
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, null, transcripts.map(function (transcript, index) {
|
|
41
|
+
var _distributeTextToFit = distributeTextToFit(transcript.text, width * 0.7, fontSize * 1.6, fontSize),
|
|
42
|
+
lines = _distributeTextToFit.lines,
|
|
43
|
+
textFontSize = _distributeTextToFit.fontSize;
|
|
44
|
+
return /*#__PURE__*/React.createElement(Sequence, {
|
|
45
|
+
key: index,
|
|
46
|
+
from: transcript.from,
|
|
47
|
+
durationInFrames: transcript.durationInFrames
|
|
48
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
49
|
+
style: {
|
|
50
|
+
display: "flex",
|
|
51
|
+
gap: textFontSize / 2,
|
|
52
|
+
alignItems: "center",
|
|
53
|
+
justifyContent: "center",
|
|
54
|
+
height: fontSize * 1.6,
|
|
55
|
+
position: "absolute",
|
|
56
|
+
bottom: bottom,
|
|
57
|
+
left: "50%",
|
|
58
|
+
width: containerWidth,
|
|
59
|
+
margin: "0 auto",
|
|
60
|
+
transform: "translateX(-50%)",
|
|
61
|
+
fontSize: textFontSize,
|
|
62
|
+
textTransform: "uppercase",
|
|
63
|
+
textAlign: "center",
|
|
64
|
+
fontFamily: fontFamily,
|
|
65
|
+
textWrap: "nowrap",
|
|
66
|
+
lineHeight: 1,
|
|
67
|
+
fontWeight: 900,
|
|
68
|
+
color: "#fff"
|
|
69
|
+
}
|
|
70
|
+
}, transcript.text.split(" ").map(function (word, wordIndex) {
|
|
71
|
+
var _transcript$punctuati, _transcript$punctuati2;
|
|
72
|
+
var isPunctuated = frame >= Number(((_transcript$punctuati = transcript.punctuations.find(function (p) {
|
|
73
|
+
return p.index === wordIndex;
|
|
74
|
+
})) === null || _transcript$punctuati === void 0 ? void 0 : _transcript$punctuati.start) || 0) && Number(frame <= ((_transcript$punctuati2 = transcript.punctuations.find(function (p) {
|
|
75
|
+
return p.index === wordIndex;
|
|
76
|
+
})) === null || _transcript$punctuati2 === void 0 ? void 0 : _transcript$punctuati2.end));
|
|
77
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
78
|
+
key: wordIndex,
|
|
79
|
+
style: {
|
|
80
|
+
borderRadius: "10px",
|
|
81
|
+
padding: "0.5rem 0.75rem 0.5rem 0.75rem",
|
|
82
|
+
color: isPunctuated ? color || accentColor : "white",
|
|
83
|
+
background: isPunctuated ? accentContrast : "transparent",
|
|
84
|
+
transform: "scaleX(".concat(isPunctuated ? 1.15 : 1, ") scaleY(").concat(isPunctuated ? 1.3 : 1, ")"),
|
|
85
|
+
transition: "transform 0.2s",
|
|
86
|
+
textShadow: isPunctuated ? "" : "-3px 0 black, 0 3px black, 3px 0 black, 0 -3px black"
|
|
87
|
+
}
|
|
88
|
+
}, word);
|
|
89
|
+
})));
|
|
90
|
+
}));
|
|
91
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { AbsoluteFill, Sequence, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { loadFont } from "@remotion/google-fonts/Montserrat";
|
|
4
|
+
import { loadFont as loadFont2 } from "@remotion/google-fonts/CherryBombOne";
|
|
5
|
+
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
6
|
+
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
7
|
+
import { useTheme } from "../../hooks/useTheme";
|
|
8
|
+
import { getBrighterColor } from "../../../helpers/hexToRgb";
|
|
9
|
+
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
10
|
+
var _loadFont = loadFont(),
|
|
11
|
+
fontFamily = _loadFont.fontFamily;
|
|
12
|
+
var _loadFont2 = loadFont2(),
|
|
13
|
+
fontFamilyBubble = _loadFont2.fontFamily;
|
|
14
|
+
export var CaptionWordPopup = function CaptionWordPopup(_ref) {
|
|
15
|
+
var transcripts = _ref.transcripts,
|
|
16
|
+
color = _ref.color;
|
|
17
|
+
var _useVideoConfig = useVideoConfig(),
|
|
18
|
+
width = _useVideoConfig.width;
|
|
19
|
+
var _useOrientationBased = useOrientationBased({
|
|
20
|
+
portrait: {
|
|
21
|
+
fontSize: 60,
|
|
22
|
+
bottom: CAPTION_PORTRAIT_BOTTOM_OFFSET
|
|
23
|
+
},
|
|
24
|
+
landscape: {
|
|
25
|
+
fontSize: 60,
|
|
26
|
+
bottom: 110
|
|
27
|
+
},
|
|
28
|
+
square: {
|
|
29
|
+
fontSize: 60,
|
|
30
|
+
bottom: 110
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
bottom = _useOrientationBased.bottom,
|
|
34
|
+
fontSize = _useOrientationBased.fontSize;
|
|
35
|
+
var _useTheme = useTheme(),
|
|
36
|
+
primaryColor = _useTheme.primaryColor,
|
|
37
|
+
primaryContrast = _useTheme.primaryContrast,
|
|
38
|
+
accentColor = _useTheme.accentColor,
|
|
39
|
+
accentContrast = _useTheme.accentContrast;
|
|
40
|
+
var containerWidth = width * 0.8;
|
|
41
|
+
var frame = useCurrentFrame();
|
|
42
|
+
var brighterColor = getBrighterColor(primaryColor, accentColor);
|
|
43
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, null, transcripts.map(function (transcript, index) {
|
|
44
|
+
var _distributeTextToFit = distributeTextToFit(transcript.text, width * 0.7, fontSize * 1.6, fontSize),
|
|
45
|
+
lines = _distributeTextToFit.lines,
|
|
46
|
+
textFontSize = _distributeTextToFit.fontSize;
|
|
47
|
+
return /*#__PURE__*/React.createElement(Sequence, {
|
|
48
|
+
key: index,
|
|
49
|
+
from: transcript.from,
|
|
50
|
+
durationInFrames: transcript.durationInFrames
|
|
51
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
52
|
+
style: {
|
|
53
|
+
display: "flex",
|
|
54
|
+
gap: textFontSize / 2,
|
|
55
|
+
alignItems: "center",
|
|
56
|
+
justifyContent: "center",
|
|
57
|
+
height: fontSize * 1.6,
|
|
58
|
+
position: "absolute",
|
|
59
|
+
bottom: bottom,
|
|
60
|
+
left: "50%",
|
|
61
|
+
width: containerWidth,
|
|
62
|
+
margin: "0 auto",
|
|
63
|
+
transform: "translateX(-50%)",
|
|
64
|
+
fontSize: textFontSize,
|
|
65
|
+
textTransform: "uppercase",
|
|
66
|
+
textAlign: "center",
|
|
67
|
+
fontFamily: fontFamily,
|
|
68
|
+
textWrap: "nowrap",
|
|
69
|
+
lineHeight: 1,
|
|
70
|
+
fontWeight: 900,
|
|
71
|
+
color: "#fff"
|
|
72
|
+
}
|
|
73
|
+
}, transcript.text.split(" ").map(function (word, wordIndex) {
|
|
74
|
+
var _transcript$punctuati, _transcript$punctuati2;
|
|
75
|
+
var isPunctuated = frame >= Number(((_transcript$punctuati = transcript.punctuations.find(function (p) {
|
|
76
|
+
return p.index === wordIndex;
|
|
77
|
+
})) === null || _transcript$punctuati === void 0 ? void 0 : _transcript$punctuati.start) || 0) && Number(frame <= ((_transcript$punctuati2 = transcript.punctuations.find(function (p) {
|
|
78
|
+
return p.index === wordIndex;
|
|
79
|
+
})) === null || _transcript$punctuati2 === void 0 ? void 0 : _transcript$punctuati2.end));
|
|
80
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
81
|
+
key: wordIndex,
|
|
82
|
+
style: {
|
|
83
|
+
position: "relative",
|
|
84
|
+
borderRadius: "10px",
|
|
85
|
+
color: isPunctuated ? color || accentColor : "white"
|
|
86
|
+
}
|
|
87
|
+
}, /*#__PURE__*/React.createElement("span", null, word.split("").map(function (_char, wordIndex) {
|
|
88
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
89
|
+
style: {
|
|
90
|
+
position: "relative"
|
|
91
|
+
}
|
|
92
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
93
|
+
style: {
|
|
94
|
+
top: 0,
|
|
95
|
+
left: 0,
|
|
96
|
+
transition: "color 0.2s",
|
|
97
|
+
color: isPunctuated ? "white" : color || accentColor,
|
|
98
|
+
position: "absolute",
|
|
99
|
+
zIndex: -1,
|
|
100
|
+
transform: isPunctuated ? "scale(2.00)" : "scale(1.15)",
|
|
101
|
+
transformOrigin: isPunctuated ? "center center" : "top center",
|
|
102
|
+
fontFamily: isPunctuated ? fontFamilyBubble : fontFamily
|
|
103
|
+
}
|
|
104
|
+
}, _char), /*#__PURE__*/React.createElement("span", {
|
|
105
|
+
style: {
|
|
106
|
+
position: "absolute",
|
|
107
|
+
//width: "100%",
|
|
108
|
+
//height: "100%",
|
|
109
|
+
zIndex: -1,
|
|
110
|
+
top: "50%",
|
|
111
|
+
left: "50%",
|
|
112
|
+
transform: "translate(-50%, -50%)"
|
|
113
|
+
}
|
|
114
|
+
}), _char);
|
|
115
|
+
})));
|
|
116
|
+
})));
|
|
117
|
+
}));
|
|
118
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { AbsoluteFill, Sequence, useVideoConfig } from "remotion";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { loadFont } from "@remotion/google-fonts/Poppins";
|
|
4
|
+
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
5
|
+
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
6
|
+
import { CAPTION_PORTRAIT_BOTTOM_OFFSET } from "./constants";
|
|
7
|
+
var _loadFont = loadFont(),
|
|
8
|
+
fontFamily = _loadFont.fontFamily;
|
|
9
|
+
export var DefaultCaption = function DefaultCaption(_ref) {
|
|
10
|
+
var transcripts = _ref.transcripts,
|
|
11
|
+
color = _ref.color;
|
|
12
|
+
var _useVideoConfig = useVideoConfig(),
|
|
13
|
+
width = _useVideoConfig.width;
|
|
14
|
+
var _useOrientationBased = useOrientationBased({
|
|
15
|
+
portrait: {
|
|
16
|
+
fontSize: 75,
|
|
17
|
+
bottom: CAPTION_PORTRAIT_BOTTOM_OFFSET
|
|
18
|
+
},
|
|
19
|
+
landscape: {
|
|
20
|
+
fontSize: 60,
|
|
21
|
+
bottom: 110
|
|
22
|
+
},
|
|
23
|
+
square: {
|
|
24
|
+
fontSize: 75,
|
|
25
|
+
bottom: 110
|
|
26
|
+
}
|
|
27
|
+
}),
|
|
28
|
+
bottom = _useOrientationBased.bottom,
|
|
29
|
+
fontSize = _useOrientationBased.fontSize;
|
|
30
|
+
var containerWidth = width * 0.8;
|
|
31
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, null, transcripts.map(function (transcript, index) {
|
|
32
|
+
var _distributeTextToFit = distributeTextToFit(transcript.text, width * 0.7, fontSize * 1.6, fontSize),
|
|
33
|
+
lines = _distributeTextToFit.lines,
|
|
34
|
+
textFontSize = _distributeTextToFit.fontSize;
|
|
35
|
+
return /*#__PURE__*/React.createElement(Sequence, {
|
|
36
|
+
key: index,
|
|
37
|
+
from: transcript.from,
|
|
38
|
+
durationInFrames: transcript.durationInFrames
|
|
39
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
40
|
+
style: {
|
|
41
|
+
display: "flex",
|
|
42
|
+
alignItems: "center",
|
|
43
|
+
justifyContent: "center",
|
|
44
|
+
height: fontSize * 1.6,
|
|
45
|
+
position: "absolute",
|
|
46
|
+
bottom: bottom,
|
|
47
|
+
left: "50%",
|
|
48
|
+
width: containerWidth,
|
|
49
|
+
margin: "0 auto",
|
|
50
|
+
transform: "translateX(-50%)",
|
|
51
|
+
color: color || "white",
|
|
52
|
+
fontSize: textFontSize,
|
|
53
|
+
textTransform: "uppercase",
|
|
54
|
+
textAlign: "center",
|
|
55
|
+
fontFamily: fontFamily,
|
|
56
|
+
textShadow: "3px 3px 3px #000",
|
|
57
|
+
fontWeight: 700,
|
|
58
|
+
textWrap: "nowrap"
|
|
59
|
+
}
|
|
60
|
+
}, transcript.text));
|
|
61
|
+
}));
|
|
62
|
+
};
|
package/dist/screenplay/RemotionRenderer/theme/themes/default/HandoffNametag/handoffNametagConfig.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
export var getHandoffNametagConfig = function getHandoffNametagConfig(width) {
|
|
6
|
+
return {
|
|
7
|
+
portrait: {
|
|
8
|
+
targetImageHeights: [130, 230, 200, 170, 200, 170, 170, 170, 170, 170],
|
|
9
|
+
targetImageTranslateY: _defineProperty(_defineProperty({}, "first-left", [770, 160, 160, 160, 110, 0, 0, 0, 0, 0]), "second-right", [770, 160, 160, 160, 110, 0, 0, 0, 0, 0]),
|
|
10
|
+
opacity: [0.1, 0.5, 0.7, 1, 1, 1, 1, 1, 1, 0],
|
|
11
|
+
targetImageWidths: [60, 60, 170, 170, 170, 170, 170, 170, 170, 170],
|
|
12
|
+
rotation: [180, 180, 180, 360, 360, 360, 360, 360, 360, 360],
|
|
13
|
+
targetTextOpacity: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0],
|
|
14
|
+
textContainerWidth: width - 15 - 170 - 20,
|
|
15
|
+
textContainerHeight: 170,
|
|
16
|
+
lineJustifyContent: _defineProperty(_defineProperty({}, "first-left", "flex-start"), "second-right", "flex-end"),
|
|
17
|
+
fullNameMaxFontSize: 42,
|
|
18
|
+
titleMaxFontSize: 30,
|
|
19
|
+
targetContainerTops: _defineProperty(_defineProperty({}, "first-left", [700, 700, 700, 700, 700, 700, 700, 700, 700, 700]), "second-right", [1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050]),
|
|
20
|
+
containerLeft: _defineProperty(_defineProperty({}, "first-left", 70), "second-right", -120),
|
|
21
|
+
containerFlexDirection: _defineProperty(_defineProperty({}, "first-left", "row"), "second-right", "row-reverse"),
|
|
22
|
+
containerAlignItems: _defineProperty(_defineProperty({}, "first-left", "center"), "second-right", "center")
|
|
23
|
+
},
|
|
24
|
+
landscape: {
|
|
25
|
+
targetImageHeights: [130, 230, 200, 170, 200, 170, 170, 170],
|
|
26
|
+
targetImageTranslateY: _defineProperty(_defineProperty({}, "first-left", [-770, -160, -160, -160, -110, 0, 0, 0]), "second-right", [-770, -160, -160, -160, -110, 0, 0, 0]),
|
|
27
|
+
opacity: [0.1, 0.5, 0.7, 1, 1, 1, 1, 0],
|
|
28
|
+
targetImageWidths: [60, 60, 170, 170, 170, 170, 170, 170],
|
|
29
|
+
rotation: [180, 180, 180, 360, 360, 360, 360, 360],
|
|
30
|
+
targetTextOpacity: [1, 1, 1, 1, 1, 1, 1, 0],
|
|
31
|
+
textContainerWidth: width / 2 - 15 - 170 - 20,
|
|
32
|
+
textContainerHeight: 170,
|
|
33
|
+
lineJustifyContent: _defineProperty(_defineProperty({}, "first-left", "flex-start"), "second-right", "flex-end"),
|
|
34
|
+
fullNameMaxFontSize: 42,
|
|
35
|
+
titleMaxFontSize: 30,
|
|
36
|
+
targetContainerTops: _defineProperty(_defineProperty({}, "first-left", [600, 600, 600, 600, 600, 600, 600, 600]), "second-right", [600, 600, 600, 600, 600, 600, 600, 600]),
|
|
37
|
+
containerLeft: _defineProperty(_defineProperty({}, "first-left", 75), "second-right", -75),
|
|
38
|
+
containerFlexDirection: _defineProperty(_defineProperty({}, "first-left", "row"), "second-right", "row-reverse"),
|
|
39
|
+
containerAlignItems: _defineProperty(_defineProperty({}, "first-left", "center"), "second-right", "center")
|
|
40
|
+
},
|
|
41
|
+
square: {
|
|
42
|
+
targetImageHeights: [130, 180, 150, 120, 150, 120, 120, 120],
|
|
43
|
+
targetImageTranslateY: _defineProperty(_defineProperty({}, "first-left", [-770, -160, -160, -160, -110, 0, 0, 0]), "second-right", [-770, -160, -160, -160, -110, 0, 0, 0]),
|
|
44
|
+
opacity: [0.1, 0.5, 0.7, 1, 1, 1, 1, 0],
|
|
45
|
+
targetImageWidths: [60, 60, 120, 120, 120, 120, 120, 120],
|
|
46
|
+
rotation: [180, 180, 180, 360, 360, 360, 360, 360],
|
|
47
|
+
targetTextOpacity: [1, 1, 1, 1, 1, 1, 1, 0],
|
|
48
|
+
textContainerWidth: width / 2 - 15 - 170 - 20 - 20,
|
|
49
|
+
textContainerHeight: 170,
|
|
50
|
+
lineJustifyContent: _defineProperty(_defineProperty({}, "first-left", "flex-start"), "second-right", "flex-end"),
|
|
51
|
+
fullNameMaxFontSize: 36,
|
|
52
|
+
titleMaxFontSize: 24,
|
|
53
|
+
targetContainerTops: _defineProperty(_defineProperty({}, "first-left", [750, 750, 750, 750, 750, 750, 750, 750]), "second-right", [750, 750, 750, 750, 750, 750, 750, 750]),
|
|
54
|
+
containerLeft: _defineProperty(_defineProperty({}, "first-left", 50), "second-right", 580),
|
|
55
|
+
containerFlexDirection: _defineProperty(_defineProperty({}, "first-left", "row"), "second-right", "row-reverse"),
|
|
56
|
+
containerAlignItems: _defineProperty(_defineProperty({}, "first-left", "center"), "second-right", "center")
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { AbsoluteFill, Easing, interpolate, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
|
+
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
3
|
+
import { loadFont } from "@remotion/google-fonts/Roboto";
|
|
4
|
+
import { calculateInputRangeInPhases, DEFAULT_TIME_INTERPOLATE_OPTIONS, useTimeInterpolate } from "../../../hooks/useTimeInterpolate.js";
|
|
5
|
+
import { useTheme } from "../../hooks/useTheme.js";
|
|
6
|
+
import { distributeTextToFit } from "./Sentence/SentenceSimple.helpers.js";
|
|
7
|
+
import { getHandoffNametagConfig } from "./HandoffNametag/handoffNametagConfig.js";
|
|
8
|
+
import React from "react";
|
|
9
|
+
import PausableImg from "../../../components/utils/PausableImg";
|
|
10
|
+
var _loadFont = loadFont(),
|
|
11
|
+
fontFamily = _loadFont.fontFamily;
|
|
12
|
+
export var HandoffNametag = function HandoffNametag(_ref) {
|
|
13
|
+
var pictureUrl = _ref.pictureUrl,
|
|
14
|
+
fullName = _ref.fullName,
|
|
15
|
+
title = _ref.title,
|
|
16
|
+
alignment = _ref.alignment,
|
|
17
|
+
duration = _ref.duration;
|
|
18
|
+
var _useVideoConfig = useVideoConfig(),
|
|
19
|
+
fps = _useVideoConfig.fps,
|
|
20
|
+
width = _useVideoConfig.width;
|
|
21
|
+
var _useTheme = useTheme(),
|
|
22
|
+
primaryColor = _useTheme.primaryColor,
|
|
23
|
+
primaryContrast = _useTheme.primaryContrast;
|
|
24
|
+
var frame = useCurrentFrame();
|
|
25
|
+
var _useOrientationBased = useOrientationBased(getHandoffNametagConfig(width)),
|
|
26
|
+
targetImageHeights = _useOrientationBased.targetImageHeights,
|
|
27
|
+
opacity = _useOrientationBased.opacity,
|
|
28
|
+
targetImageWidths = _useOrientationBased.targetImageWidths,
|
|
29
|
+
rotation = _useOrientationBased.rotation,
|
|
30
|
+
textContainerWidth = _useOrientationBased.textContainerWidth,
|
|
31
|
+
textContainerHeight = _useOrientationBased.textContainerHeight,
|
|
32
|
+
fullNameMaxFontSize = _useOrientationBased.fullNameMaxFontSize,
|
|
33
|
+
titleMaxFontSize = _useOrientationBased.titleMaxFontSize,
|
|
34
|
+
targetImageTranslateY = _useOrientationBased.targetImageTranslateY,
|
|
35
|
+
containerLeft = _useOrientationBased.containerLeft,
|
|
36
|
+
targetContainerTops = _useOrientationBased.targetContainerTops,
|
|
37
|
+
containerFlexDirection = _useOrientationBased.containerFlexDirection,
|
|
38
|
+
orientation = _useOrientationBased.orientation,
|
|
39
|
+
containerAlignItems = _useOrientationBased.containerAlignItems,
|
|
40
|
+
lineJustifyContent = _useOrientationBased.lineJustifyContent;
|
|
41
|
+
var isPortrait = orientation === "portrait";
|
|
42
|
+
var isSquare = orientation === "square";
|
|
43
|
+
var phaseDurationsInSeconds = isPortrait ? [0.1, 0.05, 0.05, 0.05, 0.05, 3.75, 0.4, duration - 3.75, 0.25] : [0.1, 0.05, 0.05, 0.05, 0.05, duration, 0.25];
|
|
44
|
+
var inputRangeInSeconds = calculateInputRangeInPhases(phaseDurationsInSeconds, 0);
|
|
45
|
+
var imageHeight = useTimeInterpolate(inputRangeInSeconds, targetImageHeights, DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
46
|
+
var imageTranslateY = useTimeInterpolate(inputRangeInSeconds, targetImageTranslateY[alignment], DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
47
|
+
var imageOpacity = useTimeInterpolate(inputRangeInSeconds, opacity, DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
48
|
+
var imageWidths = useTimeInterpolate(inputRangeInSeconds, targetImageWidths, DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
49
|
+
var imageRotation = useTimeInterpolate(inputRangeInSeconds, rotation, DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
50
|
+
var containerTop = useTimeInterpolate(inputRangeInSeconds, targetContainerTops[alignment], DEFAULT_TIME_INTERPOLATE_OPTIONS);
|
|
51
|
+
var maxTimeInFrames = 0.2 * fps;
|
|
52
|
+
var splitFullName = fullName.split(" ");
|
|
53
|
+
var fullNameDelayBetweenWords = maxTimeInFrames / splitFullName.length;
|
|
54
|
+
var _distributeTextToFit = distributeTextToFit(fullName, textContainerWidth, textContainerHeight / 2, fullNameMaxFontSize),
|
|
55
|
+
fullNameLines = _distributeTextToFit.lines,
|
|
56
|
+
fullNameFontSize = _distributeTextToFit.fontSize;
|
|
57
|
+
var splitTitle = title !== null && title !== void 0 && title.length ? title.split(" ") : null;
|
|
58
|
+
var titleDelayBetweenWords = splitTitle ? maxTimeInFrames / splitTitle.length : 0;
|
|
59
|
+
var _distributeTextToFit2 = distributeTextToFit(title || "", textContainerWidth, textContainerHeight / 2, titleMaxFontSize),
|
|
60
|
+
titleLines = _distributeTextToFit2.lines,
|
|
61
|
+
titleFontSize = _distributeTextToFit2.fontSize;
|
|
62
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
63
|
+
style: {
|
|
64
|
+
flexDirection: containerFlexDirection[alignment],
|
|
65
|
+
left: containerLeft[alignment],
|
|
66
|
+
top: containerTop,
|
|
67
|
+
height: "min-content",
|
|
68
|
+
alignItems: containerAlignItems[alignment],
|
|
69
|
+
gap: isSquare ? "5px" : "20px",
|
|
70
|
+
opacity: imageOpacity,
|
|
71
|
+
width: isSquare ? "min-content" : "100%"
|
|
72
|
+
}
|
|
73
|
+
}, pictureUrl && /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
style: {
|
|
75
|
+
height: imageHeight,
|
|
76
|
+
width: imageWidths,
|
|
77
|
+
backgroundColor: primaryColor,
|
|
78
|
+
borderRadius: "9999px",
|
|
79
|
+
opacity: imageOpacity,
|
|
80
|
+
display: "flex",
|
|
81
|
+
justifyContent: "center",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
maxHeight: imageHeight,
|
|
84
|
+
maxWidth: imageWidths,
|
|
85
|
+
overflow: "hidden",
|
|
86
|
+
border: "10px solid ".concat(primaryColor),
|
|
87
|
+
transform: "translateY(".concat(imageTranslateY, "px)")
|
|
88
|
+
}
|
|
89
|
+
}, frame >= 4 && /*#__PURE__*/React.createElement(PausableImg, {
|
|
90
|
+
delayRenderTimeoutInMilliseconds: 62000,
|
|
91
|
+
src: pictureUrl,
|
|
92
|
+
style: {
|
|
93
|
+
objectFit: "cover",
|
|
94
|
+
width: "100%",
|
|
95
|
+
height: "100%",
|
|
96
|
+
transform: "rotate(".concat(imageRotation, "deg)")
|
|
97
|
+
}
|
|
98
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
style: {
|
|
100
|
+
fontFamily: fontFamily,
|
|
101
|
+
display: "flex",
|
|
102
|
+
flexDirection: "column"
|
|
103
|
+
}
|
|
104
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
style: {
|
|
106
|
+
fontSize: "".concat(fullNameFontSize, "px"),
|
|
107
|
+
fontWeight: 900,
|
|
108
|
+
color: primaryContrast,
|
|
109
|
+
display: "flex",
|
|
110
|
+
textTransform: "uppercase",
|
|
111
|
+
flexDirection: "column"
|
|
112
|
+
}
|
|
113
|
+
}, fullNameLines.map(function (line) {
|
|
114
|
+
var index = 0;
|
|
115
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
116
|
+
style: {
|
|
117
|
+
display: "flex",
|
|
118
|
+
gap: "10px",
|
|
119
|
+
justifyContent: lineJustifyContent[alignment]
|
|
120
|
+
}
|
|
121
|
+
}, line.split(" ").map(function (word) {
|
|
122
|
+
var delay = Math.min(index * fullNameDelayBetweenWords, maxTimeInFrames);
|
|
123
|
+
index++;
|
|
124
|
+
var opacity = interpolate(frame - delay, [0, 15], [0, 1], {
|
|
125
|
+
easing: Easing["in"](Easing.ease),
|
|
126
|
+
extrapolateRight: "clamp"
|
|
127
|
+
});
|
|
128
|
+
var translateY = interpolate(frame - delay, [0, 15], [-50, 0], {
|
|
129
|
+
easing: Easing["in"](Easing.ease),
|
|
130
|
+
extrapolateRight: "clamp"
|
|
131
|
+
});
|
|
132
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
133
|
+
style: {
|
|
134
|
+
opacity: opacity,
|
|
135
|
+
transform: "translateY(".concat(translateY, "px)")
|
|
136
|
+
}
|
|
137
|
+
}, word);
|
|
138
|
+
}));
|
|
139
|
+
})), splitTitle && /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
style: {
|
|
141
|
+
fontSize: "".concat(titleFontSize, "px"),
|
|
142
|
+
fontWeight: 900,
|
|
143
|
+
color: primaryColor,
|
|
144
|
+
display: "flex",
|
|
145
|
+
flexDirection: "column"
|
|
146
|
+
}
|
|
147
|
+
}, titleLines.map(function (line) {
|
|
148
|
+
var index = 0;
|
|
149
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
style: {
|
|
151
|
+
display: "flex",
|
|
152
|
+
gap: "10px",
|
|
153
|
+
justifyContent: lineJustifyContent[alignment]
|
|
154
|
+
}
|
|
155
|
+
}, line.split(" ").map(function (word) {
|
|
156
|
+
var delay = Math.min(index * titleDelayBetweenWords, maxTimeInFrames);
|
|
157
|
+
var opacity = interpolate(frame - delay, [0, 15], [0, 1], {
|
|
158
|
+
easing: Easing["in"](Easing.ease),
|
|
159
|
+
extrapolateRight: "clamp"
|
|
160
|
+
});
|
|
161
|
+
var translateY = interpolate(frame - delay, [0, 15], [50, 0], {
|
|
162
|
+
easing: Easing["in"](Easing.ease),
|
|
163
|
+
extrapolateRight: "clamp"
|
|
164
|
+
});
|
|
165
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
166
|
+
style: {
|
|
167
|
+
opacity: opacity,
|
|
168
|
+
transform: "translateY(".concat(translateY, "px)")
|
|
169
|
+
}
|
|
170
|
+
}, word);
|
|
171
|
+
}));
|
|
172
|
+
}))));
|
|
173
|
+
};
|