@zync/zync-screnplay-player 0.1.229 → 0.1.230
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/bundle.js +1 -1
- package/dist/bundle.js.LICENSE.txt +13 -26
- package/dist/screenplay/RemotionRenderer/components/layouts/HookVideo.js +23 -42
- package/dist/screenplay/RemotionRenderer/development.js +1 -1
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/HookVideoLayout.js +2 -4
- package/dist/screenplay/RemotionRenderer/main/lib/layouts/SimpleFrameLayout.js +1 -0
- package/dist/screenplay/RemotionRenderer/tracks/LayoutVideoTrack.js +153 -254
- package/package.json +6 -11
- package/dist/renderer.cjs +0 -1
- package/dist/screenplay/RemotionRenderer/components/layouts/HookThreeGlitchOverlay.js +0 -141
|
@@ -9,11 +9,45 @@ import React from "react";
|
|
|
9
9
|
import { RegisteredComponents } from "../registeredComponents";
|
|
10
10
|
import { linearTiming, TransitionSeries } from "@remotion/transitions";
|
|
11
11
|
import { glitchOnePresentation } from "./transitions/GlitchOne";
|
|
12
|
-
import { HookThreeGlitchOverlay } from "../components/layouts/HookThreeGlitchOverlay";
|
|
13
12
|
var HOOK_EXIT_PRE_FRAMES = 8;
|
|
14
13
|
var HOOK_EXIT_POST_FRAMES = 7;
|
|
15
|
-
var
|
|
16
|
-
|
|
14
|
+
var GLITCH_SLAM_TEAR_BARS = [{
|
|
15
|
+
top: 8,
|
|
16
|
+
height: 2.6,
|
|
17
|
+
phase: -4,
|
|
18
|
+
direction: 1,
|
|
19
|
+
weight: 0.72
|
|
20
|
+
}, {
|
|
21
|
+
top: 19,
|
|
22
|
+
height: 4.8,
|
|
23
|
+
phase: -2,
|
|
24
|
+
direction: -1,
|
|
25
|
+
weight: 0.94
|
|
26
|
+
}, {
|
|
27
|
+
top: 35,
|
|
28
|
+
height: 2.2,
|
|
29
|
+
phase: 0,
|
|
30
|
+
direction: 1,
|
|
31
|
+
weight: 0.84
|
|
32
|
+
}, {
|
|
33
|
+
top: 49,
|
|
34
|
+
height: 5.8,
|
|
35
|
+
phase: 1,
|
|
36
|
+
direction: -1,
|
|
37
|
+
weight: 1
|
|
38
|
+
}, {
|
|
39
|
+
top: 64,
|
|
40
|
+
height: 3.2,
|
|
41
|
+
phase: 3,
|
|
42
|
+
direction: 1,
|
|
43
|
+
weight: 0.68
|
|
44
|
+
}, {
|
|
45
|
+
top: 79,
|
|
46
|
+
height: 4.4,
|
|
47
|
+
phase: 4,
|
|
48
|
+
direction: -1,
|
|
49
|
+
weight: 0.78
|
|
50
|
+
}];
|
|
17
51
|
var motionBlurComponents = {
|
|
18
52
|
SentenceSimple: true,
|
|
19
53
|
Sentence: true
|
|
@@ -59,21 +93,14 @@ var isHookExitEffectEnabled = function isHookExitEffectEnabled(_ref) {
|
|
|
59
93
|
props = _ref.props;
|
|
60
94
|
return component === "HookVideo" && hasNextSegment && !isTruthy(props.disableHookExitEffect);
|
|
61
95
|
};
|
|
62
|
-
var isGlitchVerdictHook = function isGlitchVerdictHook(props) {
|
|
63
|
-
return (props === null || props === void 0 ? void 0 : props.hookStyle) === GLITCH_VERDICT_STYLE;
|
|
64
|
-
};
|
|
65
96
|
var withAlpha = function withAlpha(color, alpha) {
|
|
66
97
|
return /^#[0-9a-fA-F]{6}$/.test(color || "") ? "".concat(color).concat(alpha) : color;
|
|
67
98
|
};
|
|
68
|
-
var
|
|
99
|
+
var getHookGlitchSlamShake = function getHookGlitchSlamShake(overlay, frame, width) {
|
|
69
100
|
if (!overlay) {
|
|
70
101
|
return {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
impact: 0,
|
|
74
|
-
cutPulse: 0,
|
|
75
|
-
postDecay: 0,
|
|
76
|
-
tearWindow: 0
|
|
102
|
+
x: 0,
|
|
103
|
+
scale: 1
|
|
77
104
|
};
|
|
78
105
|
}
|
|
79
106
|
var localFrame = frame - overlay.from;
|
|
@@ -94,182 +121,25 @@ var getHookExitPulse = function getHookExitPulse(overlay, frame) {
|
|
|
94
121
|
extrapolateLeft: "clamp",
|
|
95
122
|
extrapolateRight: "clamp"
|
|
96
123
|
});
|
|
97
|
-
var tearWindow = interpolate(Math.abs(relativeFrame), [0, 5, 9], [1, 0.72, 0], {
|
|
98
|
-
extrapolateLeft: "clamp",
|
|
99
|
-
extrapolateRight: "clamp"
|
|
100
|
-
});
|
|
101
|
-
return {
|
|
102
|
-
localFrame: localFrame,
|
|
103
|
-
relativeFrame: relativeFrame,
|
|
104
|
-
impact: impact,
|
|
105
|
-
cutPulse: cutPulse,
|
|
106
|
-
postDecay: postDecay,
|
|
107
|
-
tearWindow: tearWindow
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
var getGlitchVerdictFrameFilter = function getGlitchVerdictFrameFilter(overlay, frame) {
|
|
111
|
-
if (!(overlay !== null && overlay !== void 0 && overlay.useRgbSplit)) {
|
|
112
|
-
return undefined;
|
|
113
|
-
}
|
|
114
|
-
var _getHookExitPulse = getHookExitPulse(overlay, frame),
|
|
115
|
-
impact = _getHookExitPulse.impact,
|
|
116
|
-
cutPulse = _getHookExitPulse.cutPulse,
|
|
117
|
-
tearWindow = _getHookExitPulse.tearWindow;
|
|
118
|
-
var colorCrush = Math.max(impact, cutPulse, tearWindow);
|
|
119
|
-
var saturate = 1 + colorCrush * 1.85;
|
|
120
|
-
var contrast = 1 + colorCrush * 0.82;
|
|
121
|
-
var brightness = 1 - colorCrush * 0.28;
|
|
122
|
-
return "url(#".concat(GLITCH_VERDICT_FILTER_ID, ") saturate(").concat(saturate, ") contrast(").concat(contrast, ") brightness(").concat(brightness, ")");
|
|
123
|
-
};
|
|
124
|
-
var channelMatrix = function channelMatrix(_ref2) {
|
|
125
|
-
var _ref2$r = _ref2.r,
|
|
126
|
-
r = _ref2$r === void 0 ? 0 : _ref2$r,
|
|
127
|
-
_ref2$g = _ref2.g,
|
|
128
|
-
g = _ref2$g === void 0 ? 0 : _ref2$g,
|
|
129
|
-
_ref2$b = _ref2.b,
|
|
130
|
-
b = _ref2$b === void 0 ? 0 : _ref2$b,
|
|
131
|
-
_ref2$alpha = _ref2.alpha,
|
|
132
|
-
alpha = _ref2$alpha === void 0 ? 1 : _ref2$alpha;
|
|
133
|
-
return ["".concat(r, " 0 0 0 0"), "0 ".concat(g, " 0 0 0"), "0 0 ".concat(b, " 0 0"), "0 0 0 ".concat(alpha, " 0")].join(" ");
|
|
134
|
-
};
|
|
135
|
-
var getHookGlitchSlamShake = function getHookGlitchSlamShake(overlay, frame, width) {
|
|
136
|
-
if (!overlay) {
|
|
137
|
-
return {
|
|
138
|
-
x: 0,
|
|
139
|
-
scale: 1
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
var _getHookExitPulse2 = getHookExitPulse(overlay, frame),
|
|
143
|
-
localFrame = _getHookExitPulse2.localFrame,
|
|
144
|
-
impact = _getHookExitPulse2.impact,
|
|
145
|
-
cutPulse = _getHookExitPulse2.cutPulse;
|
|
146
124
|
var jitter = (localFrame % 2 === 0 ? 0.86 : -0.86) + Math.sin((localFrame + 1) * 2.37) * 0.24;
|
|
147
|
-
var
|
|
148
|
-
var
|
|
149
|
-
var slamAmplitude = Math.max(14, width * 0.018) * cutPulse * styleMultiplier;
|
|
125
|
+
var baseAmplitude = Math.max(6, width * 0.008) * impact;
|
|
126
|
+
var slamAmplitude = Math.max(14, width * 0.018) * cutPulse;
|
|
150
127
|
var x = Math.round((baseAmplitude + slamAmplitude) * jitter * 10) / 10;
|
|
151
|
-
var scale = 1 + impact * 0.004
|
|
128
|
+
var scale = 1 + impact * 0.004 + cutPulse * 0.012;
|
|
152
129
|
return {
|
|
153
130
|
x: x,
|
|
154
131
|
scale: scale
|
|
155
132
|
};
|
|
156
133
|
};
|
|
157
|
-
var
|
|
158
|
-
var overlay = _ref3.overlay;
|
|
159
|
-
var frame = useCurrentFrame();
|
|
160
|
-
var _useVideoConfig = useVideoConfig(),
|
|
161
|
-
width = _useVideoConfig.width;
|
|
162
|
-
var _getHookExitPulse3 = getHookExitPulse(overlay, frame),
|
|
163
|
-
localFrame = _getHookExitPulse3.localFrame,
|
|
164
|
-
impact = _getHookExitPulse3.impact,
|
|
165
|
-
cutPulse = _getHookExitPulse3.cutPulse,
|
|
166
|
-
tearWindow = _getHookExitPulse3.tearWindow;
|
|
167
|
-
var pulse = Math.max(impact, cutPulse, tearWindow);
|
|
168
|
-
var strobe = localFrame % 3 === 0 ? 1 : localFrame % 3 === 1 ? 0.72 : 0.86;
|
|
169
|
-
var channelOpacity = Math.min(0.92, 0.28 + pulse * 0.58) * strobe;
|
|
170
|
-
var offset = Math.max(10, width * 0.014) * (0.2 + pulse + cutPulse * 1.35);
|
|
171
|
-
var redDx = (localFrame % 2 === 0 ? -1 : 0.72) * offset;
|
|
172
|
-
var greenDx = Math.sin((localFrame + 2) * 1.97) * offset * 0.24;
|
|
173
|
-
var blueDx = (localFrame % 2 === 0 ? 0.86 : -1) * offset;
|
|
174
|
-
var redDy = Math.sin(localFrame * 0.9) * offset * 0.1;
|
|
175
|
-
var blueDy = Math.cos(localFrame * 0.72) * offset * 0.08;
|
|
176
|
-
var displacement = Math.max(0, width * 0.018 * (pulse + cutPulse * 1.5));
|
|
177
|
-
var turbulenceY = 0.18 + localFrame % 5 * 0.035;
|
|
178
|
-
if (!(overlay !== null && overlay !== void 0 && overlay.useRgbSplit) || pulse <= 0.001) {
|
|
179
|
-
return null;
|
|
180
|
-
}
|
|
181
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
182
|
-
"aria-hidden": "true",
|
|
183
|
-
focusable: "false",
|
|
184
|
-
style: {
|
|
185
|
-
position: "absolute",
|
|
186
|
-
width: 0,
|
|
187
|
-
height: 0,
|
|
188
|
-
pointerEvents: "none"
|
|
189
|
-
}
|
|
190
|
-
}, /*#__PURE__*/React.createElement("filter", {
|
|
191
|
-
id: GLITCH_VERDICT_FILTER_ID,
|
|
192
|
-
x: "-18%",
|
|
193
|
-
y: "-18%",
|
|
194
|
-
width: "136%",
|
|
195
|
-
height: "136%",
|
|
196
|
-
colorInterpolationFilters: "sRGB"
|
|
197
|
-
}, /*#__PURE__*/React.createElement("feTurbulence", {
|
|
198
|
-
type: "fractalNoise",
|
|
199
|
-
baseFrequency: "0.006 ".concat(turbulenceY),
|
|
200
|
-
numOctaves: "1",
|
|
201
|
-
seed: localFrame % 11 + 1,
|
|
202
|
-
result: "noise"
|
|
203
|
-
}), /*#__PURE__*/React.createElement("feDisplacementMap", {
|
|
204
|
-
"in": "SourceGraphic",
|
|
205
|
-
in2: "noise",
|
|
206
|
-
scale: displacement,
|
|
207
|
-
xChannelSelector: "R",
|
|
208
|
-
yChannelSelector: "G",
|
|
209
|
-
result: "displaced"
|
|
210
|
-
}), /*#__PURE__*/React.createElement("feColorMatrix", {
|
|
211
|
-
"in": "displaced",
|
|
212
|
-
type: "matrix",
|
|
213
|
-
values: channelMatrix({
|
|
214
|
-
r: 1,
|
|
215
|
-
alpha: channelOpacity
|
|
216
|
-
}),
|
|
217
|
-
result: "red"
|
|
218
|
-
}), /*#__PURE__*/React.createElement("feColorMatrix", {
|
|
219
|
-
"in": "displaced",
|
|
220
|
-
type: "matrix",
|
|
221
|
-
values: channelMatrix({
|
|
222
|
-
g: 1,
|
|
223
|
-
alpha: channelOpacity * 0.72
|
|
224
|
-
}),
|
|
225
|
-
result: "green"
|
|
226
|
-
}), /*#__PURE__*/React.createElement("feColorMatrix", {
|
|
227
|
-
"in": "displaced",
|
|
228
|
-
type: "matrix",
|
|
229
|
-
values: channelMatrix({
|
|
230
|
-
b: 1,
|
|
231
|
-
alpha: channelOpacity
|
|
232
|
-
}),
|
|
233
|
-
result: "blue"
|
|
234
|
-
}), /*#__PURE__*/React.createElement("feOffset", {
|
|
235
|
-
"in": "red",
|
|
236
|
-
dx: redDx,
|
|
237
|
-
dy: redDy,
|
|
238
|
-
result: "redOffset"
|
|
239
|
-
}), /*#__PURE__*/React.createElement("feOffset", {
|
|
240
|
-
"in": "green",
|
|
241
|
-
dx: greenDx,
|
|
242
|
-
dy: "0",
|
|
243
|
-
result: "greenOffset"
|
|
244
|
-
}), /*#__PURE__*/React.createElement("feOffset", {
|
|
245
|
-
"in": "blue",
|
|
246
|
-
dx: blueDx,
|
|
247
|
-
dy: blueDy,
|
|
248
|
-
result: "blueOffset"
|
|
249
|
-
}), /*#__PURE__*/React.createElement("feBlend", {
|
|
250
|
-
"in": "SourceGraphic",
|
|
251
|
-
in2: "redOffset",
|
|
252
|
-
mode: "screen",
|
|
253
|
-
result: "sourceRed"
|
|
254
|
-
}), /*#__PURE__*/React.createElement("feBlend", {
|
|
255
|
-
"in": "sourceRed",
|
|
256
|
-
in2: "greenOffset",
|
|
257
|
-
mode: "screen",
|
|
258
|
-
result: "sourceGreen"
|
|
259
|
-
}), /*#__PURE__*/React.createElement("feBlend", {
|
|
260
|
-
"in": "sourceGreen",
|
|
261
|
-
in2: "blueOffset",
|
|
262
|
-
mode: "screen"
|
|
263
|
-
})));
|
|
264
|
-
};
|
|
265
|
-
var HookGlitchSlamOverlay = function HookGlitchSlamOverlay(_ref4) {
|
|
134
|
+
var HookGlitchSlamOverlay = function HookGlitchSlamOverlay(_ref2) {
|
|
266
135
|
var _window, _window$screenplayPro;
|
|
267
|
-
var durationInFrames =
|
|
268
|
-
peakFrame =
|
|
136
|
+
var durationInFrames = _ref2.durationInFrames,
|
|
137
|
+
peakFrame = _ref2.peakFrame;
|
|
269
138
|
var frame = useCurrentFrame();
|
|
270
|
-
var
|
|
271
|
-
|
|
272
|
-
|
|
139
|
+
var _useVideoConfig = useVideoConfig(),
|
|
140
|
+
width = _useVideoConfig.width,
|
|
141
|
+
_useVideoConfig$props = _useVideoConfig.props,
|
|
142
|
+
compositionProps = _useVideoConfig$props === void 0 ? {} : _useVideoConfig$props;
|
|
273
143
|
var inputProps = (compositionProps === null || compositionProps === void 0 ? void 0 : compositionProps.input) || (typeof window !== "undefined" ? (_window = window) === null || _window === void 0 ? void 0 : (_window$screenplayPro = _window.screenplayProps) === null || _window$screenplayPro === void 0 ? void 0 : _window$screenplayPro.input : {}) || {};
|
|
274
144
|
var accentColor = inputProps.accentColor || "#ffffff";
|
|
275
145
|
var accentWash = withAlpha(accentColor, "40") || "rgba(255,255,255,0.24)";
|
|
@@ -290,8 +160,15 @@ var HookGlitchSlamOverlay = function HookGlitchSlamOverlay(_ref4) {
|
|
|
290
160
|
extrapolateLeft: "clamp",
|
|
291
161
|
extrapolateRight: "clamp"
|
|
292
162
|
});
|
|
163
|
+
var tearWindow = interpolate(Math.abs(relativeFrame), [0, 5, 9], [1, 0.72, 0], {
|
|
164
|
+
extrapolateLeft: "clamp",
|
|
165
|
+
extrapolateRight: "clamp"
|
|
166
|
+
});
|
|
293
167
|
var flashOpacity = cutPulse * 0.46 + impact * 0.05;
|
|
294
168
|
var accentOpacity = cutPulse * 0.16 * postDecay;
|
|
169
|
+
var splitOpacity = Math.min(0.22, (cutPulse * 0.16 + tearWindow * 0.05) * postDecay);
|
|
170
|
+
var splitOffset = Math.max(5, width * 0.006) * (0.4 + cutPulse);
|
|
171
|
+
var maxTearOffset = Math.max(22, width * 0.04);
|
|
295
172
|
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
296
173
|
style: {
|
|
297
174
|
zIndex: 9999,
|
|
@@ -304,6 +181,54 @@ var HookGlitchSlamOverlay = function HookGlitchSlamOverlay(_ref4) {
|
|
|
304
181
|
backgroundColor: accentWash,
|
|
305
182
|
mixBlendMode: "screen"
|
|
306
183
|
}
|
|
184
|
+
}), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
185
|
+
style: {
|
|
186
|
+
opacity: splitOpacity,
|
|
187
|
+
backgroundColor: "rgba(0,240,255,0.72)",
|
|
188
|
+
mixBlendMode: "screen",
|
|
189
|
+
transform: "translate3d(".concat(-splitOffset, "px, 0, 0)")
|
|
190
|
+
}
|
|
191
|
+
}), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
192
|
+
style: {
|
|
193
|
+
opacity: splitOpacity,
|
|
194
|
+
backgroundColor: "rgba(255,32,96,0.66)",
|
|
195
|
+
mixBlendMode: "screen",
|
|
196
|
+
transform: "translate3d(".concat(splitOffset, "px, 0, 0)")
|
|
197
|
+
}
|
|
198
|
+
}), GLITCH_SLAM_TEAR_BARS.map(function (bar, index) {
|
|
199
|
+
var barPulse = interpolate(Math.abs(relativeFrame - bar.phase), [0, 2, 5], [1, 0.48, 0], {
|
|
200
|
+
extrapolateLeft: "clamp",
|
|
201
|
+
extrapolateRight: "clamp"
|
|
202
|
+
}) * impact;
|
|
203
|
+
var tearOffset = bar.direction * maxTearOffset * bar.weight * barPulse;
|
|
204
|
+
var colorOpacity = Math.min(0.58, barPulse * 0.46);
|
|
205
|
+
var shadowOpacity = Math.min(0.18, barPulse * 0.18);
|
|
206
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
207
|
+
key: "glitch-slam-tear-".concat(index)
|
|
208
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
209
|
+
style: {
|
|
210
|
+
position: "absolute",
|
|
211
|
+
top: "".concat(bar.top, "%"),
|
|
212
|
+
left: "-8%",
|
|
213
|
+
width: "116%",
|
|
214
|
+
height: "".concat(bar.height, "%"),
|
|
215
|
+
opacity: colorOpacity,
|
|
216
|
+
background: index % 2 === 0 ? "linear-gradient(90deg, rgba(0,240,255,0), rgba(0,240,255,0.78) 18%, rgba(255,255,255,0.42) 52%, rgba(0,240,255,0) 100%)" : "linear-gradient(90deg, rgba(255,32,96,0), rgba(255,32,96,0.72) 22%, rgba(255,255,255,0.38) 58%, rgba(255,32,96,0) 100%)",
|
|
217
|
+
mixBlendMode: "screen",
|
|
218
|
+
transform: "translate3d(".concat(tearOffset, "px, 0, 0)")
|
|
219
|
+
}
|
|
220
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
221
|
+
style: {
|
|
222
|
+
position: "absolute",
|
|
223
|
+
top: "".concat(bar.top + bar.height * 0.35, "%"),
|
|
224
|
+
left: "-8%",
|
|
225
|
+
width: "116%",
|
|
226
|
+
height: "0.5%",
|
|
227
|
+
opacity: shadowOpacity,
|
|
228
|
+
backgroundColor: "rgba(0,0,0,0.72)",
|
|
229
|
+
transform: "translate3d(".concat(-tearOffset * 0.55, "px, 0, 0)")
|
|
230
|
+
}
|
|
231
|
+
}));
|
|
307
232
|
}), /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
308
233
|
style: {
|
|
309
234
|
opacity: flashOpacity,
|
|
@@ -315,8 +240,8 @@ var HookGlitchSlamOverlay = function HookGlitchSlamOverlay(_ref4) {
|
|
|
315
240
|
var buildHookExitOverlays = function buildHookExitOverlays(track) {
|
|
316
241
|
var overlays = [];
|
|
317
242
|
var timelineCursor = 0;
|
|
318
|
-
track.forEach(function (
|
|
319
|
-
var layout =
|
|
243
|
+
track.forEach(function (_ref3, index) {
|
|
244
|
+
var layout = _ref3.layout;
|
|
320
245
|
var durationInFrames = layout.durationInFrames;
|
|
321
246
|
var hasNextSegment = index < track.length - 1;
|
|
322
247
|
var hookExitEffectEnabled = isHookExitEffectEnabled({
|
|
@@ -338,10 +263,7 @@ var buildHookExitOverlays = function buildHookExitOverlays(track) {
|
|
|
338
263
|
durationInFrames: overlayDuration,
|
|
339
264
|
peakFrame: segmentEnd - from,
|
|
340
265
|
playSound: !isTruthy(layout.disableHookSounds) && !isTruthy(layout.disableTransitionSounds),
|
|
341
|
-
soundFrom: segmentEnd
|
|
342
|
-
hookStyle: layout.hookStyle,
|
|
343
|
-
useRgbSplit: isGlitchVerdictHook(layout),
|
|
344
|
-
useThreeGlitch: !isTruthy(layout.disableHookThreeGlitchEffect) && (isGlitchVerdictHook(layout) || isTruthy(layout.hookThreeGlitchEffectEnabled))
|
|
266
|
+
soundFrom: segmentEnd
|
|
345
267
|
});
|
|
346
268
|
}
|
|
347
269
|
}
|
|
@@ -349,10 +271,10 @@ var buildHookExitOverlays = function buildHookExitOverlays(track) {
|
|
|
349
271
|
});
|
|
350
272
|
return overlays;
|
|
351
273
|
};
|
|
352
|
-
var NestedEffects = function NestedEffects(
|
|
353
|
-
var component =
|
|
354
|
-
index =
|
|
355
|
-
otherProps = _objectWithoutProperties(
|
|
274
|
+
var NestedEffects = function NestedEffects(_ref4) {
|
|
275
|
+
var component = _ref4.component,
|
|
276
|
+
index = _ref4.index,
|
|
277
|
+
otherProps = _objectWithoutProperties(_ref4, _excluded);
|
|
356
278
|
var ComponentToRender = RegisteredComponents[component];
|
|
357
279
|
if (!ComponentToRender) {
|
|
358
280
|
return null;
|
|
@@ -363,45 +285,35 @@ var NestedEffects = function NestedEffects(_ref6) {
|
|
|
363
285
|
name: "NestedEffect-".concat(component)
|
|
364
286
|
}, /*#__PURE__*/React.createElement(ComponentToRender, otherProps));
|
|
365
287
|
};
|
|
366
|
-
var StandardVideoTrack = function StandardVideoTrack(
|
|
367
|
-
var
|
|
368
|
-
var track = _ref7.track;
|
|
288
|
+
var StandardVideoTrack = function StandardVideoTrack(_ref5) {
|
|
289
|
+
var track = _ref5.track;
|
|
369
290
|
var frame = useCurrentFrame();
|
|
370
|
-
var
|
|
371
|
-
width =
|
|
372
|
-
height = _useVideoConfig3.height,
|
|
373
|
-
_useVideoConfig3$prop = _useVideoConfig3.props,
|
|
374
|
-
compositionProps = _useVideoConfig3$prop === void 0 ? {} : _useVideoConfig3$prop;
|
|
375
|
-
var inputProps = (compositionProps === null || compositionProps === void 0 ? void 0 : compositionProps.input) || (typeof window !== "undefined" ? (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$screenplayPr = _window2.screenplayProps) === null || _window2$screenplayPr === void 0 ? void 0 : _window2$screenplayPr.input : {}) || {};
|
|
376
|
-
var accentColor = inputProps.accentColor || "#ff2f6d";
|
|
291
|
+
var _useVideoConfig2 = useVideoConfig(),
|
|
292
|
+
width = _useVideoConfig2.width;
|
|
377
293
|
var hookExitOverlays = buildHookExitOverlays(track);
|
|
378
|
-
var activeHookExitOverlay = hookExitOverlays.find(function (
|
|
379
|
-
var from =
|
|
380
|
-
durationInFrames =
|
|
294
|
+
var activeHookExitOverlay = hookExitOverlays.find(function (_ref6) {
|
|
295
|
+
var from = _ref6.from,
|
|
296
|
+
durationInFrames = _ref6.durationInFrames;
|
|
381
297
|
return frame >= from && frame < from + durationInFrames;
|
|
382
298
|
});
|
|
383
299
|
var _getHookGlitchSlamSha = getHookGlitchSlamShake(activeHookExitOverlay, frame, width),
|
|
384
300
|
shakeX = _getHookGlitchSlamSha.x,
|
|
385
301
|
shakeScale = _getHookGlitchSlamSha.scale;
|
|
386
|
-
var glitchVerdictFrameFilter = getGlitchVerdictFrameFilter(activeHookExitOverlay, frame);
|
|
387
302
|
return /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
388
303
|
style: {
|
|
389
304
|
overflow: "hidden"
|
|
390
305
|
}
|
|
391
|
-
},
|
|
392
|
-
overlay: activeHookExitOverlay
|
|
393
|
-
}) : null, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
306
|
+
}, /*#__PURE__*/React.createElement(AbsoluteFill, {
|
|
394
307
|
style: {
|
|
395
308
|
transform: "translate3d(".concat(shakeX, "px, 0, 0) scale(").concat(shakeScale, ")"),
|
|
396
|
-
transformOrigin: "center center"
|
|
397
|
-
filter: glitchVerdictFrameFilter
|
|
309
|
+
transformOrigin: "center center"
|
|
398
310
|
}
|
|
399
|
-
}, /*#__PURE__*/React.createElement(Series, null, track.map(function (
|
|
400
|
-
var
|
|
401
|
-
component =
|
|
402
|
-
otherProps = _objectWithoutProperties(
|
|
403
|
-
|
|
404
|
-
effects =
|
|
311
|
+
}, /*#__PURE__*/React.createElement(Series, null, track.map(function (_ref7, index, array) {
|
|
312
|
+
var _ref7$layout = _ref7.layout,
|
|
313
|
+
component = _ref7$layout.component,
|
|
314
|
+
otherProps = _objectWithoutProperties(_ref7$layout, _excluded2),
|
|
315
|
+
_ref7$effects = _ref7.effects,
|
|
316
|
+
effects = _ref7$effects === void 0 ? [] : _ref7$effects;
|
|
405
317
|
var ComponentToRender = RegisteredComponents[component];
|
|
406
318
|
var hookExitEffectEnabled = isHookExitEffectEnabled({
|
|
407
319
|
component: component,
|
|
@@ -426,13 +338,12 @@ var StandardVideoTrack = function StandardVideoTrack(_ref7) {
|
|
|
426
338
|
index: index
|
|
427
339
|
}));
|
|
428
340
|
})));
|
|
429
|
-
}))), hookExitOverlays.map(function (
|
|
430
|
-
var from =
|
|
431
|
-
durationInFrames =
|
|
432
|
-
peakFrame =
|
|
433
|
-
playSound =
|
|
434
|
-
soundFrom =
|
|
435
|
-
useThreeGlitch = _ref10.useThreeGlitch;
|
|
341
|
+
}))), hookExitOverlays.map(function (_ref8, index) {
|
|
342
|
+
var from = _ref8.from,
|
|
343
|
+
durationInFrames = _ref8.durationInFrames,
|
|
344
|
+
peakFrame = _ref8.peakFrame,
|
|
345
|
+
playSound = _ref8.playSound,
|
|
346
|
+
soundFrom = _ref8.soundFrom;
|
|
436
347
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
437
348
|
key: "hook-glitch-slam-".concat(from, "-").concat(index)
|
|
438
349
|
}, /*#__PURE__*/React.createElement(Sequence, {
|
|
@@ -442,19 +353,7 @@ var StandardVideoTrack = function StandardVideoTrack(_ref7) {
|
|
|
442
353
|
}, /*#__PURE__*/React.createElement(HookGlitchSlamOverlay, {
|
|
443
354
|
durationInFrames: durationInFrames,
|
|
444
355
|
peakFrame: peakFrame
|
|
445
|
-
})),
|
|
446
|
-
from: from,
|
|
447
|
-
durationInFrames: durationInFrames,
|
|
448
|
-
name: "HookThreeGlitchExitOverlay"
|
|
449
|
-
}, /*#__PURE__*/React.createElement(HookThreeGlitchOverlay, {
|
|
450
|
-
width: width,
|
|
451
|
-
height: height,
|
|
452
|
-
startFrame: 0,
|
|
453
|
-
durationInFrames: durationInFrames,
|
|
454
|
-
accentColor: accentColor,
|
|
455
|
-
intensity: 1.2,
|
|
456
|
-
zIndex: 10000
|
|
457
|
-
})) : null, playSound ? /*#__PURE__*/React.createElement(Sequence, {
|
|
356
|
+
})), playSound ? /*#__PURE__*/React.createElement(Sequence, {
|
|
458
357
|
from: soundFrom,
|
|
459
358
|
name: "HookGlitchSlamSound"
|
|
460
359
|
}, /*#__PURE__*/React.createElement(Audio, {
|
|
@@ -468,17 +367,17 @@ var StandardVideoTrack = function StandardVideoTrack(_ref7) {
|
|
|
468
367
|
})) : null);
|
|
469
368
|
}));
|
|
470
369
|
};
|
|
471
|
-
var TransitionVideoTrack = function TransitionVideoTrack(
|
|
472
|
-
var track =
|
|
473
|
-
transition =
|
|
474
|
-
return /*#__PURE__*/React.createElement(TransitionSeries, null, track.map(function (
|
|
475
|
-
var
|
|
476
|
-
component =
|
|
477
|
-
otherProps = _objectWithoutProperties(
|
|
478
|
-
|
|
479
|
-
effects =
|
|
480
|
-
|
|
481
|
-
transitionAfter =
|
|
370
|
+
var TransitionVideoTrack = function TransitionVideoTrack(_ref9) {
|
|
371
|
+
var track = _ref9.track,
|
|
372
|
+
transition = _ref9.transition;
|
|
373
|
+
return /*#__PURE__*/React.createElement(TransitionSeries, null, track.map(function (_ref10, index, array) {
|
|
374
|
+
var _ref10$layout = _ref10.layout,
|
|
375
|
+
component = _ref10$layout.component,
|
|
376
|
+
otherProps = _objectWithoutProperties(_ref10$layout, _excluded3),
|
|
377
|
+
_ref10$effects = _ref10.effects,
|
|
378
|
+
effects = _ref10$effects === void 0 ? [] : _ref10$effects,
|
|
379
|
+
_ref10$transitionAfte = _ref10.transitionAfter,
|
|
380
|
+
transitionAfter = _ref10$transitionAfte === void 0 ? true : _ref10$transitionAfte;
|
|
482
381
|
var ComponentToRender = RegisteredComponents[component];
|
|
483
382
|
var hasNextSegment = index < array.length - 1;
|
|
484
383
|
var shouldTransition = hasNextSegment && transitionAfter !== false;
|
|
@@ -503,18 +402,18 @@ var TransitionVideoTrack = function TransitionVideoTrack(_ref11) {
|
|
|
503
402
|
}) : null];
|
|
504
403
|
}));
|
|
505
404
|
};
|
|
506
|
-
export var LayoutVideoTrack = function LayoutVideoTrack(
|
|
507
|
-
var track =
|
|
405
|
+
export var LayoutVideoTrack = function LayoutVideoTrack(_ref11) {
|
|
406
|
+
var track = _ref11.track;
|
|
508
407
|
if (!track) {
|
|
509
408
|
return null;
|
|
510
409
|
}
|
|
511
|
-
var
|
|
512
|
-
|
|
513
|
-
|
|
410
|
+
var _useVideoConfig3 = useVideoConfig(),
|
|
411
|
+
_useVideoConfig3$prop = _useVideoConfig3.props.output,
|
|
412
|
+
_useVideoConfig3$prop2 = _useVideoConfig3$prop === void 0 ? {
|
|
514
413
|
theme: window.screenplayProps.output.theme
|
|
515
|
-
} :
|
|
516
|
-
|
|
517
|
-
theme =
|
|
414
|
+
} : _useVideoConfig3$prop,
|
|
415
|
+
_useVideoConfig3$prop3 = _useVideoConfig3$prop2.theme,
|
|
416
|
+
theme = _useVideoConfig3$prop3 === void 0 ? "default" : _useVideoConfig3$prop3;
|
|
518
417
|
var transition = transitionThemes[theme];
|
|
519
418
|
if (transition) {
|
|
520
419
|
return /*#__PURE__*/React.createElement(TransitionVideoTrack, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zync/zync-screnplay-player",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.230",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -16,19 +16,16 @@
|
|
|
16
16
|
"publish-lib": "npm run build && npm publish --access public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@react-three/fiber": "8.17.10",
|
|
20
19
|
"@remotion/google-fonts": "4.0.441",
|
|
21
20
|
"@remotion/lottie": "4.0.441",
|
|
22
21
|
"@remotion/motion-blur": "4.0.441",
|
|
23
22
|
"@remotion/player": "4.0.441",
|
|
24
|
-
"@remotion/three": "4.0.441",
|
|
25
23
|
"@remotion/transitions": "4.0.441",
|
|
26
|
-
"remotion": "4.0.441"
|
|
27
|
-
"three": "0.178.0"
|
|
24
|
+
"remotion": "4.0.441"
|
|
28
25
|
},
|
|
29
26
|
"peerDependencies": {
|
|
30
|
-
"react": "
|
|
31
|
-
"react-dom": "
|
|
27
|
+
"react": "16.14.0",
|
|
28
|
+
"react-dom": "16.14.0"
|
|
32
29
|
},
|
|
33
30
|
"devDependencies": {
|
|
34
31
|
"@babel/cli": "7.21.5",
|
|
@@ -37,14 +34,12 @@
|
|
|
37
34
|
"@babel/preset-react": "7.18.6",
|
|
38
35
|
"@babel/preset-typescript": "^7.26.0",
|
|
39
36
|
"babel-loader": "^9.2.1",
|
|
40
|
-
"react": "18.3.1",
|
|
41
|
-
"react-dom": "18.3.1",
|
|
42
|
-
"rimraf": "^5.0.7",
|
|
43
37
|
"terser-webpack-plugin": "^5.3.11",
|
|
44
38
|
"ts-loader": "^9.5.2",
|
|
45
39
|
"typescript": "^5.7.3",
|
|
46
40
|
"webpack": "^5.97.1",
|
|
47
|
-
"webpack-cli": "^6.0.1"
|
|
41
|
+
"webpack-cli": "^6.0.1",
|
|
42
|
+
"rimraf": "^5.0.7"
|
|
48
43
|
},
|
|
49
44
|
"browser": {
|
|
50
45
|
"fs": false
|