@remotion/motion-blur 4.0.541 → 4.0.542
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.
|
@@ -6,7 +6,6 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const htmlInCanvasMotionBlurSchema = {
|
|
8
8
|
...remotion_1.Interactive.baseSchema,
|
|
9
|
-
...remotion_1.Interactive.premountSchema,
|
|
10
9
|
shutterAngle: {
|
|
11
10
|
type: 'number',
|
|
12
11
|
min: 0,
|
|
@@ -54,6 +53,7 @@ const MotionBlurSample = ({ children, width, height, index, count, shutterInFram
|
|
|
54
53
|
};
|
|
55
54
|
const HtmlInCanvasMotionBlurInner = ({ children, width, height, shutterAngle = 180, samples = 8, disabled = false, from, durationInFrames, trimBefore, playbackRate, loop, freeze, hidden, name, premountFor, postmountFor, showInTimeline, styleWhilePremounted, styleWhilePostmounted, controls, }) => {
|
|
56
55
|
const { durationInFrames: compositionDurationInFrames } = (0, remotion_1.useVideoConfig)();
|
|
56
|
+
const videoEnabled = remotion_1.Internals.useVideoEnabled();
|
|
57
57
|
const accumulationCanvasRef = (0, react_1.useRef)(null);
|
|
58
58
|
if (!Number.isInteger(samples) || samples < 1 || samples > 64) {
|
|
59
59
|
throw new TypeError(`"samples" must be an integer between 1 and 64, but got ${String(samples)}`);
|
|
@@ -65,7 +65,8 @@ const HtmlInCanvasMotionBlurInner = ({ children, width, height, shutterAngle = 1
|
|
|
65
65
|
throw new TypeError(`"shutterAngle" must be between 0 and 360, but got ${String(shutterAngle)}`);
|
|
66
66
|
}
|
|
67
67
|
// Keep the first sample mounted when blur is disabled so the canvas stays visible.
|
|
68
|
-
|
|
68
|
+
// Audio-only frames mount the children once so their audio is captured once.
|
|
69
|
+
const actualSamples = disabled || shutterAngle === 0 || !videoEnabled ? 1 : samples;
|
|
69
70
|
const shutterInFrames = (shutterAngle / 360) * (playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1);
|
|
70
71
|
const firstFrame = trimBefore !== null && trimBefore !== void 0 ? trimBefore : 0;
|
|
71
72
|
const visibleDuration = Math.max(0, Math.min(remotion_1.Internals.resolveSequenceDuration({
|
package/dist/esm/index.mjs
CHANGED
|
@@ -72,7 +72,6 @@ import {
|
|
|
72
72
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
73
73
|
var htmlInCanvasMotionBlurSchema = {
|
|
74
74
|
...Interactive.baseSchema,
|
|
75
|
-
...Interactive.premountSchema,
|
|
76
75
|
shutterAngle: {
|
|
77
76
|
type: "number",
|
|
78
77
|
min: 0,
|
|
@@ -156,6 +155,7 @@ var HtmlInCanvasMotionBlurInner = ({
|
|
|
156
155
|
controls
|
|
157
156
|
}) => {
|
|
158
157
|
const { durationInFrames: compositionDurationInFrames } = useVideoConfig();
|
|
158
|
+
const videoEnabled = Internals.useVideoEnabled();
|
|
159
159
|
const accumulationCanvasRef = useRef(null);
|
|
160
160
|
if (!Number.isInteger(samples) || samples < 1 || samples > 64) {
|
|
161
161
|
throw new TypeError(`"samples" must be an integer between 1 and 64, but got ${String(samples)}`);
|
|
@@ -163,7 +163,7 @@ var HtmlInCanvasMotionBlurInner = ({
|
|
|
163
163
|
if (typeof shutterAngle !== "number" || !Number.isFinite(shutterAngle) || shutterAngle < 0 || shutterAngle > 360) {
|
|
164
164
|
throw new TypeError(`"shutterAngle" must be between 0 and 360, but got ${String(shutterAngle)}`);
|
|
165
165
|
}
|
|
166
|
-
const actualSamples = disabled || shutterAngle === 0 ? 1 : samples;
|
|
166
|
+
const actualSamples = disabled || shutterAngle === 0 || !videoEnabled ? 1 : samples;
|
|
167
167
|
const shutterInFrames = shutterAngle / 360 * (playbackRate ?? 1);
|
|
168
168
|
const firstFrame = trimBefore ?? 0;
|
|
169
169
|
const visibleDuration = Math.max(0, Math.min(Internals.resolveSequenceDuration({
|
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.
|
|
6
|
+
"version": "4.0.542",
|
|
7
7
|
"description": "Motion blur effect for Remotion",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"formatting": "oxfmt src --check",
|
|
13
13
|
"format": "oxfmt src",
|
|
14
14
|
"lint": "eslint src",
|
|
15
|
-
"make": "
|
|
15
|
+
"make": "node ../.monorepo/tsrs.cjs -d && bun --env-file=../.env.bundle bundle.ts"
|
|
16
16
|
},
|
|
17
17
|
"author": "Matt McGillivray, Ilija Boshkov <ilija@codechem.com>, Jonny Burger <jonny@remotion.dev>",
|
|
18
18
|
"contributors": [],
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"remotion": "4.0.
|
|
24
|
+
"remotion": "4.0.542"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": ">=16.8.0",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"react": "19.3.1",
|
|
41
41
|
"react-dom": "19.3.1",
|
|
42
|
-
"remotion": "4.0.
|
|
43
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
42
|
+
"remotion": "4.0.542",
|
|
43
|
+
"@remotion/eslint-config-internal": "4.0.542",
|
|
44
44
|
"eslint": "9.19.0",
|
|
45
45
|
"typescript": "7.1.0-beta"
|
|
46
46
|
},
|