@remotion/web-renderer 4.0.471 → 4.0.473
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/create-scaffold.d.ts +2 -1
- package/dist/esm/index.mjs +27 -19
- package/package.json +10 -10
|
@@ -7,7 +7,7 @@ export type ErrorHolder = {
|
|
|
7
7
|
error: Error | null;
|
|
8
8
|
};
|
|
9
9
|
export declare function checkForError(errorHolder: ErrorHolder): void;
|
|
10
|
-
export declare function createScaffold<Props extends Record<string, unknown>>({ width, height, delayRenderTimeoutInMilliseconds, logLevel, resolvedProps, id, mediaCacheSizeInBytes, durationInFrames, fps, initialFrame, schema, Component, audioEnabled, videoEnabled, defaultCodec, defaultOutName, allowHtmlInCanvas }: {
|
|
10
|
+
export declare function createScaffold<Props extends Record<string, unknown>>({ width, height, delayRenderTimeoutInMilliseconds, logLevel, resolvedProps, id, mediaCacheSizeInBytes, durationInFrames, fps, initialFrame, schema, Component, audioEnabled, videoEnabled, defaultCodec, defaultOutName, allowHtmlInCanvas, pixelDensity }: {
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
13
13
|
delayRenderTimeoutInMilliseconds: number;
|
|
@@ -25,6 +25,7 @@ export declare function createScaffold<Props extends Record<string, unknown>>({
|
|
|
25
25
|
defaultCodec: Codec | null;
|
|
26
26
|
defaultOutName: string | null;
|
|
27
27
|
allowHtmlInCanvas: boolean;
|
|
28
|
+
pixelDensity: number;
|
|
28
29
|
}): {
|
|
29
30
|
delayRenderScope: DelayRenderScope;
|
|
30
31
|
div: HTMLDivElement;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1020,7 +1020,8 @@ function createScaffold({
|
|
|
1020
1020
|
videoEnabled,
|
|
1021
1021
|
defaultCodec,
|
|
1022
1022
|
defaultOutName,
|
|
1023
|
-
allowHtmlInCanvas
|
|
1023
|
+
allowHtmlInCanvas,
|
|
1024
|
+
pixelDensity
|
|
1024
1025
|
}) {
|
|
1025
1026
|
if (!ReactDOM.createRoot) {
|
|
1026
1027
|
throw new Error("@remotion/web-renderer requires React 18 or higher");
|
|
@@ -1112,19 +1113,22 @@ function createScaffold({
|
|
|
1112
1113
|
},
|
|
1113
1114
|
folders: []
|
|
1114
1115
|
},
|
|
1115
|
-
children: /* @__PURE__ */ jsx2(Internals3.
|
|
1116
|
-
|
|
1117
|
-
children: /* @__PURE__ */ jsx2(
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
children: /* @__PURE__ */ jsx2(
|
|
1127
|
-
|
|
1116
|
+
children: /* @__PURE__ */ jsx2(Internals3.PixelDensityContext.Provider, {
|
|
1117
|
+
value: pixelDensity,
|
|
1118
|
+
children: /* @__PURE__ */ jsx2(Internals3.RenderAssetManagerProvider, {
|
|
1119
|
+
collectAssets,
|
|
1120
|
+
children: /* @__PURE__ */ jsx2(UpdateTime, {
|
|
1121
|
+
audioEnabled,
|
|
1122
|
+
videoEnabled,
|
|
1123
|
+
logLevel,
|
|
1124
|
+
compId: id,
|
|
1125
|
+
initialFrame,
|
|
1126
|
+
timeUpdater,
|
|
1127
|
+
children: /* @__PURE__ */ jsx2(Internals3.CanUseRemotionHooks.Provider, {
|
|
1128
|
+
value: true,
|
|
1129
|
+
children: /* @__PURE__ */ jsx2(Component, {
|
|
1130
|
+
...resolvedProps
|
|
1131
|
+
})
|
|
1128
1132
|
})
|
|
1129
1133
|
})
|
|
1130
1134
|
})
|
|
@@ -4184,6 +4188,8 @@ var drawText = ({
|
|
|
4184
4188
|
span.textContent = transformedText;
|
|
4185
4189
|
const tokens = findWords(span);
|
|
4186
4190
|
const textShadows = parseTextShadow(textShadowValue);
|
|
4191
|
+
const ctm = contextToDraw.getTransform();
|
|
4192
|
+
const blurScale = Math.hypot(ctm.a, ctm.b);
|
|
4187
4193
|
const { strokeFirst } = parsePaintOrder(paintOrder);
|
|
4188
4194
|
for (const token of tokens) {
|
|
4189
4195
|
const measurements = contextToDraw.measureText(originalText);
|
|
@@ -4196,9 +4202,9 @@ var drawText = ({
|
|
|
4196
4202
|
for (let i = textShadows.length - 1;i >= 0; i--) {
|
|
4197
4203
|
const shadow = textShadows[i];
|
|
4198
4204
|
contextToDraw.shadowColor = shadow.color;
|
|
4199
|
-
contextToDraw.shadowBlur = shadow.blurRadius;
|
|
4200
|
-
contextToDraw.shadowOffsetX = shadow.offsetX;
|
|
4201
|
-
contextToDraw.shadowOffsetY = shadow.offsetY;
|
|
4205
|
+
contextToDraw.shadowBlur = shadow.blurRadius * blurScale;
|
|
4206
|
+
contextToDraw.shadowOffsetX = shadow.offsetX * ctm.a + shadow.offsetY * ctm.c;
|
|
4207
|
+
contextToDraw.shadowOffsetY = shadow.offsetX * ctm.b + shadow.offsetY * ctm.d;
|
|
4202
4208
|
contextToDraw.fillText(token.text, x, y);
|
|
4203
4209
|
}
|
|
4204
4210
|
contextToDraw.shadowColor = "transparent";
|
|
@@ -4725,7 +4731,8 @@ var internalRenderMediaOnWeb = async ({
|
|
|
4725
4731
|
initialFrame: 0,
|
|
4726
4732
|
defaultCodec: resolved.defaultCodec,
|
|
4727
4733
|
defaultOutName: resolved.defaultOutName,
|
|
4728
|
-
allowHtmlInCanvas
|
|
4734
|
+
allowHtmlInCanvas,
|
|
4735
|
+
pixelDensity: scale
|
|
4729
4736
|
}), 0);
|
|
4730
4737
|
const {
|
|
4731
4738
|
delayRenderScope,
|
|
@@ -5139,7 +5146,8 @@ async function internalRenderStillOnWeb({
|
|
|
5139
5146
|
initialFrame: frame,
|
|
5140
5147
|
defaultCodec: resolved.defaultCodec,
|
|
5141
5148
|
defaultOutName: resolved.defaultOutName,
|
|
5142
|
-
allowHtmlInCanvas
|
|
5149
|
+
allowHtmlInCanvas,
|
|
5150
|
+
pixelDensity: scale
|
|
5143
5151
|
}), 0);
|
|
5144
5152
|
const {
|
|
5145
5153
|
delayRenderScope,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/web-renderer"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/web-renderer",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.473",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"scripts": {
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"@mediabunny/mp3-encoder": "1.45.0",
|
|
23
23
|
"@mediabunny/aac-encoder": "1.45.0",
|
|
24
24
|
"@mediabunny/flac-encoder": "1.45.0",
|
|
25
|
-
"@remotion/licensing": "4.0.
|
|
26
|
-
"remotion": "4.0.
|
|
25
|
+
"@remotion/licensing": "4.0.473",
|
|
26
|
+
"remotion": "4.0.473",
|
|
27
27
|
"mediabunny": "1.45.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@react-three/fiber": "9.2.0",
|
|
31
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
32
|
-
"@remotion/paths": "4.0.
|
|
33
|
-
"@remotion/player": "4.0.
|
|
34
|
-
"@remotion/media": "4.0.
|
|
35
|
-
"@remotion/shapes": "4.0.
|
|
36
|
-
"@remotion/three": "4.0.
|
|
37
|
-
"@remotion/transitions": "4.0.
|
|
31
|
+
"@remotion/eslint-config-internal": "4.0.473",
|
|
32
|
+
"@remotion/paths": "4.0.473",
|
|
33
|
+
"@remotion/player": "4.0.473",
|
|
34
|
+
"@remotion/media": "4.0.473",
|
|
35
|
+
"@remotion/shapes": "4.0.473",
|
|
36
|
+
"@remotion/three": "4.0.473",
|
|
37
|
+
"@remotion/transitions": "4.0.473",
|
|
38
38
|
"@types/three": "0.170.0",
|
|
39
39
|
"@typescript/native-preview": "7.0.0-dev.20260217.1",
|
|
40
40
|
"@vitejs/plugin-react": "4.3.4",
|