@zync/zync-screnplay-player 0.1.229 → 0.1.231

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.
@@ -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 GLITCH_VERDICT_STYLE = "glitch_verdict";
16
- var GLITCH_VERDICT_FILTER_ID = "hook-glitch-verdict-rgb-split";
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
@@ -28,26 +62,26 @@ var transitionThemes = {
28
62
  }
29
63
  };
30
64
 
31
- /*
32
- const UseMotionBlur = ({ children, componentName }) => {
33
- const {
34
- props: {
35
- output: { theme = "default" } = {
36
- theme: window.screenplayProps.output.theme,
37
- },
38
- },
39
- } = useVideoConfig();
40
-
41
- if (motionBlurComponents[componentName] && motionBlurThemes[theme]) {
42
- return (
43
- <CameraMotionBlur shutterAngle={180} samples={5}>
44
- {children}
45
- </CameraMotionBlur>
46
- );
47
- }
48
-
49
- return children;
50
- };
65
+ /*
66
+ const UseMotionBlur = ({ children, componentName }) => {
67
+ const {
68
+ props: {
69
+ output: { theme = "default" } = {
70
+ theme: window.screenplayProps.output.theme,
71
+ },
72
+ },
73
+ } = useVideoConfig();
74
+
75
+ if (motionBlurComponents[componentName] && motionBlurThemes[theme]) {
76
+ return (
77
+ <CameraMotionBlur shutterAngle={180} samples={5}>
78
+ {children}
79
+ </CameraMotionBlur>
80
+ );
81
+ }
82
+
83
+ return children;
84
+ };
51
85
  */
52
86
 
