@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,52 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
3
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
4
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
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); }
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
9
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
12
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
13
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
14
|
+
import { Layout } from "./DefaultLayout.js";
|
|
15
|
+
import { getVideoOrientation } from "../../../helpers/getVideoOrientation.js";
|
|
16
|
+
export var variants = {
|
|
17
|
+
LEFT_TO_RIGHT: "LEFT_TO_RIGHT",
|
|
18
|
+
RIGHT_TO_LEFT: "RIGHT_TO_LEFT"
|
|
19
|
+
};
|
|
20
|
+
export var TextWithVideoLayout = /*#__PURE__*/function (_Layout) {
|
|
21
|
+
function TextWithVideoLayout(props) {
|
|
22
|
+
var _this;
|
|
23
|
+
_classCallCheck(this, TextWithVideoLayout);
|
|
24
|
+
_this = _callSuper(this, TextWithVideoLayout, [props]);
|
|
25
|
+
_this.getVideoProps(props);
|
|
26
|
+
_this.getLayoutVariant();
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
_inherits(TextWithVideoLayout, _Layout);
|
|
30
|
+
return _createClass(TextWithVideoLayout, [{
|
|
31
|
+
key: "getLayoutVariant",
|
|
32
|
+
value: function getLayoutVariant() {
|
|
33
|
+
if (this.props.variant) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.props.variant = [variants.LEFT_TO_RIGHT, variants.RIGHT_TO_LEFT][process.env.REACT_APP_DOMAIN ? 0 : Math.floor(Math.random() * 2)];
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
39
|
+
key: "getVideoProps",
|
|
40
|
+
value: function getVideoProps(props) {
|
|
41
|
+
var _props$data$sourceVid, _props$data$sourceVid2, _props$data$sourceVid3, _props$data;
|
|
42
|
+
var sourceVideoOrientation = getVideoOrientation((_props$data$sourceVid = props.data.sourceVideo) === null || _props$data$sourceVid === void 0 ? void 0 : _props$data$sourceVid.aspectRatio);
|
|
43
|
+
this.props = {
|
|
44
|
+
videoUrl: (_props$data$sourceVid2 = props.data.sourceVideo) === null || _props$data$sourceVid2 === void 0 ? void 0 : _props$data$sourceVid2.videoUrl,
|
|
45
|
+
sourceVideoOrientation: sourceVideoOrientation,
|
|
46
|
+
videoZoom: ((_props$data$sourceVid3 = props.data.sourceVideo) === null || _props$data$sourceVid3 === void 0 ? void 0 : _props$data$sourceVid3.zoom) || 1,
|
|
47
|
+
text: props.data.text,
|
|
48
|
+
disableTransitionSounds: (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.disableTransitionSounds
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}]);
|
|
52
|
+
}(Layout);
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
var hexColorRegex = /^#(?:[0-9a-fA-F]{3}){1,2}$/;
|
|
3
|
+
|
|
4
|
+
// Supported values
|
|
5
|
+
var themes = ["default"];
|
|
6
|
+
var orientations = ["landscape", "portrait", "square"];
|
|
7
|
+
var segmentTypes = ["segment", "effect", "caption", "audio"];
|
|
8
|
+
var fps = [30, 60];
|
|
9
|
+
var effectSchema = z.object({
|
|
10
|
+
type: z.string(),
|
|
11
|
+
data: {
|
|
12
|
+
sourceVideo: z.object({
|
|
13
|
+
videoUrl: z.string().url(),
|
|
14
|
+
start: z.number()
|
|
15
|
+
}).optional(),
|
|
16
|
+
offset: z.number(),
|
|
17
|
+
duration: z.number()
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export var screenplaySchema = z.object({
|
|
21
|
+
input: z.object({
|
|
22
|
+
backgroundColor: z.string().regex(hexColorRegex),
|
|
23
|
+
primaryColor: z.string().regex(hexColorRegex),
|
|
24
|
+
accentColor: z.string().regex(hexColorRegex),
|
|
25
|
+
theme: z["enum"](themes)
|
|
26
|
+
}),
|
|
27
|
+
tracks: z.array(z.union([z.object({
|
|
28
|
+
type: "segments"
|
|
29
|
+
}), z.object({
|
|
30
|
+
type: "segmentx"
|
|
31
|
+
})])),
|
|
32
|
+
/* z.object({
|
|
33
|
+
type: "segment",
|
|
34
|
+
segments: z.array(
|
|
35
|
+
z.object({
|
|
36
|
+
layout: z.any(),
|
|
37
|
+
effects: z.array(effectSchema),
|
|
38
|
+
})
|
|
39
|
+
),
|
|
40
|
+
})*/
|
|
41
|
+
/*z.object({
|
|
42
|
+
type: "effect",
|
|
43
|
+
segments: z.array(effectSchema),
|
|
44
|
+
}),
|
|
45
|
+
z.object({
|
|
46
|
+
type: z.enum(segmentTypes),
|
|
47
|
+
segments: z.array([
|
|
48
|
+
{
|
|
49
|
+
type: "caption",
|
|
50
|
+
segments: z.array(
|
|
51
|
+
z.object({
|
|
52
|
+
type: "caption_simple",
|
|
53
|
+
data: {
|
|
54
|
+
transcript_text: z.array(
|
|
55
|
+
z.object({
|
|
56
|
+
text: z.string(),
|
|
57
|
+
offset: z.number(),
|
|
58
|
+
duration: z.number(),
|
|
59
|
+
})
|
|
60
|
+
),
|
|
61
|
+
duration: z.number().optional(),
|
|
62
|
+
offset: z.number().optional(),
|
|
63
|
+
},
|
|
64
|
+
})
|
|
65
|
+
),
|
|
66
|
+
},
|
|
67
|
+
]),
|
|
68
|
+
}),
|
|
69
|
+
z.object({
|
|
70
|
+
type: "audio",
|
|
71
|
+
segments: z.array([
|
|
72
|
+
z.object({
|
|
73
|
+
type: z.string(),
|
|
74
|
+
data: {
|
|
75
|
+
sourceAudio: {
|
|
76
|
+
url: z.string().url(),
|
|
77
|
+
volume: z.number().min(0).max(1),
|
|
78
|
+
start: z.number(),
|
|
79
|
+
},
|
|
80
|
+
offset: z.number(),
|
|
81
|
+
},
|
|
82
|
+
}),
|
|
83
|
+
]),
|
|
84
|
+
}),*/
|
|
85
|
+
output: z.object({
|
|
86
|
+
orientation: z["enum"](orientations),
|
|
87
|
+
fps: z.number().step(30).min(30).max(60),
|
|
88
|
+
callbackUrl: z.string().url().optional(),
|
|
89
|
+
callbackMetadata: z.any().optional()
|
|
90
|
+
})
|
|
91
|
+
});
|
|
92
|
+
var validate = function validate() {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { SimpleFrame } from "./components/layouts/SimpleFrame";
|
|
2
|
+
import { TextWithVideo } from "./components/layouts/TextWithVideo";
|
|
3
|
+
import { BrollFullscreen } from "./components/effects/BrollFullscreen";
|
|
4
|
+
import { PhraseRainbowEffect } from "./components/effects/PhraseRainbowEffect";
|
|
5
|
+
import { Sentence } from "./components/effects/Sentence";
|
|
6
|
+
import { CaptionSimple } from "./components/captions/CaptionSimple";
|
|
7
|
+
import { Soundtrack } from "./tracks/Soundtrack";
|
|
8
|
+
import { Nametag } from "./components/effects/Nametag";
|
|
9
|
+
import { Title } from "./components/effects/Title";
|
|
10
|
+
import { Watermark } from "./tracks/Watermark";
|
|
11
|
+
import { Handoff } from "./components/layouts/Handoff";
|
|
12
|
+
import { HandoffNametag } from "./components/effects/HandoffNametag";
|
|
13
|
+
import { MotionStill } from "./components/layouts/MotionStill";
|
|
14
|
+
import { Keyword } from "./components/layouts/Keyword";
|
|
15
|
+
import { CaptionColor } from "./theme/themes/default/CaptionColor";
|
|
16
|
+
import { CaptionColorInverse } from "./theme/themes/default/CaptionColorInverse";
|
|
17
|
+
import { CaptionColorShadow } from "./theme/themes/default/CaptionColorShadow";
|
|
18
|
+
import { CaptionPunctuated } from "./theme/themes/default/CaptionPunctuated";
|
|
19
|
+
import { SimpleFrameBroll } from "./components/layouts/SimpleFrameBroll";
|
|
20
|
+
import { SimpleFrameSentence } from "./components/layouts/SimpleFrameSentence";
|
|
21
|
+
import { SimpleFrameZoomCut } from "./components/layouts/SimpleFrameZoomCut";
|
|
22
|
+
import { BrollSplitScreen } from "./components/layouts/BrollSplitScreen";
|
|
23
|
+
import { CaptionWordBoom } from "./theme/themes/default/CaptionWordBoom";
|
|
24
|
+
import { CaptionWordBubble } from "./theme/themes/default/CaptionWordBubble";
|
|
25
|
+
import { CaptionWordPopup } from "./theme/themes/default/CaptionWordPopup";
|
|
26
|
+
import { CaptionEmphasis } from "./theme/themes/default/CaptionEmphasis";
|
|
27
|
+
import { CaptionElegant } from "./theme/themes/default/CaptionElegant";
|
|
28
|
+
import { BrollGreenScreen } from "./components/layouts/BrollGreenScreen";
|
|
29
|
+
import { IntroVideo } from "./components/layouts/IntroVideo";
|
|
30
|
+
import StretchText from "./components/utils/StretchText";
|
|
31
|
+
import StretchTextDemo from "./components/utils/StretchTextDemo";
|
|
32
|
+
import { KeyPointOverlayDepth } from "./components/layouts/KeyPointOverlayDepth";
|
|
33
|
+
import { BrollStudioBackdrop } from "./components/layouts/BrollStudioBackdrop";
|
|
34
|
+
import { MotionStillFullScreen } from "./components/layouts/MotionStillFullScreen";
|
|
35
|
+
import { MotionStillStudioBackdrop } from "./components/layouts/MotionStillStudioBackdrop";
|
|
36
|
+
import { MotionStillGreenScreen } from "./components/layouts/MotionStillGreenScreen";
|
|
37
|
+
import { DynamicTriangle } from "./components/layouts/DynamicTriangle";
|
|
38
|
+
import { KeywordStudioBackdrop } from "./components/layouts/KeywordStudioBackdrop";
|
|
39
|
+
import { MotionStillGreenScreenV2 } from "./components/layouts/MotionStillGreenScreenV2";
|
|
40
|
+
|
|
41
|
+
/** Update this so that Remotion knows which component to render when it is passed via screenplay. Ex. "title" will have rendered "Title" component
|
|
42
|
+
* Here we are mapping directly types and component names. Types are snake_case and components PascalCase.
|
|
43
|
+
* */
|
|
44
|
+
export var RegisteredComponents = {
|
|
45
|
+
// Layouts
|
|
46
|
+
SimpleFrame: SimpleFrame,
|
|
47
|
+
SimpleFrameBroll: SimpleFrameBroll,
|
|
48
|
+
SimpleFrameSentence: SimpleFrameSentence,
|
|
49
|
+
SimpleFrameZoomCut: SimpleFrameZoomCut,
|
|
50
|
+
TextWithVideo: TextWithVideo,
|
|
51
|
+
Handoff: Handoff,
|
|
52
|
+
MotionStill: MotionStill,
|
|
53
|
+
MotionStillFullScreen: MotionStillFullScreen,
|
|
54
|
+
MotionStillGreenScreen: MotionStillGreenScreenV2,
|
|
55
|
+
MotionStillStudioBackdrop: MotionStillStudioBackdrop,
|
|
56
|
+
KeywordStudioBackdrop: KeywordStudioBackdrop,
|
|
57
|
+
Keyword: Keyword,
|
|
58
|
+
BrollSplitScreen: BrollSplitScreen,
|
|
59
|
+
BrollGreenScreen: BrollGreenScreen,
|
|
60
|
+
BrollStudioBackdrop: BrollStudioBackdrop,
|
|
61
|
+
IntroVideo: IntroVideo,
|
|
62
|
+
StretchTextDemo: StretchTextDemo,
|
|
63
|
+
KeyPointOverlayDepth: KeyPointOverlayDepth,
|
|
64
|
+
DynamicTriangle: DynamicTriangle,
|
|
65
|
+
//effects
|
|
66
|
+
BrollFullscreen: BrollFullscreen,
|
|
67
|
+
PhraseRainbowEffect: PhraseRainbowEffect,
|
|
68
|
+
SentenceSimple: Sentence,
|
|
69
|
+
NametagFold: Nametag,
|
|
70
|
+
Nametag: Nametag,
|
|
71
|
+
Title: Title,
|
|
72
|
+
Sentence: Sentence,
|
|
73
|
+
Watermark: Watermark,
|
|
74
|
+
HandoffNametag: HandoffNametag,
|
|
75
|
+
//captions,
|
|
76
|
+
CaptionSimple: CaptionSimple,
|
|
77
|
+
Caption: CaptionSimple,
|
|
78
|
+
CaptionPunctuated: CaptionPunctuated,
|
|
79
|
+
CaptionWordBoom: CaptionWordBoom,
|
|
80
|
+
CaptionWordBubble: CaptionWordBubble,
|
|
81
|
+
CaptionWordPopup: CaptionWordPopup,
|
|
82
|
+
CaptionElegant: CaptionElegant,
|
|
83
|
+
CaptionColor: CaptionColor,
|
|
84
|
+
CaptionColorInverse: CaptionColorInverse,
|
|
85
|
+
CaptionColorShadow: CaptionColorShadow,
|
|
86
|
+
CaptionEmphasis: CaptionEmphasis,
|
|
87
|
+
//Audio
|
|
88
|
+
Soundtrack: Soundtrack,
|
|
89
|
+
//Utils
|
|
90
|
+
StretchText: StretchText
|
|
91
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
var THEMES = {
|
|
6
|
+
basic: "basic"
|
|
7
|
+
};
|
|
8
|
+
var themeData = _defineProperty({}, THEMES.basic, {});
|
|
@@ -0,0 +1,24 @@
|
|
|
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
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); }
|
|
7
|
+
import { useVideoConfig } from "remotion";
|
|
8
|
+
export var useTheme = function useTheme() {
|
|
9
|
+
var _props$input, _props$input2, _props$input3, _props$input4;
|
|
10
|
+
var _useVideoConfig = useVideoConfig(),
|
|
11
|
+
videoConfigProps = _useVideoConfig.props;
|
|
12
|
+
var screenPlayProps = window.screenplayProps;
|
|
13
|
+
var props = _objectSpread(_objectSpread({}, screenPlayProps), videoConfigProps);
|
|
14
|
+
var primaryColor = props === null || props === void 0 ? void 0 : (_props$input = props.input) === null || _props$input === void 0 ? void 0 : _props$input.primaryColor;
|
|
15
|
+
var primaryContrast = props === null || props === void 0 ? void 0 : (_props$input2 = props.input) === null || _props$input2 === void 0 ? void 0 : _props$input2.primaryContrast;
|
|
16
|
+
var accentColor = props === null || props === void 0 ? void 0 : (_props$input3 = props.input) === null || _props$input3 === void 0 ? void 0 : _props$input3.accentColor;
|
|
17
|
+
var accentContrast = props === null || props === void 0 ? void 0 : (_props$input4 = props.input) === null || _props$input4 === void 0 ? void 0 : _props$input4.accentContrast;
|
|
18
|
+
return {
|
|
19
|
+
primaryColor: primaryColor,
|
|
20
|
+
primaryContrast: primaryContrast,
|
|
21
|
+
accentColor: accentColor,
|
|
22
|
+
accentContrast: accentContrast
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { useVideoConfig } from "remotion";
|
|
2
|
+
import { Title as DefaultTitle } from "../themes/default/Title";
|
|
3
|
+
import { Nametag as DefaultNametag } from "../themes/default/Nametag";
|
|
4
|
+
import { Sentence as DefaultSentence } from "../themes/default/Sentence";
|
|
5
|
+
import { HandoffNametag as DefaultHandoffNametag } from "../themes/default/HandoffNametag";
|
|
6
|
+
import { GlitchTitle } from "../themes/glitch/GlitchTitle";
|
|
7
|
+
import { Title as GlassTitle } from "../themes/glassmorphism/Title";
|
|
8
|
+
import { Nametag as GlassNametag } from "../themes/glassmorphism/Nametag";
|
|
9
|
+
import { Sentence as GlassSentence } from "../themes/glassmorphism/Sentence";
|
|
10
|
+
import { SportsNametag } from "../themes/sports/Nametag";
|
|
11
|
+
import { SportsTitle } from "../themes/sports/Title";
|
|
12
|
+
import { DefaultCaption } from "../themes/default/DefaultCaption";
|
|
13
|
+
import { SportsSentence } from "../themes/sports/SportsSentence";
|
|
14
|
+
import { BigBoldNametag } from "../themes/bigbold/BigBoldNameTag";
|
|
15
|
+
import { BigBoldSentence } from "../themes/bigbold/BigBoldSentence";
|
|
16
|
+
import { BigBoldTitle } from "../themes/bigbold/BigBoldTitle";
|
|
17
|
+
import { SportsBounceNametag } from "../themes/sportsbounce/Nametag";
|
|
18
|
+
import { SportsBounceSentence } from "../themes/sportsbounce/SportsBounceSentence";
|
|
19
|
+
import { SportsBounceTitle } from "../themes/sportsbounce/Title";
|
|
20
|
+
import { PushPullNametag } from "../themes/pushpull/PushPullNametag";
|
|
21
|
+
import { PushPullSentence } from "../themes/pushpull/PushPullSentence";
|
|
22
|
+
import { PushPullTitle } from "../themes/pushpull/PushPullTitle";
|
|
23
|
+
import { GlitchNametag } from "../themes/glitch/GlitchNametag";
|
|
24
|
+
import { GlitchSentence } from "../themes/glitch/GlitchSentence";
|
|
25
|
+
import { NoneNametag } from "../themes/none/Nametag";
|
|
26
|
+
import { NoneTitle } from "../themes/none/Title";
|
|
27
|
+
import { KeyPointOverlayDepth } from "../../components/layouts/KeyPointOverlayDepth";
|
|
28
|
+
|
|
29
|
+
/** Always update this when adding a new theme and/or components. */
|
|
30
|
+
var themedComponents = {
|
|
31
|
+
"default": {
|
|
32
|
+
Title: DefaultTitle,
|
|
33
|
+
Nametag: DefaultNametag,
|
|
34
|
+
Sentence: DefaultSentence,
|
|
35
|
+
Caption: DefaultCaption,
|
|
36
|
+
HandoffNametag: DefaultHandoffNametag
|
|
37
|
+
},
|
|
38
|
+
glitch: {
|
|
39
|
+
Title: GlitchTitle,
|
|
40
|
+
Nametag: GlitchNametag,
|
|
41
|
+
Sentence: GlitchSentence
|
|
42
|
+
},
|
|
43
|
+
glassmorphism: {
|
|
44
|
+
Title: GlassTitle,
|
|
45
|
+
Nametag: GlassNametag,
|
|
46
|
+
Sentence: GlassSentence
|
|
47
|
+
},
|
|
48
|
+
sports: {
|
|
49
|
+
Nametag: SportsNametag,
|
|
50
|
+
Title: SportsTitle,
|
|
51
|
+
Sentence: SportsSentence
|
|
52
|
+
},
|
|
53
|
+
sportsbounce: {
|
|
54
|
+
Nametag: SportsBounceNametag,
|
|
55
|
+
Title: SportsBounceTitle,
|
|
56
|
+
Sentence: SportsBounceSentence
|
|
57
|
+
},
|
|
58
|
+
bigbold: {
|
|
59
|
+
Nametag: BigBoldNametag,
|
|
60
|
+
Title: BigBoldTitle,
|
|
61
|
+
Sentence: BigBoldSentence
|
|
62
|
+
},
|
|
63
|
+
pushpull: {
|
|
64
|
+
Nametag: PushPullNametag,
|
|
65
|
+
Sentence: PushPullSentence,
|
|
66
|
+
Title: PushPullTitle
|
|
67
|
+
},
|
|
68
|
+
none: {
|
|
69
|
+
Nametag: NoneNametag,
|
|
70
|
+
Title: NoneTitle
|
|
71
|
+
},
|
|
72
|
+
depth: {
|
|
73
|
+
Sentence: KeyPointOverlayDepth
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
export var useThemedComponents = function useThemedComponents(componentName, overrideTheme) {
|
|
77
|
+
var _useVideoConfig = useVideoConfig(),
|
|
78
|
+
_useVideoConfig$props = _useVideoConfig.props.output,
|
|
79
|
+
_useVideoConfig$props2 = _useVideoConfig$props === void 0 ? {
|
|
80
|
+
theme: window.screenplayProps.output.theme
|
|
81
|
+
} : _useVideoConfig$props,
|
|
82
|
+
_useVideoConfig$props3 = _useVideoConfig$props2.theme,
|
|
83
|
+
theme = _useVideoConfig$props3 === void 0 ? "default" : _useVideoConfig$props3;
|
|
84
|
+
var getThemedComponent = function getThemedComponent() {
|
|
85
|
+
if (!componentName) {
|
|
86
|
+
throw new Error("You must specify componentName prop, got ".concat(componentName));
|
|
87
|
+
}
|
|
88
|
+
if (!themedComponents["default"][componentName]) {
|
|
89
|
+
throw new Error("Component is not implemented, possible components ".concat(Object.keys(themedComponents["default"]).join(", "), ", got ").concat(componentName));
|
|
90
|
+
}
|
|
91
|
+
if (!themedComponents[theme]) {
|
|
92
|
+
throw new Error("Invalid theme. Supported themes [".concat(Object.keys(themedComponents).join(", "), "], got ").concat(theme));
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
return themedComponents[overrideTheme || theme][componentName] || themedComponents["default"][componentName];
|
|
96
|
+
} catch (error) {
|
|
97
|
+
return themedComponents["default"][componentName] || null;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
return getThemedComponent(componentName);
|
|
101
|
+
};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Easing, spring, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
|
+
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
3
|
+
import { loadFont } from "@remotion/google-fonts/Montserrat";
|
|
4
|
+
import { useTimeInterpolate } from "../../../hooks/useTimeInterpolate.js";
|
|
5
|
+
import { convertToSeconds } from "../../../helpers/convertToSeconds.js";
|
|
6
|
+
import { useTheme } from "../../hooks/useTheme.js";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { getContrastColor } from "../../../helpers/getContrastColor";
|
|
9
|
+
var _loadFont = loadFont(),
|
|
10
|
+
fontFamily = _loadFont.fontFamily;
|
|
11
|
+
export var BigBoldNametag = function BigBoldNametag(_ref) {
|
|
12
|
+
var name = _ref.name,
|
|
13
|
+
title = _ref.title,
|
|
14
|
+
themeSettings = _ref.themeSettings;
|
|
15
|
+
var frame = useCurrentFrame();
|
|
16
|
+
var _useVideoConfig = useVideoConfig(),
|
|
17
|
+
fps = _useVideoConfig.fps,
|
|
18
|
+
width = _useVideoConfig.width;
|
|
19
|
+
var _useOrientationBased = useOrientationBased({
|
|
20
|
+
portrait: {
|
|
21
|
+
bottom: "52%",
|
|
22
|
+
left: "6%",
|
|
23
|
+
top: undefined,
|
|
24
|
+
maxWidth: width * 0.8,
|
|
25
|
+
nameFontSize: width * 0.12,
|
|
26
|
+
titleFontSize: width * 0.1
|
|
27
|
+
},
|
|
28
|
+
landscape: {
|
|
29
|
+
top: undefined,
|
|
30
|
+
left: "4.5%",
|
|
31
|
+
bottom: "65%",
|
|
32
|
+
maxWidth: width * 0.42,
|
|
33
|
+
nameFontSize: width * 0.07,
|
|
34
|
+
titleFontSize: width * 0.05
|
|
35
|
+
},
|
|
36
|
+
square: {
|
|
37
|
+
bottom: "64%",
|
|
38
|
+
left: "4%",
|
|
39
|
+
top: undefined,
|
|
40
|
+
maxWidth: width * 0.8,
|
|
41
|
+
nameFontSize: width * 0.11,
|
|
42
|
+
titleFontSize: width * 0.08
|
|
43
|
+
}
|
|
44
|
+
}),
|
|
45
|
+
top = _useOrientationBased.top,
|
|
46
|
+
left = _useOrientationBased.left,
|
|
47
|
+
bottom = _useOrientationBased.bottom,
|
|
48
|
+
maxWidth = _useOrientationBased.maxWidth,
|
|
49
|
+
nameFontSize = _useOrientationBased.nameFontSize,
|
|
50
|
+
titleFontSize = _useOrientationBased.titleFontSize;
|
|
51
|
+
var _useTheme = useTheme(),
|
|
52
|
+
primaryColor = _useTheme.primaryColor,
|
|
53
|
+
primaryContrast = _useTheme.primaryContrast,
|
|
54
|
+
accentColor = _useTheme.accentColor,
|
|
55
|
+
accentContrast = _useTheme.accentContrast;
|
|
56
|
+
var nameScale = spring({
|
|
57
|
+
frame: frame,
|
|
58
|
+
fps: fps,
|
|
59
|
+
from: 0,
|
|
60
|
+
// Start from above
|
|
61
|
+
to: 100,
|
|
62
|
+
// Move to its original position
|
|
63
|
+
stiffness: 300,
|
|
64
|
+
// Increase stiffness for a more pronounced bounce
|
|
65
|
+
damping: 20,
|
|
66
|
+
// Decrease damping to allow more bounce
|
|
67
|
+
durationInFrames: 15 // Duration for the bounce
|
|
68
|
+
});
|
|
69
|
+
var nameEndTime = convertToSeconds(5 / fps, 0);
|
|
70
|
+
var titleScale = spring({
|
|
71
|
+
frame: frame - nameEndTime * fps,
|
|
72
|
+
fps: fps,
|
|
73
|
+
from: 0,
|
|
74
|
+
// Start from above
|
|
75
|
+
to: 50,
|
|
76
|
+
// Move to its original position
|
|
77
|
+
stiffness: 300,
|
|
78
|
+
// Increase stiffness for a more pronounced bounce
|
|
79
|
+
damping: 500,
|
|
80
|
+
// Decrease damping to allow more bounce
|
|
81
|
+
durationInFrames: 15 // Duration for the bounce
|
|
82
|
+
});
|
|
83
|
+
var titleScaleEndTime = nameEndTime + convertToSeconds(25 / fps, 0);
|
|
84
|
+
var disappearPos = useTimeInterpolate([titleScaleEndTime + 1, titleScaleEndTime + 1.5], [0, 2000], {
|
|
85
|
+
easing: Easing.out(Easing.cubic),
|
|
86
|
+
extrapolateRight: "clamp",
|
|
87
|
+
extrapolateLeft: "clamp"
|
|
88
|
+
});
|
|
89
|
+
var nameTextColor = (themeSettings === null || themeSettings === void 0 ? void 0 : themeSettings.primaryColor) || primaryColor;
|
|
90
|
+
var nameShadowColor = getContrastColor(nameTextColor);
|
|
91
|
+
var titleTextColor = (themeSettings === null || themeSettings === void 0 ? void 0 : themeSettings.secondaryColor) || accentColor;
|
|
92
|
+
var titleShadowColor = getContrastColor(titleTextColor);
|
|
93
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
style: {
|
|
95
|
+
position: "absolute",
|
|
96
|
+
display: "flex",
|
|
97
|
+
flexDirection: "column",
|
|
98
|
+
left: left,
|
|
99
|
+
bottom: bottom,
|
|
100
|
+
top: top,
|
|
101
|
+
fontFamily: fontFamily,
|
|
102
|
+
fontWeight: "900"
|
|
103
|
+
}
|
|
104
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
style: {
|
|
106
|
+
width: "fit-content",
|
|
107
|
+
fontSize: nameFontSize,
|
|
108
|
+
position: "relative",
|
|
109
|
+
isolation: "isolate"
|
|
110
|
+
}
|
|
111
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
style: {
|
|
113
|
+
position: "absolute",
|
|
114
|
+
display: "flex",
|
|
115
|
+
flexDirection: "column",
|
|
116
|
+
fontFamily: fontFamily,
|
|
117
|
+
top: 50,
|
|
118
|
+
fontWeight: "900"
|
|
119
|
+
}
|
|
120
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
style: {
|
|
122
|
+
textShadow: "5px 5px ".concat(nameShadowColor),
|
|
123
|
+
rotationPoint: "0% 100%",
|
|
124
|
+
left: "10",
|
|
125
|
+
position: "relative",
|
|
126
|
+
color: nameTextColor,
|
|
127
|
+
fontSize: nameFontSize,
|
|
128
|
+
width: maxWidth,
|
|
129
|
+
whiteSpace: "wrap",
|
|
130
|
+
transformOrigin: "left",
|
|
131
|
+
transform: "translateX(".concat(disappearPos, "px) scale(").concat(nameScale, "%)")
|
|
132
|
+
}
|
|
133
|
+
}, name), /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
style: {
|
|
135
|
+
position: "relative",
|
|
136
|
+
top: -50,
|
|
137
|
+
left: 20,
|
|
138
|
+
textShadow: "5px 5px ".concat(titleShadowColor),
|
|
139
|
+
whiteSpace: "wrap",
|
|
140
|
+
width: maxWidth + 350,
|
|
141
|
+
color: titleTextColor,
|
|
142
|
+
fontSize: titleFontSize,
|
|
143
|
+
transformOrigin: "left",
|
|
144
|
+
transform: "translateX(".concat(-disappearPos, "px) scale(").concat(titleScale, "%)")
|
|
145
|
+
}
|
|
146
|
+
}, title)));
|
|
147
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { AbsoluteFill, Easing, useCurrentFrame, useVideoConfig } from "remotion";
|
|
2
|
+
import { timeInterpolate, useTimeInterpolate } from "../../../hooks/useTimeInterpolate.js";
|
|
3
|
+
import { convertToSeconds } from "../../../helpers/convertToSeconds.js";
|
|
4
|
+
import { loadFont } from "@remotion/google-fonts/Montserrat";
|
|
5
|
+
import { CHROME_PADDING } from "../../../config.js";
|
|
6
|
+
import { distributeTextToFit } from "../default/Sentence/SentenceSimple.helpers.js";
|
|
7
|
+
import { useOrientationBased } from "../../../hooks/useOrientationBased.js";
|
|
8
|
+
import React from "react";
|
|
9
|
+
var _loadFont = loadFont(),
|
|
10
|
+
fontFamily = _loadFont.fontFamily;
|
|
11
|
+
export var BigBoldSentence = function BigBoldSentence(_ref) {
|
|
12
|
+
var sentence = _ref.sentence;
|
|
13
|
+
var _useVideoConfig = useVideoConfig(),
|
|
14
|
+
fps = _useVideoConfig.fps;
|
|
15
|
+
var frame = useCurrentFrame();
|
|
16
|
+
|
|
17
|
+
// Calculate time-based values using convertToSeconds
|
|
18
|
+
var disappearStartTime = convertToSeconds(3.5, 0);
|
|
19
|
+
var disappearDuration = convertToSeconds(1, 0);
|
|
20
|
+
var startScaleTime = convertToSeconds(0, 0); // Start at 0 seconds
|
|
21
|
+
var endScaleTime = convertToSeconds(0.5, 0); // End at 0.5 seconds
|
|
22
|
+
|
|
23
|
+
var _useVideoConfig2 = useVideoConfig(),
|
|
24
|
+
width = _useVideoConfig2.width,
|
|
25
|
+
height = _useVideoConfig2.height;
|
|
26
|
+
|
|
27
|
+
// Adjust rectangleWidth calculation to use an appropriate time range
|
|
28
|
+
var rectangleWidth = useTimeInterpolate([startScaleTime, endScaleTime],
|
|
29
|
+
// Input range in seconds
|
|
30
|
+
[0, width],
|
|
31
|
+
// Output range for width
|
|
32
|
+
{
|
|
33
|
+
easing: Easing.out(Easing.cubic),
|
|
34
|
+
extrapolateLeft: "clamp",
|
|
35
|
+
extrapolateRight: "clamp"
|
|
36
|
+
});
|
|
37
|
+
var disappearScale = useTimeInterpolate([disappearStartTime, disappearStartTime + disappearDuration], [1, 1.5], {
|
|
38
|
+
easing: Easing.out(Easing.cubic),
|
|
39
|
+
extrapolateLeft: "clamp",
|
|
40
|
+
extrapolateRight: "clamp"
|
|
41
|
+
});
|
|
42
|
+
var opacity = useTimeInterpolate([disappearStartTime, disappearStartTime + disappearDuration], [1, 0], {
|
|
43
|
+
easing: Easing.out(Easing.cubic),
|
|
44
|
+
extrapolateLeft: "clamp",
|
|
45
|
+
extrapolateRight: "clamp"
|
|
46
|
+
});
|
|
47
|
+
var _useOrientationBased = useOrientationBased({
|
|
48
|
+
landscape: {
|
|
49
|
+
alignItems: "end",
|
|
50
|
+
justifyContent: "center",
|
|
51
|
+
maxFontSize: 120,
|
|
52
|
+
size: {
|
|
53
|
+
width: width * 0.45,
|
|
54
|
+
height: height * 0.95
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
portrait: {
|
|
58
|
+
alignItems: "end",
|
|
59
|
+
justifyContent: "start",
|
|
60
|
+
maxFontSize: 120,
|
|
61
|
+
size: {
|
|
62
|
+
width: width * 0.7,
|
|
63
|
+
height: height * 0.8
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
square: {
|
|
67
|
+
size: {
|
|
68
|
+
width: width * 0.68,
|
|
69
|
+
height: height * 0.9
|
|
70
|
+
},
|
|
71
|
+
maxFontSize: 120,
|
|
72
|
+
alignItems: "end",
|
|
73
|
+
justifyContent: "start"
|
|
74
|
+
}
|
|
75
|
+
}),
|
|
76
|
+
alignItems = _useOrientationBased.alignItems,
|
|
77
|
+
justifyContent = _useOrientationBased.justifyContent,
|
|
78
|
+
size = _useOrientationBased.size,
|
|
79
|
+
maxFontSize = _useOrientationBased.maxFontSize;
|
|
80
|
+
var _distributeTextToFit = distributeTextToFit(sentence, size.width, size.height, maxFontSize),
|
|
81
|
+
lines = _distributeTextToFit.lines,
|
|
82
|
+
fontSize = _distributeTextToFit.fontSize;
|
|
83
|
+
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
84
|
+
style: {
|
|
85
|
+
display: "flex",
|
|
86
|
+
alignItems: alignItems,
|
|
87
|
+
justifyContent: justifyContent,
|
|
88
|
+
marginTop: 0
|
|
89
|
+
}
|
|
90
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
style: {
|
|
92
|
+
position: "absolute",
|
|
93
|
+
width: rectangleWidth,
|
|
94
|
+
height: height,
|
|
95
|
+
// Adjust height as needed
|
|
96
|
+
backgroundColor: "#00000066",
|
|
97
|
+
// Adjust color as needed
|
|
98
|
+
transformOrigin: "center",
|
|
99
|
+
transform: "scale(".concat(disappearScale, ")"),
|
|
100
|
+
opacity: opacity
|
|
101
|
+
}
|
|
102
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
style: {
|
|
104
|
+
padding: CHROME_PADDING * 2
|
|
105
|
+
}
|
|
106
|
+
}, lines.map(function (line, lineIndex) {
|
|
107
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
108
|
+
key: lineIndex,
|
|
109
|
+
style: {
|
|
110
|
+
display: "flex",
|
|
111
|
+
flexDirection: "row",
|
|
112
|
+
justifyContent: "flex-end"
|
|
113
|
+
}
|
|
114
|
+
}, line.split(" ").map(function (word, wordIndex) {
|
|
115
|
+
// alert(lines);
|
|
116
|
+
var delayTime = convertToSeconds(0.6, lineIndex * 0.1 * 24 + wordIndex * 0.1 * 24);
|
|
117
|
+
var scale = timeInterpolate([delayTime, delayTime + convertToSeconds(1, 0)], [4000, 1], {
|
|
118
|
+
easing: Easing.out(Easing.cubic),
|
|
119
|
+
extrapolateLeft: "clamp",
|
|
120
|
+
extrapolateRight: "clamp"
|
|
121
|
+
}, fps, frame);
|
|
122
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
123
|
+
key: wordIndex,
|
|
124
|
+
style: {
|
|
125
|
+
fontSize: fontSize,
|
|
126
|
+
fontFamily: fontFamily,
|
|
127
|
+
paddingRight: "30px",
|
|
128
|
+
fontWeight: "700",
|
|
129
|
+
textAlign: "right",
|
|
130
|
+
transform: "translateY(".concat(scale, "%)"),
|
|
131
|
+
color: "#fff",
|
|
132
|
+
whiteSpace: "nowrap",
|
|
133
|
+
opacity: opacity // Apply opacity for fade-out effect
|
|
134
|
+
}
|
|
135
|
+
}, word);
|
|
136
|
+
}));
|
|
137
|
+
})));
|
|
138
|
+
};
|