@remotion/motion-blur 4.0.546 → 4.0.547

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.
@@ -62,7 +62,10 @@ const MotionBlurSample = ({ children, width, height, index, count, shutterInFram
62
62
  }, children: (0, jsx_runtime_1.jsx)(remotion_1.Freeze, { frame: sampleFrame, active: !isRepresentativeSample, children: (0, jsx_runtime_1.jsx)(motion_blur_context_1.MotionBlurSampleProvider, { sampleIndex: index, registry: registry, children: children }) }) }));
63
63
  };
64
64
  const HtmlInCanvasMotionBlurInner = ({ children, width, height, shutterAngle = 180, samples = 8, disabled = false, disabledInPreview = false, from, durationInFrames, trimBefore, playbackRate, loop, freeze, hidden, name, premountFor, postmountFor, showInTimeline, style, styleWhilePremounted, styleWhilePostmounted, controls, }) => {
65
+ var _a;
66
+ var _b;
65
67
  const { durationInFrames: compositionDurationInFrames } = (0, remotion_1.useVideoConfig)();
68
+ const parentTrimBefore = (_b = (_a = (0, react_1.useContext)(remotion_1.Internals.SequenceContext)) === null || _a === void 0 ? void 0 : _a.trimBefore) !== null && _b !== void 0 ? _b : 0;
66
69
  const { isRendering } = (0, remotion_1.useRemotionEnvironment)();
67
70
  const videoEnabled = remotion_1.Internals.useVideoEnabled();
68
71
  const preferredBackend = (0, react_1.useContext)(remotion_1.Internals.PreferredEffectBackendContext);
@@ -93,7 +96,7 @@ const HtmlInCanvasMotionBlurInner = ({ children, width, height, shutterAngle = 1
93
96
  durationInFrames,
94
97
  playbackRate,
95
98
  loop,
96
- }), compositionDurationInFrames - (from !== null && from !== void 0 ? from : 0)));
99
+ }), compositionDurationInFrames + parentTrimBefore - (from !== null && from !== void 0 ? from : 0)));
97
100
  const lastFrame = firstFrame + Math.max(0, visibleDuration - 1) * (playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1);
98
101
  const onInit = (0, react_1.useCallback)(async () => {
99
102
  gpuDeviceRef.current = await (0, motion_blur_compositor_1.getMotionBlurGpuDevice)();
@@ -589,6 +589,7 @@ var HtmlInCanvasMotionBlurInner = ({
589
589
  controls
590
590
  }) => {
591
591
  const { durationInFrames: compositionDurationInFrames } = useVideoConfig();
592
+ const parentTrimBefore = useContext2(Internals3.SequenceContext)?.trimBefore ?? 0;
592
593
  const { isRendering } = useRemotionEnvironment();
593
594
  const videoEnabled = Internals3.useVideoEnabled();
594
595
  const preferredBackend = useContext2(Internals3.PreferredEffectBackendContext);
@@ -609,7 +610,7 @@ var HtmlInCanvasMotionBlurInner = ({
609
610
  durationInFrames,
610
611
  playbackRate,
611
612
  loop
612
- }), compositionDurationInFrames - (from ?? 0)));
613
+ }), compositionDurationInFrames + parentTrimBefore - (from ?? 0)));
613
614
  const lastFrame = firstFrame + Math.max(0, visibleDuration - 1) * (playbackRate ?? 1);
614
615
  const onInit = useCallback(async () => {
615
616
  gpuDeviceRef.current = await getMotionBlurGpuDevice();
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/motion-blur"
4
4
  },
5
5
  "name": "@remotion/motion-blur",
6
- "version": "4.0.546",
6
+ "version": "4.0.547",
7
7
  "description": "Motion blur effect for Remotion",
8
8
  "main": "dist/cjs/index.js",
9
9
  "types": "dist/cjs/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "url": "https://github.com/remotion-dev/remotion/issues"
22
22
  },
23
23
  "dependencies": {
24
- "remotion": "4.0.546"
24
+ "remotion": "4.0.547"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": ">=16.8.0",
@@ -40,8 +40,8 @@
40
40
  "@webgpu/types": "0.1.74",
41
41
  "react": "19.3.1",
42
42
  "react-dom": "19.3.1",
43
- "remotion": "4.0.546",
44
- "@remotion/eslint-config-internal": "4.0.546",
43
+ "remotion": "4.0.547",
44
+ "@remotion/eslint-config-internal": "4.0.547",
45
45
  "eslint": "9.19.0",
46
46
  "typescript": "7.1.0-beta"
47
47
  },