53
87
  var isTruthy = function isTruthy(value) {
@@ -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 getHookExitPulse = function getHookExitPulse(overlay, frame) {
99
+ var getHookGlitchSlamShake = function getHookGlitchSlamShake(overlay, frame, width) {
69
100
  if (!overlay) {
70
101
  return {
71
- localFrame: 0,
72
- relativeFrame: 0,
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 styleMultiplier = overlay.hookStyle === GLITCH_VERDICT_STYLE ? 1.45 : 1;
148
- var baseAmplitude = Math.max(6, width * 0.008) * impact * styleMultiplier;
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 * styleMultiplier + cutPulse * 0.012 * styleMultiplier;
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 GlitchVerdictRgbSplitFilter = function GlitchVerdictRgbSplitFilter(_ref3) {
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 = _ref4.durationInFrames,
268
- peakFrame = _ref4.peakFrame;
136
+ var durationInFrames = _ref2.durationInFrames,
137
+ peakFrame = _ref2.peakFrame;
269
138
  var frame = useCurrentFrame();
270
- var _useVideoConfig2 = useVideoConfig(),
271
- _useVideoConfig2$prop = _useVideoConfig2.props,
272
- compositionProps = _useVideoConfig2$prop === void 0 ? {} : _useVideoConfig2$prop;
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 (_ref5, index) {
319
- var layout = _ref5.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(_ref6) {
353
- var component = _ref6.component,
354
- index = _ref6.index,
355
- otherProps = _objectWithoutProperties(_ref6, _excluded);
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(_ref7) {
367
- var _window2, _window2$screenplayPr;
368
- var track = _ref7.track;
288
+ var StandardVideoTrack = function StandardVideoTrack(_ref5) {
289
+ var track = _ref5.track;
369
290
  var frame = useCurrentFrame();
370
- var _useVideoConfig3 = useVideoConfig(),
371
- width = _useVideoConfig3.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 (_ref8) {
379
- var from = _ref8.from,
380
- durationInFrames = _ref8.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
- }, activeHookExitOverlay !== null && activeHookExitOverlay !== void 0 && activeHookExitOverlay.useRgbSplit ? /*#__PURE__*/React.createElement(GlitchVerdictRgbSplitFilter, {
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 (_ref9, index, array) {
400
- var _ref9$layout = _ref9.layout,
401
- component = _ref9$layout.component,
402
- otherProps = _objectWithoutProperties(_ref9$layout, _excluded2),
403
- _ref9$effects = _ref9.effects,
404
- effects = _ref9$effects === void 0 ? [] : _ref9$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 (_ref10, index) {
430
- var from = _ref10.from,
431
- durationInFrames = _ref10.durationInFrames,
432
- peakFrame = _ref10.peakFrame,
433
- playSound = _ref10.playSound,
434
- soundFrom = _ref10.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
- })), useThreeGlitch ? /*#__PURE__*/React.createElement(Sequence, {
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(_ref11) {
472
- var track = _ref11.track,
473
- transition = _ref11.transition;
474
- return /*#__PURE__*/React.createElement(TransitionSeries, null, track.map(function (_ref12, index, array) {
475
- var _ref12$layout = _ref12.layout,
476
- component = _ref12$layout.component,
477
- otherProps = _objectWithoutProperties(_ref12$layout, _excluded3),
478
- _ref12$effects = _ref12.effects,
479
- effects = _ref12$effects === void 0 ? [] : _ref12$effects,
480
- _ref12$transitionAfte = _ref12.transitionAfter,
481
- transitionAfter = _ref12$transitionAfte === void 0 ? true : _ref12$transitionAfte;
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(_ref13) {
507
- var track = _ref13.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 _useVideoConfig4 = useVideoConfig(),
512
- _useVideoConfig4$prop = _useVideoConfig4.props.output,
513
- _useVideoConfig4$prop2 = _useVideoConfig4$prop === void 0 ? {
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
- } : _useVideoConfig4$prop,
516
- _useVideoConfig4$prop3 = _useVideoConfig4$prop2.theme,
517
- theme = _useVideoConfig4$prop3 === void 0 ? "default" : _useVideoConfig4$prop3;
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,52 +1,47 @@
1
- {
2
- "name": "@zync/zync-screnplay-player",
3
- "version": "0.1.229",
4
- "files": [
5
- "dist"
6
- ],
7
- "main": "dist/bundle.js",
8
- "module": "dist/index.js",
9
- "exports": {
10
- "import": "./dist/index.js",
11
- "require": "./dist/bundle.js"
12
- },
13
- "scripts": {
14
- "clean": "rimraf dist",
15
- "build": "npm run clean && babel src --out-dir dist --extensions \".ts,.tsx,.js,.jsx\" --copy-files && webpack",
16
- "publish-lib": "npm run build && npm publish --access public"
17
- },
18
- "dependencies": {
19
- "@react-three/fiber": "8.17.10",
20
- "@remotion/google-fonts": "4.0.441",
21
- "@remotion/lottie": "4.0.441",
22
- "@remotion/motion-blur": "4.0.441",
23
- "@remotion/player": "4.0.441",
24
- "@remotion/three": "4.0.441",
25
- "@remotion/transitions": "4.0.441",
26
- "remotion": "4.0.441",
27
- "three": "0.178.0"
28
- },
29
- "peerDependencies": {
30
- "react": ">=18.0.0",
31
- "react-dom": ">=18.0.0"
32
- },
33
- "devDependencies": {
34
- "@babel/cli": "7.21.5",
35
- "@babel/core": "7.21.5",
36
- "@babel/preset-env": "7.21.5",
37
- "@babel/preset-react": "7.18.6",
38
- "@babel/preset-typescript": "^7.26.0",
39
- "babel-loader": "^9.2.1",
40
- "react": "18.3.1",
41
- "react-dom": "18.3.1",
42
- "rimraf": "^5.0.7",
43
- "terser-webpack-plugin": "^5.3.11",
44
- "ts-loader": "^9.5.2",
45
- "typescript": "^5.7.3",
46
- "webpack": "^5.97.1",
47
- "webpack-cli": "^6.0.1"
48
- },
49
- "browser": {
50
- "fs": false
51
- }
52
- }
1
+ {
2
+ "name": "@zync/zync-screnplay-player",
3
+ "version": "0.1.231",
4
+ "files": [
5
+ "dist"
6
+ ],
7
+ "main": "dist/bundle.js",
8
+ "module": "dist/index.js",
9
+ "exports": {
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/bundle.js"
12
+ },
13
+ "scripts": {
14
+ "clean": "rimraf dist",
15
+ "build": "npm run clean && babel src --out-dir dist --extensions \".ts,.tsx,.js,.jsx\" --copy-files && webpack",
16
+ "publish-lib": "npm run build && npm publish --access public"
17
+ },
18
+ "dependencies": {
19
+ "@remotion/google-fonts": "4.0.441",
20
+ "@remotion/lottie": "4.0.441",
21
+ "@remotion/motion-blur": "4.0.441",
22
+ "@remotion/player": "4.0.441",
23
+ "@remotion/transitions": "4.0.441",
24
+ "remotion": "4.0.441"
25
+ },
26
+ "peerDependencies": {
27
+ "react": "16.14.0",
28
+ "react-dom": "16.14.0"
29
+ },
30
+ "devDependencies": {
31
+ "@babel/cli": "7.21.5",
32
+ "@babel/core": "7.21.5",
33
+ "@babel/preset-env": "7.21.5",
34
+ "@babel/preset-react": "7.18.6",
35
+ "@babel/preset-typescript": "^7.26.0",
36
+ "babel-loader": "^9.2.1",
37
+ "terser-webpack-plugin": "^5.3.11",
38
+ "ts-loader": "^9.5.2",
39
+ "typescript": "^5.7.3",
40
+ "webpack": "^5.97.1",
41
+ "webpack-cli": "^6.0.1",
42
+ "rimraf": "^5.0.7"
43
+ },
44
+ "browser": {
45
+ "fs": false
46
+ }
47
+ }